Is it OK to change the 8888 port in tomcat HTTP connector ?

708 views
Skip to first unread message

Ivan Rotrekl

unread,
Dec 6, 2015, 4:14:23 PM12/6/15
to Lucee
Hi,

would it be save to change the default 8888 port in tomcat  HTTP connector ?

For example like this ( in lucee/tomcat/server.xml) :

from:

<Connector port="8888" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/>

to:

 <Connector port="8889" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/>


I have been struggling with errors in catalina log after each server startup, complaining about failed initialization of the HTTP connector and port 8888 already in use.

Simply changing the port from 8888 to 8889 fixed it nicely:

before:

netstat -ano | find "8888"
  TCP    0.0.0.0:8888           0.0.0.0:0              LISTENING       8972
  TCP    [::]:8888              [::]:0                 LISTENING       8972


after:

netstat -ano | find "8889"
  TCP    0.0.0.0:8889           0.0.0.0:0              LISTENING       8072


So I was wondering,  is it completely valid fix, or could this possibly have any downside or  impact on something else  ?

Regards

Ivan







 
catalina.2015-12-06.txt

Robert Munn

unread,
Dec 7, 2015, 5:00:31 AM12/7/15
to lu...@googlegroups.com
You can use any port not in use on your system. Tomcat by default uses 8080, for instance. Be aware that on *nix systems a process can’t bind ports below 1024 without root privileges.

Just make sure you change the connector config if you are using proxy through Apache/Nginx, etc. 



--
Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/d6108a0e-2205-402e-8298-b002b2cb5930%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<catalina.2015-12-06.txt>

Ivan Rotrekl

unread,
Dec 7, 2015, 6:44:40 AM12/7/15
to Lucee
Thanks a lot. In that case, I will just run it with the port changed.

I am using windows / iis. For some reason, I always get errors in Catalina Log if the port is left at 8888. Strange thing is, that from the netstat test it looks like it is actually the tomcat  process itself which is creating the double binding on the port 8888 but not on different port. I have no idea why it behaves like this.

Regards

Ivan

Brad Wood

unread,
Dec 7, 2015, 11:29:46 AM12/7/15
to Lucee
You probably have another version of Tomcat/Railo/Lucee/ACF running somehwere.  Netstat should give you the process name, though it might just be "java.exe" which isn't very helpful. If you hit port 8888 with Lucee stopped, what responds?  Check all your startup services.  Also note, if you have more than one version of CF/Lucee/Railo running, make sure you change your default stop and AJP (if enabled) ports as well to avoid conflicts there.

Thanks!

~Brad

Ivan Rotrekl

unread,
Dec 7, 2015, 7:18:39 PM12/7/15
to Lucee
Thanks ! At the end I found out that it was actually wrong visualvm configuration blocking the port.  I had in my Java Options line -Dcom.sun.management.jmxremote.port=8888.  When I set the connector back to 8888 and jmxremote.port to something different, everything works. The errors in log are gone and in netstat I can see that  Tomcat is listening also on the jmxremote.port. Well, it somehow makes sense at the end.

Regards

Ivan
Reply all
Reply to author
Forward
0 new messages