#1 Le 11/06/2011, à 11:32
- infolami
JBoss sous ubuntu
bonjour ,
j'ai telechargé jboss-4.2.3.GA-jdk6.zip et je veux l'installer sous ubuntu 10.10 mais j'arrive pas a faire ça
j'ai dézipé le paquet dans /opt/ et
j'ai crée un fichier jboss dans /etc/init.d et j'ai mis ce code dedans
#!/bin/sh
##
## Début de la configuration
##
JBOSS_USER=jboss
JBOSS_CONSOLE=/dev/null
##
## Fin de la configuration
##
start(){
CMD='echo Starting JBoss with:'
# Si votre système/votre su(1) n'utilise pas PAM(7), vous devrez charger
# le fichier /etc/environment manuellement. Si c'est le cas, enlevez
# le commentaire de la ligne suivante:
# CMD="${CMD};"'[ -r /etc/environment ] && . /etc/environment'
# Valeur par défaut et affichage de JBOSS_HOME
CMD="${CMD};"'[ -z "${JBOSS_HOME}" ] && JBOSS_HOME=/opt/jboss'
CMD="${CMD};"'echo JBOSS_HOME=${JBOSS_HOME}'
# Valeur par défaut et affichage de JBOSS_CONF
CMD="${CMD};"'[ -z "${JBOSS_CONF}" ] && JBOSS_CONF=default'
CMD="${CMD};"'echo JBOSS_CONF=${JBOSS_CONF}'
# run.sh
CMD="${CMD};"'${JBOSS_HOME}/bin/run.sh -c ${JBOSS_CONF}'
# Execute ${CMD} dans un environnement contrôlé
env - su -l ${JBOSS_USER} -s /bin/sh -c "${CMD} > ${JBOSS_CONSOLE} 2>&1 &"
}
stop(){
# Si votre système/votre su(1) n'utilise pas PAM(7), vous devrez charger
# le fichier /etc/environment manuellement. Si c'est le cas, enlevez
# le commentaire de la ligne suivante:
# CMD="${CMD};"'[ -r /etc/environment ] && . /etc/environment'
# Valeur par défaut et affichage de JBOSS_HOME
CMD='[ -z "${JBOSS_HOME}" ] && JBOSS_HOME=/opt/jboss'
CMD="${CMD};"'${JBOSS_HOME}/bin/shutdown.sh -S'
echo "Stopping JBoss..."
env - su -l ${JBOSS_USER} -s /bin/sh -c "${CMD}"
}
restart(){
stop
sleep 60 # Ajustez éventuellement le délai en fonction de votre configuration
su ${JBOSS_USER} -s /bin/sh -c "killall java"
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo "Usage: local-jboss {start|stop|restart}"
exit 1
esac
exit 0
quand je demare jboss a partir de terminal
:~# /etc/init.d/jboss start
Starting JBoss with:
JBOSS_HOME=/opt/jboss
JBOSS_CONF=default
mais quand je teste http://localhost:8080/ il m'affiche le connexion est echoué
ça fait un semaine que j'essaye de faire , svp aidez moi
merci par avance
Dernière modification par helly (Le 11/06/2011, à 11:49)
Hors ligne
#2 Le 11/06/2011, à 13:03
- pode
Re : JBoss sous ubuntu
Qu'y a t'il dans les fichiers de log du serveur Jboss ?
/opt/jboss/server/default/log/boot.log
/opt/jboss/server/default/log/server.log
Pour vérifier qu'un processus écoute sur le port 8080, fait :
sudo netstat -plantu | grep 8080
et quel est ce processus (s'il y en a un) :
$ ps -ef | grep $(sudo netstat -plantu|grep ":8080" | awk ' { print gensub(/\/.*$/, "", "g", $7) } ')
Hors ligne
#3 Le 11/06/2011, à 15:30
- infolami
Re : JBoss sous ubuntu
merci pour votre reponse
j'ai pas trouvé les fichiers boot.log et server.log parcontre j'ai trouver server.xml
qui contient cette partie
Connector port="8080"
au debut je me connecte a tomcat a partir de ce port 8080 mais j'ai changer le port pour tomcat a 8081
Hors ligne
#4 Le 11/06/2011, à 20:02
- pode
Re : JBoss sous ubuntu
Il ne faut pas que tomcat et jboss essaient d'écouter sur le même port, sinon le dernier lancé ne pourra pas tourner.
Si tu as toujours un problème avec Jboss, il faut regarder les logs. C'est vraiment étonnant qu'il n'y ait pas de logs.
Pour le server.log, c'est défini, en fonction de la version de Jboss, dans
/opt/jboss/server/default/deploy/jboss-logging.xml
ou
/opt/jboss/server/default/conf/log4j.xml
Chez moi, j'ai bien :
$ grep -m 1 -B 3 -A 4 "/server.log" /opt/jboss/server/default/deploy/jboss-logging.xml
<!-- A time/date based rolling handler -->
<periodic-rotating-file-handler
file-name="${jboss.server.log.dir}/server.log"
name="FILE"
autoflush="true"
append="true"
suffix=".yyyy-MM-dd"> <!-- To roll over at the top of each hour, use ".yyyy-MM-dd-HH" instead -->
Pour le boot.log, c'est plus compliqué (c'est dans le fichier run.jar)
Pour avoir quand même des logs, je te propose de modifier temporairement ton script de démarrage en remplaçant :
JBOSS_CONSOLE=/dev/null
par
JBOSS_CONSOLE=/tmp/jb.log
Comme ça, tu aura les logs de démarrage du serveur dans le fichier /tmp/jb.log
Hors ligne
#5 Le 11/06/2011, à 20:27
- infolami
Re : JBoss sous ubuntu
vous voulez dire que
je change dans le fichier /etc/init.d.jboss
JBOSS_CONSOLE=/dev/null
par
JBOSS_CONSOLE=/tmp/jb.log
?
Hors ligne
#6 Le 11/06/2011, à 20:32
- infolami
Re : JBoss sous ubuntu
j'ai changé mais toujour la connexion echoué
Hors ligne
#7 Le 11/06/2011, à 20:33
- infolami
Re : JBoss sous ubuntu
svp vous pouvez me dire comment exactement vous avez installer votre jboss ?
Hors ligne
#8 Le 11/06/2011, à 20:38
- infolami
Re : JBoss sous ubuntu
je n'ai pas le fichier jboss-logging.xml mai j'ai trouvé le fichier jboss-log4j.xml
grep -m 1 -B 3 -A 4 "/server.log" /opt/jboss/server/default/conf/jboss-log4j.xml
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="File" value="${jboss.server.log.dir}/server.log"/>
<param name="Append" value="false"/>
<!-- Rollover at midnight each day -->
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
Hors ligne
#9 Le 11/06/2011, à 22:15
- pode
Re : JBoss sous ubuntu
j'ai changé mais toujour la connexion echoué
C'est normal, la configuration du serveur n'a pas changé. L'intérêt de la modification est juste d'écrire des logs dans un fichier /tmp/jb.log
Qu'y a t-il dans ce fichier ?
Pour l'installation, j'ai un Jboss dans /opt, mais pas de la même version.
J'ai tout recopier dans /opt et j'ai donné tous les droits à jboss:jboss en récursif, i.e. :
$ sudo useradd jboss
$ chown -R jboss:jboss /opt/jboss
ce qui donne :
$ ls -l /opt/jboss/
total 232
drwxr-xr-x 3 jboss jboss 4096 2011-06-11 13:42 bin
drwxr-xr-x 2 jboss jboss 12288 2011-06-11 13:42 client
drwxr-xr-x 4 jboss jboss 4096 2011-06-11 13:42 common
drwxr-xr-x 6 jboss jboss 4096 2011-06-11 13:42 docs
-rw-r--r-- 1 jboss jboss 204254 2011-06-11 13:42 jar-versions.xml
drwxr-xr-x 3 jboss jboss 4096 2011-06-11 13:42 lib
drwxr-xr-x 7 jboss jboss 4096 2011-06-11 13:42 server
Hors ligne
#10 Le 12/06/2011, à 10:07
- infolami
Re : JBoss sous ubuntu
c'est que j'ai fait exactemet
j'ai mis jboss dans /opt
et j'ai cree un user jboss
useradd jboss
ls -l /opt/jboss/
total 196
drwxr-xr-x 2 root root 4096 2008-07-18 15:07 bin
drwxr-xr-x 2 root root 4096 2008-07-18 14:44 client
-rw-r--r-- 1 root root 6134 2008-07-18 15:03 copyright.txt
drwxr-xr-x 7 root root 4096 2008-07-18 15:03 docs
-rw-r--r-- 1 root root 60811 2008-07-18 14:45 jar-versions.xml
-rw-r--r-- 1 root root 8178 2008-07-18 15:03 JBossORG-EULA.txt
-rw-r--r-- 1 root root 33732 2008-07-18 15:03 lgpl.html
drwxr-xr-x 3 root root 4096 2008-07-18 14:44 lib
-rw-r--r-- 1 root root 62697 2008-07-18 15:03 readme.html
drwxr-xr-x 5 root root 4096 2008-07-18 14:43 server
pour le fichier /tmp/jb.log
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /opt/jboss
JAVA: /usr/lib/jvm/java-6-openjdk/bin/java
JAVA_OPTS: -Dprogram.name=run.sh -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true
CLASSPATH: /opt/jboss/bin/run.jar:/usr/lib/jvm/java-6-openjdk/lib/tools.jar
=========================================================================
log4j:ERROR Failed to create directory structure: /opt/jboss/server/default/log
log4j:ERROR setFile(null,false) call failed.
java.io.FileNotFoundException: /opt/jboss/server/default/log/boot.log (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:209)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
at org.jboss.logging.Log4jLoggerPlugin.init(Log4jLoggerPlugin.java:63)
at org.jboss.logging.Logger.getDelegatePlugin(Logger.java:338)
at org.jboss.logging.Logger.<init>(Logger.java:96)
at org.jboss.logging.Logger.getLogger(Logger.java:309)
at org.jboss.system.server.ServerImpl.doInit(ServerImpl.java:166)
at org.jboss.system.server.ServerImpl.init(ServerImpl.java:147)
at org.jboss.Main.boot(Main.java:197)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Thread.java:636)
10:03:55,213 INFO [Server] Starting JBoss (MX MicroKernel)...
10:03:55,214 INFO [Server] Release ID: JBoss [Trinity] 4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181439)
10:03:55,215 INFO [Server] Home Dir: /opt/jboss
10:03:55,215 INFO [Server] Home URL: file:/opt/jboss/
10:03:55,215 INFO [Server] Patch URL: null
10:03:55,215 INFO [Server] Server Name: default
10:03:55,215 INFO [Server] Server Home Dir: /opt/jboss/server/default
10:03:55,216 INFO [Server] Server Home URL: file:/opt/jboss/server/default/
10:03:55,216 INFO [Server] Server Log Dir: /opt/jboss/server/default/log
10:03:55,216 INFO [Server] Server Temp Dir: /opt/jboss/server/default/tmp
10:03:55,216 INFO [Server] Root Deployment Filename: jboss-service.xml
10:03:55,470 INFO [ServerInfo] Java version: 1.6.0_20,Sun Microsystems Inc.
10:03:55,470 INFO [ServerInfo] Java VM: OpenJDK Server VM 19.0-b09,Sun Microsystems Inc.
10:03:55,470 INFO [ServerInfo] OS-System: Linux 2.6.35-22-generic,i386
10:03:55,846 INFO [Server] Core system initialized
10:03:55,867 ERROR [MainDeployer] Could not make local copy for file:/opt/jboss/server/default/conf/jboss-service.xml
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1716)
at java.io.File.createTempFile(File.java:1804)
at org.jboss.deployment.MainDeployer.makeLocalCopy(MainDeployer.java:1185)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:851)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Thread.java:636)
10:03:55,872 ERROR [MainDeployer] Could not initialise deployment: file:/opt/jboss/server/default/conf/jboss-service.xml
org.jboss.deployment.DeploymentException: Failed to find META-INF/jboss-service.xml for archive jboss-service.xml
at org.jboss.deployment.SARDeployer.parseDocument(SARDeployer.java:618)
at org.jboss.deployment.SARDeployer.init(SARDeployer.java:181)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:872)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Thread.java:636)
Failed to boot JBoss:
org.jboss.deployment.DeploymentException: Failed to find META-INF/jboss-service.xml for archive jboss-service.xml
at org.jboss.deployment.SARDeployer.parseDocument(SARDeployer.java:618)
at org.jboss.deployment.SARDeployer.init(SARDeployer.java:181)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:872)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Thread.java:636)
10:03:55,877 INFO [Server] Runtime shutdown hook called, forceHalt: true
10:03:55,877 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
10:03:55,882 INFO [Server] Shutdown complete
Shutdown complete
Halting VM
merci beaucoup pour vos reponses
Hors ligne
#11 Le 12/06/2011, à 10:12
- pode
Re : JBoss sous ubuntu
ls -l /opt/jboss/ total 196 drwxr-xr-x 2 root root 4096 2008-07-18 15:07 bin drwxr-xr-x 2 root root 4096 2008-07-18 14:44 client -rw-r--r-- 1 root root 6134 2008-07-18 15:03 copyright.txt drwxr-xr-x 7 root root 4096 2008-07-18 15:03 docs -rw-r--r-- 1 root root 60811 2008-07-18 14:45 jar-versions.xml -rw-r--r-- 1 root root 8178 2008-07-18 15:03 JBossORG-EULA.txt -rw-r--r-- 1 root root 33732 2008-07-18 15:03 lgpl.html drwxr-xr-x 3 root root 4096 2008-07-18 14:44 lib -rw-r--r-- 1 root root 62697 2008-07-18 15:03 readme.html drwxr-xr-x 5 root root 4096 2008-07-18 14:43 server
Les droits ne sont pas bons. Le serveur Jboss est lancé avec le compte jboss et va créer des fichiers avec ce compte.
Or, les répertoires appartiennent au compte root.
pour le fichier /tmp/jb.log
[...]
log4j:ERROR Failed to create directory structure: /opt/jboss/server/default/log
C'est ce qu'on voit ici : le serveur jboss n'a pas réussi à créer le répertoire /opt/jboss/server/default/log
Il faut que tu donnes tous les droits d'accès au compte jboss :
chown -R jboss:jboss /opt/jboss
Hors ligne
#12 Le 12/06/2011, à 10:17
- infolami
Re : JBoss sous ubuntu
ça maaaaaaaaaaarche merci beaucoup
Hors ligne
#13 Le 12/06/2011, à 10:20
- infolami
Re : JBoss sous ubuntu
j'ai une autre question lol
je voudrais ajouter ejbca_4_0_3.zip a JBoss
est ce que vous avez une idée?
Hors ligne
#14 Le 12/06/2011, à 10:54
- pode
Re : JBoss sous ubuntu
je voudrais ajouter ejbca_4_0_3.zip a JBoss
Je ne connais pas ejbca, mais le site Installation ejbca.org donne des infos.
Je te conseille de le lire du début à la fin avant de te lancer dans l'installation ; et l'exemple est donné pour un Jboss 5, donc à adapter.
Hors ligne
#15 Le 12/06/2011, à 11:13
- infolami
Re : JBoss sous ubuntu
ok , merci beaucoup
Hors ligne
#16 Le 14/06/2011, à 16:37
- infolami
Re : JBoss sous ubuntu
c'est encore moi lol
jboss ne s'arrete plus avec la commande
# /etc/init.d/jboss stop
voila l'affichage
# /etc/init.d/jboss stop
Stopping JBoss...
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:409)
at org.jboss.Shutdown.main(Shutdown.java:214)
Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
... 4 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
... 5 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
at java.net.Socket.connect(Socket.java:546)
at java.net.Socket.connect(Socket.java:495)
at java.net.Socket.<init>(Socket.java:392)
at java.net.Socket.<init>(Socket.java:293)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:244)
... 5 more
aidez moi svp
et merci d'avance
Hors ligne
#17 Le 14/06/2011, à 18:44
- pode
Re : JBoss sous ubuntu
Bah, c'est parce qu'il est déjà arrêté, ou tu l'as lancé plusieurs fois, ou il s'est planté.
Pour vérifier s'il y a des processus qui tournent :
$ ps -ef | grep -E "^jboss.*run.sh.*default|^jboss.*java.*default"
jboss 3952 1 0 19:33 pts/3 00:00:00 /bin/sh /opt/jboss/bin/run.sh -c default
jboss 4016 3952 32 19:33 pts/3 00:00:44 java -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Dprogram.name=run.sh -Djava.library.path=/opt/jboss/bin/native/lib -Djava.endorsed.dirs=/opt/jboss/lib/endorsed -classpath /opt/jboss/bin/run.jar org.jboss.Main -c default
Pour vérifier si le serveur Jboss écoute sur des ports :
$ sudo netstat -plantu |grep java
tcp 0 0 127.0.0.1:5500 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:5501 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:4446 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:3873 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:1090 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:1091 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:5445 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:4712 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:8009 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:4713 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:4714 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:1098 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:1099 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:5455 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:8083 0.0.0.0:* LISTEN 4871/java
ou plus complexe (mais moins problématique si d'autres processus java tournent) :
$ sudo netstat -plantu | grep $(ps -ef |grep -E "^jboss.*java.*default" | awk ' { print $2 } ')
tcp 0 0 127.0.0.1:5500 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:5501 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:4446 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:3873 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:1090 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:1091 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:5445 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:4712 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:8009 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:4713 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:4714 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:1098 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:1099 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:5455 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 4871/java
tcp 0 0 127.0.0.1:8083 0.0.0.0:* LISTEN 4871/java
Au pire, si le serveur s'est planté, un bon kill-9 sur les processus run.sh et java, et tu peux relancer le serveur.
Hors ligne
#18 Le 14/06/2011, à 19:07
- infolami
Re : JBoss sous ubuntu
d'abord je vous remercie pour votre reponse
mais je n'ai pas tres bien compris ce que je dois faire
donc pour la premiere commande voila le resultas
$ ps -ef | grep -E "^jboss.*run.sh.*default|^jboss.*java.*default"
jboss 1303 1 0 18:54 ? 00:00:00 /bin/sh /opt/jboss/bin/run.sh -c default
jboss 1452 1303 14 18:54 ? 00:00:50 /usr/lib/jvm/java-6-openjdk/bin/java -Dprogram.name=run.sh -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Djava.endorsed.dirs=/opt/jboss/lib/endorsed -classpath /opt/jboss/bin/run.jar:/usr/lib/jvm/java-6-openjdk/lib/tools.jar org.jboss.Main -c default
et pour la deuxieme
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 1452/java
tcp 0 0 127.0.0.1:8083 0.0.0.0:* LISTEN 1452/java
tcp 0 0 0.0.0.0:8442 0.0.0.0:* LISTEN 1452/java
tcp 0 0 0.0.0.0:33818 0.0.0.0:* LISTEN 1452/java
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 1452/java
tcp 0 0 127.0.0.1:4444 0.0.0.0:* LISTEN 1452/java
tcp 0 0 0.0.0.0:50972 0.0.0.0:* LISTEN 1452/java
tcp 0 0 127.0.0.1:8093 0.0.0.0:* LISTEN 1452/java
tcp 0 0 127.0.0.1:4445 0.0.0.0:* LISTEN 1452/java
tcp 0 0 127.0.0.1:4446 0.0.0.0:* LISTEN 1452/java
tcp 0 0 127.0.0.1:3873 0.0.0.0:* LISTEN 1452/java
tcp 0 0 0.0.0.0:33475 0.0.0.0:* LISTEN 1452/java
tcp 0 0 127.0.0.1:8009 0.0.0.0:* LISTEN 1452/java
tcp 0 0 127.0.0.1:1098 0.0.0.0:* LISTEN 1452/java
tcp 0 0 127.0.0.1:1099 0.0.0.0:* LISTEN 1452/java
tcp6 0 0 :::8081 :::* LISTEN 1556/java
tcp6 0 0 127.0.0.1:8005 :::* LISTEN 1556/java
dans le port 8081 j'ai tomcat
et si le serveur s'est planté comment j'utilise kill-9?
merci d'avance
Hors ligne
#19 Le 14/06/2011, à 19:13
- infolami
Re : JBoss sous ubuntu
c bizzar mais j'ai réessayé d'arreter jboss maintement il s'est arrété !!!!!!!
# /etc/init.d/jboss stop
Stopping JBoss...
Shutdown message has been posted to the server.
Server shutdown may take a while - check logfiles for completion
j'ai pas commpris comment!!!
Hors ligne
#20 Le 14/06/2011, à 19:20
- pode
Re : JBoss sous ubuntu
j'ai pas commpris comment!!!
Au vu des infos montrées avec ps et netstat, j'aurais effectivement dit que tout semblait OK...
Dans le cas d'un plantage important de Jboss, le kill -9 est à appliquer sur les processus qui ont permis de lancer le serveur Jboss.
Tout à l'heure ça aurait été :
$ kill -9 1303 1452
ou
$ sudo kill -9 1303 1452
A modifier à chaque fois que le serveur est arrêté / relancé...
Hors ligne
#21 Le 14/06/2011, à 19:20
- infolami
Re : JBoss sous ubuntu
elle vous donne quoi comme resultas cette commande svp?
# /etc/init.d/jboss stop
Dernière modification par infolami (Le 14/06/2011, à 19:21)
Hors ligne
#22 Le 14/06/2011, à 19:27
- pode
Re : JBoss sous ubuntu
elle vous donne quoi comme resultas cette commande svp?
# /etc/init.d/jboss stop
En temps normal (pour un jboss 6) :
Stopping JBoss...
No directory, logging in with HOME=/
Shutdown message has been posted to the server.
Server shutdown may take a while - check logfiles for completion
Va falloir embaucher un consultant Jboss
Hors ligne
#23 Le 14/06/2011, à 19:35
- infolami
Re : JBoss sous ubuntu
Je vais abuser de votre gentillesse
avez vous déja essayer de demarrer/arreter jboss a partir d'eclipse?
Hors ligne
#24 Le 14/06/2011, à 19:51
- pode
Re : JBoss sous ubuntu
Oui, mais comme c'est packagé par une équipe dédiée à ça dans ma boîte, c'est totalement transparent pour moi...
Peut-être que d'autres personnes sur ce forum ou sur d'autres forum savent comment faire.
Hors ligne
#25 Le 14/06/2011, à 20:02
- infolami
Re : JBoss sous ubuntu
ok merci beaucoup
Hors ligne