Geronimo
  1. Geronimo
  2. GERONIMO-4798

can't start server because of an error of Http11AprProtocol

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2, 3.0.0
    • Component/s: None
    • Security Level: public (Regular issues)
    • Labels:
      None
    • Environment:

      windows xp sp3
      jdk6

      Description

      1、move three attached files :openssl.exe、tcnative.dll、tcnative_ipv4.dll into C:\WINDOWS\system32
      2、click "gsh.bat" in <geronimo_home>/bin
      3、input geronimo/start-server but the server can't start and it says :

      2009-08-18 13:42:21,859 INFO [Http11AprProtocol] Initializing Coyote HTTP/1.1 on http-8080
      2009-08-18 13:42:21,859 ERROR [Http11AprProtocol] Error initializing endpoint
      java.lang.Exception: Invalid Server SSL Protocol
      at org.apache.tomcat.jni.SSLContext.make(Native Method)
      at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:693)
      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.StandardService.init(StandardService.java:689)
      at org.apache.catalina.core.StandardService.start(StandardService.java:503)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.geronimo.tomcat.TomcatServerGBean.doStart(TomcatServerGBean.java:135)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:948)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:269)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:125)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:538)
      at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:377)
      at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
      at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:190)
      at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:546)
      at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
      at java.lang.reflect.Method.invoke(Method.java:599)
      at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:815)
      at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
      at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
      at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
      at org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$2c2ce3ed.startConfiguration(<generated>)
      at org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:161)
      at org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:78)
      at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
      at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
      at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
      2009-08-18 13:42:21,875 ERROR [StandardService] Service initializing at Catalina failed
      LifecycleException: Protocol handler initialization failed: java.lang.Exception: Invalid Server SSL Protocol
      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.StandardService.init(StandardService.java:689)
      at org.apache.catalina.core.StandardService.start(StandardService.java:503)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.geronimo.tomcat.TomcatServerGBean.doStart(TomcatServerGBean.java:135)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:948)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:269)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:125)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:538)
      at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:377)
      at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
      at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:190)
      at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:546)
      at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
      at java.lang.reflect.Method.invoke(Method.java:599)
      at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:815)
      at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
      at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
      at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
      at org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$2c2ce3ed.startConfiguration(<generated>)
      at org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:161)
      at org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:78)
      at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
      at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
      at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
      2009-08-18 13:42:21,906 INFO [StandardService] Starting service Catalina
      2009-08-18 13:42:21,984 INFO [Http11AprProtocol] Starting Coyote HTTP/1.1 on http-8080
      2009-08-18 13:42:21,984 ERROR [Http11AprProtocol] Error starting endpoint
      java.lang.Exception: Socket bind failed: [730048] ????????????????×??(Э??é/????????/??)????í??????Ρ
      at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:623)
      at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:730)
      at org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:137)
      at org.apache.catalina.connector.Connector.start(Connector.java:1131)
      at org.apache.catalina.core.StandardService.start(StandardService.java:531)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.geronimo.tomcat.TomcatServerGBean.doStart(TomcatServerGBean.java:135)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:948)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:269)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:125)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:538)
      at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:377)
      at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
      at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:190)
      at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:546)
      at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
      at java.lang.reflect.Method.invoke(Method.java:599)
      at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:815)
      at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
      at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
      at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
      at org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$2c2ce3ed.startConfiguration(<generated>)
      at org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:161)
      at org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:78)
      at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
      at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
      at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
      2009-08-18 13:42:22,015 INFO [Http11AprProtocol] Pausing Coyote HTTP/1.1 on http-8080
      2009-08-18 13:42:22,015 INFO [Http11AprProtocol] Pausing Coyote HTTP/1.1 on http-8443
      2009-08-18 13:42:22,015 INFO [Http11AprProtocol] Pausing Coyote HTTP/1.1 on http-8009
      2009-08-18 13:42:23,015 INFO [StandardService] Stopping service Catalina
      2009-08-18 13:42:23,015 INFO [Http11AprProtocol] Stopping Coyote HTTP/1.1 on http-8080
      2009-08-18 13:42:23,281 WARN [MapperListener] Error unregistering MBeanServerDelegate
      java.lang.NullPointerException
      at org.apache.catalina.connector.MapperListener.destroy(MapperListener.java:176)
      at org.apache.catalina.connector.Connector.stop(Connector.java:1179)
      at org.apache.catalina.core.StandardService.stop(StandardService.java:593)
      at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
      at org.apache.geronimo.tomcat.TomcatServerGBean.doStop(TomcatServerGBean.java:139)
      at org.apache.geronimo.tomcat.TomcatServerGBean.doFail(TomcatServerGBean.java:144)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:978)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:269)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:125)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:538)
      at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:377)
      at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
      at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:190)
      at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:546)
      at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
      at java.lang.reflect.Method.invoke(Method.java:599)
      at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:815)
      at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
      at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
      at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
      at org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$2c2ce3ed.startConfiguration(<generated>)
      at org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:161)
      at org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:78)
      at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
      at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
      at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
      2009-08-18 13:42:23,281 INFO [Http11AprProtocol] Stopping Coyote HTTP/1.1 on http-8443
      2009-08-18 13:42:23,296 ERROR [Connector] Coyote connector has not been started
      2009-08-18 13:42:23,296 ERROR [GBeanInstanceState] Error while starting; GBean is now in the FAILED state: abstractName="org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car,j2eeType=GBean,name=TomcatServer"
      LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: java.lang.Exception: Socket bind failed: [730048] ????????????????×??(Э??é/????????/??)????í??????Ρ
      at org.apache.catalina.connector.Connector.start(Connector.java:1138)
      at org.apache.catalina.core.StandardService.start(StandardService.java:531)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.geronimo.tomcat.TomcatServerGBean.doStart(TomcatServerGBean.java:135)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:948)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:269)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:125)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:538)
      at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:377)
      at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
      at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:190)
      at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:546)
      at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
      at java.lang.reflect.Method.invoke(Method.java:599)
      at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:815)
      at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
      at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
      at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
      at org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$2c2ce3ed.startConfiguration(<generated>)
      at org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:161)
      at org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:78)
      at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
      at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
      at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)

      1. apr.7z
        563 kB
        Bin He

        Activity

        Hide
        Shawn Jiang added a comment -

        Closing it.

        Show
        Shawn Jiang added a comment - Closing it.
        Hide
        Ivan added a comment -

        Commit changes to 2.2 At revision: 814548 and trunk At revision: 814547

        Show
        Ivan added a comment - Commit changes to 2.2 At revision: 814548 and trunk At revision: 814547
        Hide
        Bin He added a comment -

        One solution about this problem: Define a Java connector, regardless if the APR library is loaded or not do.So I make some change in <geronimo_home>/var/catalina/server.xml

        <Connector name="TomcatWebSSLConnector" .
        protocol="org.apache.coyote.http11.Http11Protocol"
        port="$

        {HTTPSPort + PortOffset}

        "
        host="$

        {ServerHostname}

        "
        SSLEnabled="true"
        maxThreads="150"
        scheme="https"
        secure="true"
        clientAuth="false"
        keystoreFile="C:/geronimo-tomcat6-javaee5-2.2-SNAPSHOT/var/security/keystores/hebin.keystore"
        keystorePass="changeit"
        sslProtocol="TLS"
        executor="DefaultThreadPool"/>

        Note:
        keystoreFile can be any keystore file you have created or the default keystore. And keystorePass can be the password which related to keystoreFile.

        Show
        Bin He added a comment - One solution about this problem: Define a Java connector, regardless if the APR library is loaded or not do.So I make some change in <geronimo_home>/var/catalina/server.xml <Connector name="TomcatWebSSLConnector" . protocol="org.apache.coyote.http11.Http11Protocol" port="$ {HTTPSPort + PortOffset} " host="$ {ServerHostname} " SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" keystoreFile="C:/geronimo-tomcat6-javaee5-2.2-SNAPSHOT/var/security/keystores/hebin.keystore" keystorePass="changeit" sslProtocol="TLS" executor="DefaultThreadPool"/> Note: keystoreFile can be any keystore file you have created or the default keystore. And keystorePass can be the password which related to keystoreFile.
        Hide
        Shawn Jiang added a comment -

        When there's no APR native lib installed, the https connector should be like this:

        "non-APR https connector in server.xml"
        <Connector 
                   port="8443" minSpareThreads="5" maxSpareThreads="75"
                   enableLookups="true" disableUploadTimeout="true" 
                   acceptCount="100"  maxThreads="200"
                   scheme="https" secure="true" SSLEnabled="true"
                   keystoreFile="${user.home}/.keystore" keystorePass="changeit"
                   clientAuth="false" sslProtocol="TLS"/>
        
        

        When there's APR native lib installed, the https connector should be like this:

        "APR https connector in server.xml"
        <Connector 
                   port="8443" minSpareThreads="5" maxSpareThreads="75"
                   enableLookups="true" disableUploadTimeout="true" 
                   acceptCount="100"  maxThreads="200"
                   scheme="https" secure="true" SSLEnabled="true"
                   SSLCertificateFile="/usr/local/ssl/server.crt" 
                   SSLCertificateKeyFile="/usr/local/ssl/server.pem"
                   clientAuth="false" sslProtocol="TLS"/>
        

        See http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html

        This is a know problem of tomcat, Geronimo changed to server.xml to introduce this problem to geronimo. Two options here:

        1, update document.
        2, update code to determine the connector type by ssl cert attributes of connectors in server.xml.

        Show
        Shawn Jiang added a comment - When there's no APR native lib installed, the https connector should be like this: "non-APR https connector in server.xml" <Connector port= "8443" minSpareThreads= "5" maxSpareThreads= "75" enableLookups= " true " disableUploadTimeout= " true " acceptCount= "100" maxThreads= "200" scheme= "https" secure= " true " SSLEnabled= " true " keystoreFile= "${user.home}/.keystore" keystorePass= "changeit" clientAuth= " false " sslProtocol= "TLS" /> When there's APR native lib installed, the https connector should be like this: "APR https connector in server.xml" <Connector port= "8443" minSpareThreads= "5" maxSpareThreads= "75" enableLookups= " true " disableUploadTimeout= " true " acceptCount= "100" maxThreads= "200" scheme= "https" secure= " true " SSLEnabled= " true " SSLCertificateFile= "/usr/local/ssl/server.crt" SSLCertificateKeyFile= "/usr/local/ssl/server.pem" clientAuth= " false " sslProtocol= "TLS" /> See http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html This is a know problem of tomcat, Geronimo changed to server.xml to introduce this problem to geronimo. Two options here: 1, update document. 2, update code to determine the connector type by ssl cert attributes of connectors in server.xml.

          People

          • Assignee:
            Shawn Jiang
            Reporter:
            Bin He
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development