tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Soloschenko <tobiassolosche...@googlemail.com>
Subject Re: Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4
Date Mon, 04 Apr 2016 08:49:31 GMT
Hi,

I just figured out that this issue might depend on the file names of APR
1.5.2 - if I create links in the lib folder that reflects the names of
1.4.8 - tomcat throws an exception that the version of APR can not be
resolved:

ln -s libapr-1.0.dylib libtcnative-1.0.dylib

ln -s libapr-1.a libtcnative-1.a

ln -s libapr-1.dylib libtcnative-1.dylib

ln -s libapr-1.la libtcnative-1.la


Exception:

04-Apr-2016 10:42:39.579 WARNING [main]
org.apache.catalina.core.AprLifecycleListener.init The APR based Apache
Tomcat Native library failed to load. The error reported was
[org.apache.tomcat.jni.Library.version(I)I]

 java.lang.UnsatisfiedLinkError: org.apache.tomcat.jni.Library.version(I)I

at org.apache.tomcat.jni.Library.version(Native Method)

at org.apache.tomcat.jni.Library.initialize(Library.java:181)

at
org.apache.catalina.core.AprLifecycleListener.init(AprLifecycleListener.java:198)

at
org.apache.catalina.core.AprLifecycleListener.isAprAvailable(AprLifecycleListener.java:107)

at org.apache.catalina.connector.Connector.setProtocol(Connector.java:587)

at org.apache.catalina.connector.Connector.<init>(Connector.java:70)

at
org.apache.catalina.startup.ConnectorCreateRule.begin(ConnectorCreateRule.java:64)

at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1188)

at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)

at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)

at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1344)

at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2787)

at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)

at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)

at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)

at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)

at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)

at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)

at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)

at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1461)

at org.apache.catalina.startup.Catalina.load(Catalina.java:578)

at org.apache.catalina.startup.Catalina.load(Catalina.java:629)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:497)

at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:311)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)


kind regards

Tobias


2016-04-03 12:17 GMT+02:00 Mark Thomas <markt@apache.org>:

> On 3 April 2016 04:29:40 BST, Tobias Soloschenko <
> tobiassoloschenko@googlemail.com> wrote:
> >Hi,
> >
> >I am trying to get http/2 working on Mac OS X 10.11.4 - these are the
> >steps I used:
> >
> >1. Install Brew: http://brew.sh/
> >
> >2. Download Apache Tomcat 9 https://tomcat.apache.org/download-90.cgi
> >
> >3. Download Xcode command line tools by opening the terminal and
> >execute “xcode-select  —install”
> >
> >4. Download Xcode from the AppStore
> >
> >5. Create a symlink for the xctoolchain:
> >
> >sudo ln -s
>
> >/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
> >/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.11.xctoolchain
> >
> >6. Install APR and OPENSSL with “brew install openssl” and “brew
> >install apr”
> >
> >7. Install tomcat native by extracting bin/tomcat-native.tar.gz and run
> >“./configure --with-ssl=/usr/local/Cellar/openssl/1.0.2g
> >--prefix=/Applications/apache-tomcat-9.0.0.M4
> >--with-apr=/usr/local/Cellar/apr/1.5.2 && make && make install”
in
> >tomcat-native-1.2.5-src/native - see
> >
> >https://tomcat.apache.org/tomcat-9.0-doc/apr.html
>
>
> Do this one step at a time and check the results - particularly for
> configure. The start up messages suggest the wrong APR version was picked
> up and no OpenSSL version was found.
>
> Mark
>
>
> >8. export JAVA_OPTS=-Djava.library.path=/usr/local/apr/lib
> >
> >9. Create pem files in conf folder:
> >
> >/usr/local/Cellar/openssl/1.0.2g/bin/openssl genrsa -des3 -out
> >localhost-rsa-key 1024
> >
> >/usr/local/Cellar/openssl/1.0.2g/bin/openssl genrsa -out localhost-key
> >1024
> >
> >/usr/local/Cellar/openssl/1.0.2g/bin/openssl rsa -in localhost-rsa-key
> >-out localhost-key
> >
> >/usr/local/Cellar/openssl/1.0.2g/bin/openssl req -new -key
> >localhost-key -out localhost-csr
> >
> >/usr/local/Cellar/openssl/1.0.2g/bin/openssl x509 -req -days 365 -in
> >localhost-csr -signkey localhost-key -out localhost-crt
> >
> >cat localhost-key localhost-crt > localhost-rsa-cert.pem
> >
> >cat localhost-rsa-cert.pem > localhost-rsa-chain.pem
> >
> >cat localhost-rsa-key > localhost-rsa-key.pem
> >
> >10. Uncomment the http/2 connector in the server.xml
> >
> >
> >
> >I am currently facing those issues (out of the log):
> >
> >
> >
> >02-Apr-2016 09:15:13.415 INFO [main]
> >org.apache.catalina.startup.VersionLoggerListener.log Command line
> >argument: -Djava.io.tmpdir=/Applications/apache-tomcat-9.0.0.M4/temp
> >
> >02-Apr-2016 09:15:13.415 INFO [main]
> >org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR
> >based Apache Tomcat Native library 1.2.5 using APR version 1.4.8.
> >
> >02-Apr-2016 09:15:13.415 INFO [main]
> >org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR
> >capabilities: IPv6 [true], sendfile [true], accept filters [false],
> >random [true].
> >
> >02-Apr-2016 09:15:13.418 SEVERE [main]
> >org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Failed to
> >initialize the SSLEngine.
> >
> >org.apache.tomcat.jni.Error: 70023: This function has not been
> >implemented on this platform
> >
> >at org.apache.tomcat.jni.SSL.initialize(Native Method)
> >
> >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
> >at
>
> >sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> >
> >at
>
> >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >
> >at java.lang.reflect.Method.invoke(Method.java:497)
> >
> >at
>
> >org.apache.catalina.core.AprLifecycleListener.initializeSSL(AprLifecycleListener.java:284)
> >
> >at
>
> >org.apache.catalina.core.AprLifecycleListener.lifecycleEvent(AprLifecycleListener.java:136)
> >
> >at
>
> >org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
> >
> >at
>
> >org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401)
> >
> >at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:104)
> >
> >at org.apache.catalina.startup.Catalina.load(Catalina.java:606)
> >
> >at org.apache.catalina.startup.Catalina.load(Catalina.java:629)
> >
> >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
> >at
>
> >sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> >
> >at
>
> >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >
> >at java.lang.reflect.Method.invoke(Method.java:497)
> >
> >at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:311)
> >
> >at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
> >
> >
> >
> >02-Apr-2016 09:15:13.655 INFO [main]
> >org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
> >["http-nio-8080"]
> >
> >02-Apr-2016 09:15:13.683 INFO [main]
> >org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a
> >shared selector for servlet write/read
> >
> >02-Apr-2016 09:15:13.686 INFO [main]
> >org.apache.coyote.http11.AbstractHttp11Protocol.configureUpgradeProtocol
> >The ["https-apr-8443"] connector has been configured to support
> >negotiation to [h2] via ALPN
> >
> >02-Apr-2016 09:15:13.686 INFO [main]
> >org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
> >["https-apr-8443"]
> >
> >02-Apr-2016 09:15:13.706 WARNING [main]
> >org.apache.tomcat.util.net.openssl.OpenSSLEngine.<clinit> Failed
> >getting cipher list
> >
> > java.lang.Exception: Not implemented
> >
> >at org.apache.tomcat.jni.SSL.newSSL(Native Method)
> >
> >at
>
> >org.apache.tomcat.util.net.openssl.OpenSSLEngine.<clinit>(OpenSSLEngine.java:81)
> >
> >at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:363)
> >
> >at
>
> >org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:798)
> >
> >at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:547)
> >
> >at
>
> >org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:66)
> >
> >at
> >org.apache.catalina.connector.Connector.initInternal(Connector.java:1010)
> >
> >at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
> >
> >at
>
> >org.apache.catalina.core.StandardService.initInternal(StandardService.java:549)
> >
> >at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
> >
> >at
>
> >org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:873)
> >
> >at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
> >
> >at org.apache.catalina.startup.Catalina.load(Catalina.java:606)
> >
> >at org.apache.catalina.startup.Catalina.load(Catalina.java:629)
> >
> >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
> >at
>
> >sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> >
> >at
>
> >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >
> >at java.lang.reflect.Method.invoke(Method.java:497)
> >
> >at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:311)
> >
> >at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
> >
> >
> >Any idea? step 9 might be wrong - I never created self signed certs /
> >pems before
> >
> >Additional note: I am using jdk1.8.0_66.jdk
> >
> >Assumption: It might be that the wrong version of ssl is used and not
> >the one out of: /usr/local/Cellar/openssl/1.0.2g
> >
> >kind regards
> >
> >Tobias
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message