Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Error launching tomcat6 on opensuse 11.1

  1. #1

    Default Error launching tomcat6 on opensuse 11.1

    Hi all!

    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 dc. 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 dc. 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

    And http://localhost:8080 is unreachable with my browser, neither http://localhost:8005.

    And a nestat command gives me this:
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2995/httpd2-prefork
    tcp 0 0 127.0.0.1:8005 :::* LISTEN 15130/java


    Has anyone got an idea about how to solve my problem ?

    Thank you very much.

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Error launching tomcat6 on opensuse 11.1

    Have you checked that /etc/tomcat6/server.xml contains a correct declaration for the connector for port 8080?

  3. #3

    Default Re: Error launching tomcat6 on opensuse 11.1

    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" />

    It should work, souldn't it ?

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Error launching tomcat6 on opensuse 11.1

    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:

    Code:
    <?xml version='1.0' encoding='utf-8'?>
    <Server>
      <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
      <GlobalNamingResources>
        <Environment name="simpleValue" type="java.lang.Integer"
        value="30" />
        <Resource auth="Container"
        description="User database that can be updated and saved"
        name="UserDatabase" type="org.apache.catalina.UserDatabase"
        factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
        pathname="conf/tomcat-users.xml" />
      </GlobalNamingResources>
      <Service name="Catalina">
        <Connector acceptCount="100" connectionTimeout="20000"
        disableUploadTimeout="true" port="8080" redirectPort="8443"
        maxSpareThreads="75" maxThreads="150" minSpareThreads="25">
        </Connector>
        <Connector port="8009" protocol="AJP/1.3"
        protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
        redirectPort="8443"></Connector>
        <Engine defaultHost="localhost" name="Catalina">
          <Host appBase="webapps" name="localhost">
            <Logger className="org.apache.catalina.logger.FileLogger"
            prefix="localhost_log" suffix=".txt" />
          </Host>
          <Logger className="org.apache.catalina.logger.FileLogger"
          prefix="catalina_log" suffix=".txt" />
          <Realm className="org.apache.catalina.realm.UserDatabaseRealm" />
        </Engine>
      </Service>
    </Server>

  5. #5

    Default Re: Error launching tomcat6 on opensuse 11.1

    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 dc. 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 dc. 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 dc. 2009 22:41:14 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 885 ms

  6. #6
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Error launching tomcat6 on opensuse 11.1

    Do you already have something listening on port 8080? Do you have some sort of limitation on Tomcat like apparmor?

    Sorry, no more ideas.

  7. #7

    Default Re: Error launching tomcat6 on opensuse 11.1

    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

  8. #8
    Join Date
    Dec 2008
    Location
    GMT-7
    Posts
    382

    Default Re: Error launching tomcat6 on opensuse 11.1

    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.
    Desk: AMD Phenom II X4 945 8GB RAM Radeon HD 3300 Arch Linux Xfce 4.8
    Lap: Intel 2.13GHz Core i3 M330 8GB RAM nVidia GeForce 310M Arch Linux KDE 4.7.3

  9. #9

    Default Re: Error launching tomcat6 on opensuse 11.1

    Hi twelveeighty!

    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

    And it looks OK:
    tomcat 3815 75.9 1.0 1250428 44768 pts/2 Sl 22:15 0:06 /etc/alternatives/jre/bin/java -classpath :/usr/share/tomcat6/bin/bootstrap.jar:/usr/share/tomcat6/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -Dcatalina.base=/usr/share/tomcat6 -Dcatalina.home=/usr/share/tomcat6 -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat6/temp -Djava.util.logging.config.file=/usr/share/tomcat6/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start

    But nothing was listening on the port 8080 or 8005:
    netstat -lpn | grep 8080 and netstat -lpn | grep 8005 returned nothing.

    instead of when I start tomcat using the GUI: java listens on port 8005.

  10. #10
    Join Date
    Dec 2008
    Location
    GMT-7
    Posts
    382

    Default Re: Error launching tomcat6 on opensuse 11.1

    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:

    ps aux | grep java
    Desk: AMD Phenom II X4 945 8GB RAM Radeon HD 3300 Arch Linux Xfce 4.8
    Lap: Intel 2.13GHz Core i3 M330 8GB RAM nVidia GeForce 310M Arch Linux KDE 4.7.3

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •