Re: Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4
Hi, short update: I got HTTP/2 with Apache Wicket running on Jetty, now. Sadly I couldn't solve the issues with Tomcat. :-( kind regards Tobias > Am 05.04.2016 um 05:00 schrieb Christopher Schultz >: > > Tobias, > >> On 4/4/16 4:49 AM, Tobias Soloschenko wrote: >> 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] > > That wasn't going to work. > > APR and tcnative are different libraries. Copying one to the other is > about as useful as trying to load your /etc/passwd file as a shared library. > > When you set JAVA_OPTS: > >> "export >> JAVA_OPTS=-Djava.library.path=/usr/local/Cellar/apr/1.5.2/libexec/lib" >> >> but Tomcat can not find it at this location. > > How did you start Tomcat after that? What files are in > .../1.5.2/libexec/lib? What is in your "TCNATIVE_PRIV_INCLUDES" > directory? Where do you configure that for loading into Tomcat? > > -chris > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4
Any other hints? kind regards Tobias > Am 05.04.2016 um 05:00 schrieb Christopher Schultz >: > > Tobias, > >> On 4/4/16 4:49 AM, Tobias Soloschenko wrote: >> 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] > > That wasn't going to work. > > APR and tcnative are different libraries. Copying one to the other is > about as useful as trying to load your /etc/passwd file as a shared library. > > When you set JAVA_OPTS: > >> "export >> JAVA_OPTS=-Djava.library.path=/usr/local/Cellar/apr/1.5.2/libexec/lib" >> >> but Tomcat can not find it at this location. > > How did you start Tomcat after that? What files are in > .../1.5.2/libexec/lib? What is in your "TCNATIVE_PRIV_INCLUDES" > directory? Where do you configure that for loading into Tomcat? > > -chris > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4
I missed to answer some of the other questions: 1. I start tomcat with the startup.sh 2. The files in the ../1.5.2/libexec/lib can be derived from the ln -s commands (see below) 3. TCNATIVE_PRIV_INCLUDES is default I didn't changed here anything. 4. I posted a step by step guide - I think if I run configure with the args "--prefix=" the native libraries are placed into the lib folder. kind regards Tobias > Am 05.04.2016 um 05:00 schrieb Christopher Schultz >: > > Tobias, > >> On 4/4/16 4:49 AM, Tobias Soloschenko wrote: >> 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] > > That wasn't going to work. > > APR and tcnative are different libraries. Copying one to the other is > about as useful as trying to load your /etc/passwd file as a shared library. > > When you set JAVA_OPTS: > >> "export >> JAVA_OPTS=-Djava.library.path=/usr/local/Cellar/apr/1.5.2/libexec/lib" >> >> but Tomcat can not find it at this location. > > How did you start Tomcat after that? What files are in > .../1.5.2/libexec/lib? What is in your "TCNATIVE_PRIV_INCLUDES" > directory? Where do you configure that for loading into Tomcat? > > -chris > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4
Hi > Am 05.04.2016 um 05:00 schrieb Christopher Schultz >: > > Tobias, > >> On 4/4/16 4:49 AM, Tobias Soloschenko wrote: >> 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] > > That wasn't going to work. > > APR and tcnative are different libraries. Copying one to the other is > about as useful as trying to load your /etc/passwd file as a shared library. I don't mix the libraries. I had a look into the apr version installed by default /usr/local/apr/lib (1.4.8) and the files in that directory are named that way - so I linked those of APR 1.5.8 the same - then tomcat greps them up and try to find the version which causes the exception. > > When you set JAVA_OPTS: > >> "export >> JAVA_OPTS=-Djava.library.path=/usr/local/Cellar/apr/1.5.2/libexec/lib" >> >> but Tomcat can not find it at this location. > > How did you start Tomcat after that? What files are in > .../1.5.2/libexec/lib? What is in your "TCNATIVE_PRIV_INCLUDES" > directory? Where do you configure that for loading into Tomcat? > As you can see in my first post (the log extract) tomcat uses the folder as expected, because when I switch to /usr/local/apr/lib it takes 1.4.8 - but this does not work for 1.5.2. > -chris > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > kind regards Tobias - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4
Tobias, On 4/4/16 4:49 AM, Tobias Soloschenko wrote: > 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] That wasn't going to work. APR and tcnative are different libraries. Copying one to the other is about as useful as trying to load your /etc/passwd file as a shared library. When you set JAVA_OPTS: > "export > JAVA_OPTS=-Djava.library.path=/usr/local/Cellar/apr/1.5.2/libexec/lib" > > but Tomcat can not find it at this location. How did you start Tomcat after that? What files are in .../1.5.2/libexec/lib? What is in your "TCNATIVE_PRIV_INCLUDES" directory? Where do you configure that for loading into Tomcat? -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4
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.(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: > On 3 April 2016 04:29:40 BST, Tobias Soloschenko < > tobiassolosche...@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 > > >
Re: Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4
One thing I made wrong was "export JAVA_OPTS=-Djava.library.path=/usr/local/apr/lib" which is 1.4.8 the path to the new version installed with brew is "export JAVA_OPTS=-Djava.library.path=/usr/local/Cellar/apr/1.5.2/libexec/lib" but Tomcat can not find it at this location. I also tried to download APR 1.5.2 and install it by myself: ./configure.sh --prefix="/usr/local/apr_1.5.2" make make test make install but even if I use this folder in the library path Tomcat can't detect it: "export JAVA_OPTS=-Djava.library.path=/usr/local/apr_1.5.2/lib" Any idea what's the problem? kind regards Tobias 2016-04-03 12:17 GMT+02:00 Mark Thomas: > On 3 April 2016 04:29:40 BST, Tobias Soloschenko < > tobiassolosche...@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 > >
Re: Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4
I am going to contribute a step by step guide to the documentation (only for developers) when I got it working for me. kind regards Tobias > Am 03.04.2016 um 22:09 schrieb Terence M. Bandoian: > >> On 4/2/2016 10:29 PM, Tobias Soloschenko 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 >> >> 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 > > > Is this procedure included in the Tomcat documentation? Seems like it would > be useful if it isn't. > > Thanks. > > -Terence Bandoian > http://www.tmbsw.com/ > > >> >> 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
Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4
On 4/2/2016 10:29 PM, Tobias Soloschenko 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 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 Is this procedure included in the Tomcat documentation? Seems like it would be useful if it isn't. Thanks. -Terence Bandoian http://www.tmbsw.com/ 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. Failed getting cipher list java.lang.Exception: Not implemented at org.apache.tomcat.jni.SSL.newSSL(Native Method) at
Re: Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4
Ok I run it again - here are the results: ./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 checking build system type... x86_64-apple-darwin15.4.0 checking host system type... x86_64-apple-darwin15.4.0 checking target system type... x86_64-apple-darwin15.4.0 checking for a BSD-compatible install... /usr/bin/install -c checking for working mkdir -p... yes Tomcat Native Version: 1.2.5 checking for chosen layout... tcnative checking for APR... yes configure: APR 1.5.2 detected. setting CC to "clang" setting CPP to "clang -E" adding "-I/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/include" to TCNATIVE_PRIV_INCLUDES checking for JDK os include directory... darwin adding "-I/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/include/darwin" to TCNATIVE_PRIV_INCLUDES checking for gcc... clang checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether clang accepts -g... yes checking for clang option to accept ISO C89... none needed checking for OpenSSL library... using openssl from /usr/local/Cellar/openssl/1.0.2g/lib and /usr/local/Cellar/openssl/1.0.2g/include checking OpenSSL library version >= 1.0.2... ok checking for OpenSSL DSA support... yes adding "-I/usr/local/Cellar/openssl/1.0.2g/include" to TCNATIVE_PRIV_INCLUDES setting TCNATIVE_LDFLAGS to "-L/usr/local/Cellar/openssl/1.0.2g/lib -lssl -lcrypto" adding "-DHAVE_OPENSSL" to CFLAGS setting TCNATIVE_LIBS to "" setting TCNATIVE_LIBS to " /usr/local/Cellar/apr/1.5.2/libexec/lib/ libapr-1.la -lpthread" checking for apr_pollset_wakeup in -lapr-1... yes adding "-DHAVE_POLLSET_WAKEUP" to CFLAGS configure: creating ./config.status config.status: creating tcnative.pc config.status: creating Makefile config.status: executing default commands make[1]: Nothing to be done for `local-all'. make[1]: Nothing to be done for `local-all'. /usr/local/Cellar/apr/1.5.2/libexec/build-1/mkdir.sh /Applications/apache-tomcat-9.0.0.M4/include/apr-1 /Applications/apache-tomcat-9.0.0.M4/lib/pkgconfig \ /Applications/apache-tomcat-9.0.0.M4/lib /Applications/apache-tomcat-9.0.0.M4/bin /usr/bin/install -c -m 644 tcnative.pc /Applications/apache-tomcat-9.0.0.M4/lib/pkgconfig/tcnative-1.pc list=''; for i in $list; do \ ( cd $i ; /Applications/Xcode.app/Contents/Developer/usr/bin/make DESTDIR= install ); \ done /bin/sh /usr/local/Cellar/apr/1.5.2/libexec/build-1/libtool --mode=install /usr/bin/install -c -m 755 libtcnative-1.la /Applications/apache-tomcat-9.0.0.M4/lib libtool: install: /usr/bin/install -c -m 755 .libs/libtcnative-1.0.dylib /Applications/apache-tomcat-9.0.0.M4/lib/libtcnative-1.0.dylib libtool: install: (cd /Applications/apache-tomcat-9.0.0.M4/lib && { ln -s -f libtcnative-1.0.dylib libtcnative-1.dylib || { rm -f libtcnative-1.dylib && ln -s libtcnative-1.0.dylib libtcnative-1.dylib; }; }) libtool: install: /usr/bin/install -c -m 755 .libs/libtcnative-1.lai /Applications/apache-tomcat-9.0.0.M4/lib/libtcnative-1.la libtool: install: /usr/bin/install -c -m 755 .libs/libtcnative-1.a /Applications/apache-tomcat-9.0.0.M4/lib/libtcnative-1.a libtool: install: chmod 644 /Applications/apache-tomcat-9.0.0.M4/lib/libtcnative-1.a libtool: install: ranlib /Applications/apache-tomcat-9.0.0.M4/lib/libtcnative-1.a In this step the right versions are used > APR 1.5.2 / OpenSSL 1.0.2g Don't know why Tomcat detects APR 1.4.8 then. Is there a setting where Tomcat try to resolve the APR path? kind regards Tobias 2016-04-03 12:17 GMT+02:00 Mark Thomas: > On 3 April 2016 04:29:40 BST, Tobias Soloschenko < > tobiassolosche...@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 -
Re: Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4
Thanks - I am going to try it out. kind regards Tobias > Am 03.04.2016 um 12:17 schrieb Mark Thomas: > >> On 3 April 2016 04:29:40 BST, Tobias Soloschenko >> 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
Re: Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4
On 3 April 2016 04:29:40 BST, Tobias Soloschenkowrote: >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]
Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4
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 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. 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.(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