LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-06-2015, 02:05 AM   #1
jobart08
Member
 
Registered: Sep 2014
Posts: 74

Rep: Reputation: Disabled
Apache Tomcat 8 issues


Hi all,

I have a running Tomcat 8.0.15 using port 443. I tried installing Tomcat 8.0.24 to use port 443 but I cannot access the manager page. I already shutdown Tomcat 8.0.15 so that I can use port 443. I have checked the server.xml and they are the same on both Tomcat versions except for the path, but still not working.

What am I missing?
 
Old 08-06-2015, 10:08 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by jobart08 View Post
Hi all,

I have a running Tomcat 8.0.15 using port 443. I tried installing Tomcat 8.0.24 to use port 443 but I cannot access the manager page. I already shutdown Tomcat 8.0.15 so that I can use port 443. I have checked the server.xml and they are the same on both Tomcat versions except for the path, but still not working.

What am I missing?
Check the catalina.out logfile to see if you find something.
My guess is that you miss the ssl certificate/key
 
Old 08-06-2015, 07:59 PM   #3
jobart08
Member
 
Registered: Sep 2014
Posts: 74

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Check the catalina.out logfile to see if you find something.
My guess is that you miss the ssl certificate/key
Hi,

Im using the same .jks file from the 8.0.15 version. The older version works. But the 8.0.24 version is not working. Here is the server.xml content.

<Connector
port="443"
protocol="HTTP/1.1"
SSLEnabled="true"
maxThreads="150"
scheme="https"
secure="true"
keystoreFile="/home/tomcat8/apache-tomcat-8.0.15/conf/xxxfilexxx.jks"
keystorePass="changeit"
clientAuth="false"
sslProtocols="TLSv1,SSLv2Hello"
ciphers="SSL_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA" />
 
Old 08-07-2015, 01:38 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Im using the same .jks file from the 8.0.15 version. The older version works. But the 8.0.24 version is not working.
Once again, you should check the logs to find the problem.
Try to start tomcat on one terminal, while on another terminal you run
Code:
tail -f /path/to/tomcat-8.0.24/logs/catalina.out
 
Old 08-07-2015, 02:34 AM   #5
jobart08
Member
 
Registered: Sep 2014
Posts: 74

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Once again, you should check the logs to find the problem.
Try to start tomcat on one terminal, while on another terminal you run
Code:
tail -f /path/to/tomcat-8.0.24/logs/catalina.out
Hi. Thanks for the response.

Here is what Im seeing in the logs.

Code:
SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["http-nio-443"]
 java.net.SocketException: Permission denied
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Net.java:436)
        at sun.nio.ch.Net.bind(Net.java:428)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
        at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:339)
        at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:737)
        at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:457)
        at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120)
        at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        at org.apache.catalina.core.StandardService.initInternal(StandardService.java:567)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:851)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:576)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:599)
        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:483)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)

07-Aug-2015 15:24:13.076 SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[HTTP/1.1-443]]
 org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-443]]
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
        at org.apache.catalina.core.StandardService.initInternal(StandardService.java:567)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:851)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:576)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:599)
        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:483)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
        at org.apache.catalina.connector.Connector.initInternal(Connector.java:962)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        ... 12 more
Caused by: java.net.SocketException: Permission denied
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Net.java:436)
        at sun.nio.ch.Net.bind(Net.java:428)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
        at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:339)
        at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:737)
        at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:457)
        at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120)
        at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
        ... 13 more
 
Old 08-07-2015, 07:24 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["http-nio-443"]
java.net.SocketException: Permission denied
<snip>
Is this the 1st error you get when starting tomcat, or are there others before that?
If it's the 1st error, then my guess is that you're trying to start tomcat an a regular user (not root), that's why you get a permission denied error opening port 443. Not privileged users cannot open ports below 1024
Or if you're doing that as root, then you're maybe running a distro (like RHEL) that uses SELinux, also preventing opening ports for applications not registered with SELinux
 
Old 08-12-2015, 02:22 AM   #7
jobart08
Member
 
Registered: Sep 2014
Posts: 74

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Is this the 1st error you get when starting tomcat, or are there others before that?
If it's the 1st error, then my guess is that you're trying to start tomcat an a regular user (not root), that's why you get a permission denied error opening port 443. Not privileged users cannot open ports below 1024
Or if you're doing that as root, then you're maybe running a distro (like RHEL) that uses SELinux, also preventing opening ports for applications not registered with SELinux
Hi, Im running tomcat as tomcat8 user via authbind. We were able to make it run using port 8443, but I need to use 443 as it is the port that was opened on the network for the application.

Thanks for your response.
 
Old 08-12-2015, 07:19 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by jobart08 View Post
Hi, Im running tomcat as tomcat8 user via authbind. We were able to make it run using port 8443, but I need to use 443 as it is the port that was opened on the network for the application.

Thanks for your response.
If you want tomcat listen on port 443, then you should start is as root (or use sudo)
 
Old 08-12-2015, 08:54 PM   #9
jobart08
Member
 
Registered: Sep 2014
Posts: 74

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
If you want tomcat listen on port 443, then you should start is as root (or use sudo)
Yes, but we are running it using authbind command.

authbind --deep /home/tomcat8/apache-tomcat-8.0.24/bin/startup.sh

It is working on the 8.0.15 version.
 
Old 08-13-2015, 12:56 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by jobart08 View Post
Yes, but we are running it using authbind command.

authbind --deep /home/tomcat8/apache-tomcat-8.0.24/bin/startup.sh

It is working on the 8.0.15 version.
Never used authbind, so I cannot tell what the problem is. Anyway, check this to see if it helps.
And since it's clearly a permissions issue, are you sure you're not running a SELinux enabled distro?
 
Old 08-13-2015, 01:11 AM   #11
jobart08
Member
 
Registered: Sep 2014
Posts: 74

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Never used authbind, so I cannot tell what the problem is. Anyway, check this to see if it helps.
And since it's clearly a permissions issue, are you sure you're not running a SELinux enabled distro?
Running a Debian Wheezy system.

Will check the link.

Thank you for your response.
 
  


Reply

Tags
tomcat



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connectivity issues between Tomcat 6.0.35 and Apache 2.2 Web Server troubledhoster Linux - Software 4 01-15-2012 08:56 AM
Session replication using apache+mod_jk+tomcat(5.5.28-veriosn of tomcat) sreejithp Linux - Server 1 12-24-2010 06:46 AM
Apache Web Server + Tomcat 6 issues tpe Linux - Server 12 01-18-2010 03:11 AM
Apache Tomcat 5.5 install issues. brave heart Red Hat 4 08-05-2007 09:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration