Tomcat6 has been installed then removed then installed again with YAST.
As far as java is concerned, there are java_1_6_0_openjdk and java_1_6_0_openjdk_plugin, java_1_6_0_sun_plugin, java_1_6_0_sun, java_1_6_0_sun_jdbc packages.
echo $JAVA_HOME => /usr/lib/jvm/jre
that is a link to /etc/alternatives/jre
that is a link to /usr/lib/jvm/jre-1.6.0-openjdk
When I start Tomcat6, there are several errors in the catalina.out logfile.
The first one:
1 déc. 2009 23:26:59 org.apache.coyote.http11.Http11AprProtocol init
GRAVE: Erreur à l’initialisation du point de contact
java.lang.Exception: Socket bind failed: [22] Invalid argument
Second one:
1 déc. 2009 23:26:59 org.apache.catalina.startup.Catalina load
GRAVE: Catalina.start
LifecycleException: L’initialisation du gestionnaire de protocole a échoué: java.lang.Exception: Socket bind failed: [22] Invalid argument
Thank You for your answer ken_yap.
According to me everything looks OK. I did not change anything.
There is this line for the Server section:
<Server port=“8005” shutdown=“SHUTDOWN”>
And then these lines for the connector section in the server section:
<Connector port=“8080” protocol=“HTTP/1.1”
connectionTimeout=“20000”
redirectPort=“8443” />
I forgot exactly what I did but I see that on a working server, I didn’t use the supplied server.xml but created a new one. I think the meaning of the directives changed a bit. It looks like the main difference is the <Server> element has no port declaration. Here’s the one I used:
I tried “<server>” instead of the line in the previous version with the port that is specified: it did not work (http://localhost:8080 still unreachable).
I tried your server.xml, and it did not work either (http://localhost:8080 still unreachable).
And when I gat back to the original server.xml, that’s the errors the catalina.out file contains:
2 déc. 2009 22:41:14 org.apache.coyote.http11.Http11AprProtocol init
GRAVE: Erreur ??? l’initialisation du point de contact
java.lang.Exception: Socket bind failed: [22] Invalid argument
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:612)
at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:107)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
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.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
2 déc. 2009 22:41:14 org.apache.catalina.startup.Catalina load
GRAVE: Catalina.start
LifecycleException: L’initialisation du gestionnaire de protocole a ???chou???: java.lang.Exception: Socket bind failed: [22] Invali
d argument
at org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
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.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
2 déc. 2009 22:41:14 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 885 ms
It looks as if nothing is listening on port 8080.
Concerning apparmor, I searched what was installed using YAST. I found this:
apparmor-docs
apparmor-parser
apparmor-profiles
apparmor-utils
libapparmor1
libapparmor-devel
pam-aparmor
perl-libaparmor
yast2-aparmor
I have Tomcat6 on 11.1 running production systems for years, so this must be something of a configuration problem on your side.
Let’s start at the beginning: how are you starting tomcat? Can you post the console feedback if you run the <tomcat-dir>/bin/startup.sh from a console? It should log the Java environment variables and the JVM used.
Usually I start tomcat with the GUI of the system services. A message was displayed saying tomcat6 started succesfully.
I also execute this command:
/etc/init.d/tomcat6 start
And the result was:
Starting Tomcat (/usr/share/tomcat6)
Then I checked:
ps aux | grep tomcat
Can you stop it from the system services (or use ‘rctomcat6 stop’) and then go to /usr/share/tomcat6/bin and run the ./startup.sh from a shell - you’ll probably have to run it as root. Paste the results back here (the environment listing). It’ll help with troubleshooting. To stop it, run ./shutdown.sh.
In general, I’ve had problems in the past with running Tomcat from the distro packages and it becomes a real pain if you want to have multiple instances running. I simply use the download from the tomcat site and unpack and run it locally.
Also, can you run the following command and paste the results back here - this will tell how many JVMs are running on your machine:
It’s been since 10.3 that I tried the distro version of tomcat. I think they put the files in “non-standard” locations. Can you do the following:
rpm -ql tomcat6
If that doesn’t return anything (I’m guessing the name of the rpm package here), do a ‘rpm -qa | grep tomcat’ first to see what the package name is and then run the 'rpm -ql ’ against it.
Alternatively, paste the contents of the tomcat6 script in here (should be in /etc/init.d/tomcat6.
Basically, I am trying to get you to run tomcat “interactively” so we can see the screen echo.
Alternatively, we may be wasting our time here - I would highly recommend downloading the zip from the tomcat site, unpack it into your home folder and run the bin/startup.sh. If that runs fine, something is wrong/happening with the distro version.
There is stille an error, and the same one.
I installed tomcat6 in my home directory.
Then I started it using startup.sh command.
The URL was unreachable and the first lines of the catalina.out file was these:
3 déc. 2009 23:30:19 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.14.
3 déc. 2009 23:30:19 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
3 déc. 2009 23:30:19 org.apache.coyote.http11.Http11AprProtocol init
GRAVE: Erreur à l’initialisation du point de contact
java.lang.Exception: Socket bind failed: [22] Invalid argument
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:623)
at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:107)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:535)
at org.apache.catalina.startup.Catalina.load(Catalina.java:555)
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.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
3 déc. 2009 23:30:19 org.apache.catalina.startup.Catalina load
Any other ideas ?
I really don’t know what the problem is.
I’m reading your post on my blackberry, so I may have missed it, but can you paste those five lines that get echoed in the console window when you run the ./startup.sh? They show the JDK, JRE, etc locations as Tomcat has found them.
The error trace log is the same as shown before. I need to see your Java environment variables as Tomcat sees them.
And, as I read back your earlier post, you issued the wrong ps command, there is no dash - before aux:
Hi twelveeighty !!
Here is what is printed in the window when I execute the ./startup.sh command:
Using CATALINA_BASE: /home/william/Téléchargements/apache-tomcat-6.0.20
Using CATALINA_HOME: /home/william/Téléchargements/apache-tomcat-6.0.20
Using CATALINA_TMPDIR: /home/william/Téléchargements/apache-tomcat-6.0.20/temp
Using JRE_HOME: /usr/lib/jvm/java/jre
I reboot my computer, I lanched the startup.sh command, but http://localhost:8080 is still unreachable and the catalina.out file contained the same error description:
9 déc. 2009 21:41:31 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.14.
9 déc. 2009 21:41:32 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
9 déc. 2009 21:41:32 org.apache.coyote.http11.Http11AprProtocol init
GRAVE: Erreur à l’initialisation du point de contact
org.apache.tomcat.jni.Error: Address family not supported by protocol
at org.apache.tomcat.jni.Socket.create(Native Method)
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:612)
at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:107)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:535)
at org.apache.catalina.startup.Catalina.load(Catalina.java:555)
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.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
IPV6 should really be disabled since I have “inet6” when I run the ifconfig command.