PEtALS user experience

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

PEtALS user experience

cdeneux-4
Hi petals community Smile

I'm new to PEtALS, and as a dummy I have basic questions about it.

First, when trying a new software, I always wanna check if it's been installed the right way by printing its "version number".

Here is what I get for PEtALS:
$ java -server -jar server.jar version

-----------------------------------------------------------
| |
| OW2 PEtALS Enterprise Service Bus |
| http://petals.ow2.org |
| |
-----------------------------------------------------------

Command processing error : version
org.ow2.petals.jmx.exception.ConnectionErrorException: Can not connect using URI : service:jmx:rmi:///jndi/rmi://localhost:7700/jmxRmiConnector with petals/petals
at org.ow2.petals.jmx.PetalsJMXConnection.(PetalsJMXConnection.java:114)
at org.ow2.petals.jmx.PetalsJMXClient.(PetalsJMXClient.java:6Cool
at org.ow2.petals.launcher.StandaloneLauncher.getPetalsJmxClient(StandaloneLauncher.java:91)
at org.ow2.petals.launcher.AbstractLauncher.version(AbstractLauncher.java:219)
at org.ow2.petals.launcher.AbstractLauncher.launch(AbstractLauncher.java:143)
at org.ow2.petals.distribution.standalone.Main.main(Main.java:42)
Caused by: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused]
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:317)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
at org.ow2.petals.jmx.PetalsJMXConnection.(PetalsJMXConnection.java:110)
... 5 more
Caused by: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused]
at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:97)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1817)
at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1787)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:259)
... 7 more
Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:93)
... 12 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:520)
at java.net.Socket.connect(Socket.java:470)
at java.net.Socket.(Socket.java:367)
at java.net.Socket.(Socket.java:180)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569)
... 17 more


I was expecting something like "PEtALS standalone 2.2" to be printed on stdout
Idea
Is it possible for the PEtaLS development team to provide a simple "version command" that works even if the ESB is not started?


PS: does anyone know if it's possible to upload files on this forum? I'd like to submit new startup scripts and get feedbacks about it
Question




-------------------- m2f --------------------

Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=206#206

-------------------- m2f --------------------

_______________________________________________
General mailing list
[hidden email]
http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/general
Reply | Threaded
Open this post in threaded view
|

Re: PEtALS user experience

cdeneux-4
Hi!
1-Normally, you've to use the shell ping.sh, which isn't operational on quickstart 2.2. Youv've to had '!' into two test. The correct ping.sh (adds are on red):
Quote:
#!/bin/sh

RepScript=`dirname $0`
RepCourant=`pwd`


######################
# ENV VARIABLES
######################

echo "Setting Petals environment"

if [ ! -d "$JAVA_HOME" ]
then
echo "The JAVA_HOME variable is not properly set. Please set it in your environment."
exit 1
fi

if [ ! -d "$PETALS_HOME" ]
then
PETALS_HOME="$RepCourant/$RepScript/.."
export PETALS_HOME
fi

if [ ! -f "$PETALS_HOME/conf/server.properties" ]
then
echo "The PETALS_HOME environment variable is not set correctly. Please set it in your environment with a correct value."
exit 2
fi

PATH="$JAVA_HOME/bin:$PATH"
export PATH

java -version
echo ""


######################
# ARGUMENTS
######################

cd "$PETALS_HOME/bin"

Silence=false
while getopts :hv:Sv options
do
case ${options} in
h)
echo "The ping.sh script is used to determine if Petals is started."
echo "usage : ping [-h] [-S]"
echo " -h : prints the help message"
echo " -S : active the silent mode"
exit 0;
;;
S)
Silence=true
;;
?)
echo "usage : ping [-h] [-S]"
exit 2
;;
esac
done

pingResult=`java -Xmx128m -jar server.jar version`

echo $pingResult | grep "Petals JBI Container - version:" >/dev/null 2>/dev/null
active=$?

cd "$RepCourant"

if [ $active -eq 0 ]
then
if [ $Silence != true ]
then
echo "Petals RUNNING"
fi
exit 0
else
if [ $Silence != true ]
then
echo "Petals STOPPED"
fi
exit 1
fi

2-that's right : to get the version, today we need the PEtALS JMX Server on:
Code:
/*
     * (non-Javadoc)
     *
     * @see org.ow2.petals.launcher.PetalsLauncher#version()
     */
    public void version() throws Exception {
        System.out.println(getPetalsJmxClient().getAdminServiceClient().getSystemInfo());
    }

So you can't get the version without starting the JMX Sad




-------------------- m2f --------------------

Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=207#207

-------------------- m2f --------------------

_______________________________________________
General mailing list
[hidden email]
http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/general
Reply | Threaded
Open this post in threaded view
|

Re: PEtALS user experience

cdeneux-4
In reply to this post by cdeneux-4
Hi Sebastien Wink

Basic questions are very (very) useful. Most of us forgot how it is to be a newbie => we're blind about all basic and essential matters. (Should say "they", since I'm more than ultra-noob Laughing )
So, thanks a lots for the comment Smile

About upload, for the moment, it is not possible directly on the forum.
The best way is to use an external upload server, such as Megaupload, and then add the link on forum.
That's fast, easy, and more secure for the forum Smile




-------------------- m2f --------------------

Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=208#208

-------------------- m2f --------------------

_______________________________________________
General mailing list
[hidden email]
http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/general