Ned Ryerson

Greenhorn
+ Follow
since Mar 05, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ned Ryerson

Well before you config tomcat, you need to bundle the cert & key into the keystore:

of course tomcat password is changeit by default.

then in conf/server.xml

then you can force your app to run only in ssl by adding this to web.xml within your app:
14 years ago
Actually, the server just needed a reboot.

I'm not sure why, I assume maybe it was that I had uninstalled an older tomcat install then installed the new one?

But that's all it took for me.
14 years ago
So I have a gwt app that is composed of 4-5 modules.

So we developed a 'wrapper' app that handles login and passes parameters to each of the module apps (each in gwt/jsp) which display in an iframe. Each app can be accessed by clicking a tab at the top of the iframe.

So far we have 2 GWT modules done and one JSP one done. The JSP app and one of the GWT apps display fine in all browsers in the iframe. For some reason, the 2nd GWT app doesn't display at all, we get a blank screen. The iframe will display any straight html content (if we type "TEST" on the html page for example, it will show) and picks up the css fine... but the gwt content (javascripts / js) isn't displaying.

When right click the iframe, and select "view only this frame", it will display the app just fine.

I theorized it could be a path issue, but I am not sure that is the case since we do not actually set the paths... any hints or tips?

Firefox 3.5+ on mac and pc have this problem. ie 6+, safari and chrome all work fine.
14 years ago
GWT
Wow, that got rid of the error, so thank you for that!!

I still can't access the site at https://mysite.com:8443 though... hmm.

Here is catalina.out with that fix in place... any help is greatly appreciated!

14 years ago
Hmm... I was following the apache instructions here:

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

Under Edit the Tomcat Configuration File

Did I misread what is there? I'll try it now without the first statement, see what happens...
14 years ago
Cool, here it is (keystore pass changed for security)

Thanks!

14 years ago
Hi, yeah I tried that and the port frees up when tomcat is stopped. Only one instance of tomcat exists...

Hence why this is strange!

I'm really not sure where to go from here.
14 years ago
Most people had a genuine server port conflict, I took steps to see if that was my issue, and it is not.

So yes, it is an atypical question as far as I can see...

Unless I missed where someone checked for port conflict, found that not to be the issue, then resolved it in some other way??

Thanks!
14 years ago
I promise, this isn't a request for some hand holding / instructions on how to get and install a cert.

In fact I am well past that point, I generated the keystore.tomcat file, joined it with the cert bundle from godaddy, successfully configured server.xml to point to it and now get no errors on startup related to any of the ssl with ONE exception!

I get this error in catalina.out:

Mar 19, 2010 6:42:57 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 19, 2010 6:42:57 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
Mar 19, 2010 6:42:57 AM org.apache.coyote.http11.Http11Protocol start
SEVERE: Error starting endpoint
java.net.BindException: Address already in use <null>:8443
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:549)
at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:565)
at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:203)
at org.apache.catalina.connector.Connector.start(Connector.java:1080)
at org.apache.catalina.core.StandardService.start(StandardService.java:531)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:141)
at javax.net.ssl.SSLServerSocket.<init>(SSLServerSocket.java:84)
at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.<init>(SSLServerSocketImpl.java:79)
at com.sun.net.ssl.internal.ssl.SSLServerSocketFactoryImpl.createServerSocket(SSLServerSocketFactoryImpl.java:65)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:131)
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
... 12 more
Mar 19, 2010 6:42:57 AM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: java.net.BindException: Address already in use <null>:8443
at org.apache.catalina.connector.Connector.start(Connector.java:1087)
at org.apache.catalina.core.StandardService.start(StandardService.java:531)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Mar 19, 2010 6:42:57 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2281 ms



clearly it thinks there is a conflict on the port 8443. When I use various tools (netstat, nmap) to check the port, it shows it's being used by the PID for tomcat... and yet when i go to https://mywebsite:8443 it sits and loads till it times out.

When I go to http://mywebsite.com:8080 I do see the splash page.

So then I thought maybe there is a conflict with my webserver... so I shut the webserver down, restarted tomcat... no change. So then I thought maybe it didn't like me starting up on 8080 and 8443 at the same time? So I commented 8080 out, and restarted tomcat... No change (except 8080 doesnt work of course).

Any help??
14 years ago
To change the port, edit the server.xml file in /conf

for example:

you will see


to change it to port 8090:

14 years ago
Also, when I do a
$ netstat -vatn

I get
tcp 0 0 :::8080 :::* LISTEN

Does this mean the port is open or...?

so I did an nmap on localhost:


doesnt look like a port conflict to me. I even changed the port from 8080 to 8090, then to 8008, and no difference.

14 years ago
Hi All,

I have installed Tomcat at least a half dozen times on various RHEL5 boxes.

In the past I have literally just copied the tar.gz into /usr/share (where we keep all our instances, not /var/lib like i know many others do), unpacked it and then started it up (/bin/startup.sh).

It usually runs without a hitch, as-is and when i go to http://(MY.IP.ADDRESS):8080, I get the manager, and then can start dragging my applications into /webapps and be done with it.

Right now I have a very strange case on my hands. I did the above on a rhel5 server, and start it.

In terminal, it shows normal startup:


and catalina.out shows



As you can see, no significant error (at least in my estimation) occurs. But when I go to 8080, it just sits loading until it times out.

Also, if i grep for it in the ps list I get



So it IS running as far as all indications would say.

Can someone give me a some tips or hints on where to look next?
14 years ago