You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by millerKiller <sm...@hotmail.com> on 2010/02/12 19:43:16 UTC
Socket Error in tomcat, white screen in browser
I am having a problem a strange problem in my Tomcat application. Before I
get started then here is my system information:
- Eclipse 3.4.2
- apache-tomcat-6.0.20
It used to work, but now it doesn't. The problem is when I try to view my
tomcat pages in my browser then it goes straight to a white screen. Tomcat
appears to be starting, but it lists some problems before starting. Here is
what my console says:
Feb 12, 2010 10:47:44 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: C:\Program
Files\Java\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program
Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\Program
Files\Common Files\Microsoft Shared\Windows
Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\MinGW\bin;C:\Program
Files\QuickTime\QTSystem\C:\Program Files\QuickTime\QTSystem\;C:\Program
Files\Java\jdk1.6.0_17\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program
Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Nmap
Feb 12, 2010 10:47:44 AM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at
org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:50)
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:503)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
at
org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:535)
at org.apache.catalina.startup.Catalina.load(Catalina.java:555)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
Feb 12, 2010 10:47:44 AM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException: Protocol handler initialization failed:
java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind
at org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
at
org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:535)
at org.apache.catalina.startup.Catalina.load(Catalina.java:555)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
Feb 12, 2010 10:47:44 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 503 ms
Feb 12, 2010 10:47:44 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Feb 12, 2010 10:47:44 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
Feb 12, 2010 10:47:45 AM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(C:\Users\Steven\EclipseWorkSpaces\TomcatWorkspace\workspace\ps1-semiller\WEB-INF\lib\servlet-api.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
Feb 12, 2010 10:47:45 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive standard-examples.war
Feb 12, 2010 10:47:45 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Feb 12, 2010 10:47:45 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Feb 12, 2010 10:47:45 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.catalina.Registry',
'org.apache.tomcat.util.modeler.Registry@189c12a')
Feb 12, 2010 10:47:45 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.catalina.MBeanServer',
'com.sun.jmx.mbeanserver.JmxMBeanServer@e8c7db')
Feb 12, 2010 10:47:45 AM org.apache.coyote.http11.Http11Protocol start
SEVERE: Error starting endpoint
java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at
org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:50)
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:503)
at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:526)
at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:203)
at org.apache.catalina.connector.Connector.start(Connector.java:1131)
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:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Feb 12, 2010 10:47:45 AM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException: service.getName(): "Catalina"; Protocol handler start
failed: java.net.SocketException: Unrecognized Windows Sockets error: 0:
JVM_Bind
at org.apache.catalina.connector.Connector.start(Connector.java:1138)
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:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Feb 12, 2010 10:47:45 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1144 ms
Feb 12, 2010 10:51:06 AM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
I can't even go into the tomcat manager anymore! It appears that it might
be a socket binding error. I am currently taking a graduate security class
where they have us download and try out port scanners. Some of the ones I
have used include Nessus, Nmap, etc... They are not running though when I
get this error. I don't know if this has anything to do with it.
Additional information that might be helpful in solving the problem is when
I right click on my project in eclipse and go to Tomcat Project->Reload this
context then I am presented with the following error:
Operation failed
the following url was used:
http://localhost:80/manager/reload?path=/FMS2
Check manager app settings (username and password)
see<workspace>/.metadata/.log file
Here is what the log file shows:
!ENTRY com.sysdeo.eclipse.tomcat 4 4 2010-02-12 11:38:03.602
!MESSAGE java.lang.Exception: The following url was used :
http://localhost:80/manager/reload?path=/FMS2
Check manager app settings (username and password)
at
com.sysdeo.eclipse.tomcat.actions.RestartContextActionDelegate.doActionOn(RestartContextActionDelegate.java:40)
at
com.sysdeo.eclipse.tomcat.actions.TomcatProjectAbstractActionDelegate.run(TomcatProjectAbstractActionDelegate.java:48)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
One last wierd thing about it to mention is in my browser then as long as I
type
http://localhost/
at the first of the url then I can type anything afterwards and it won't
error out. It will stay at a white screen. Example: if I type
http://localhost/asdfjasdfasdfasd then it doesn't have any problem with it.
I don't understand, my tomcat was working last week just fine and now it is
acting weird? Is there anyone that can help me figure it out?
--
View this message in context: http://old.nabble.com/Socket-Error-in-tomcat%2C-white-screen-in-browser-tp27567722p27567722.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Socket Error in tomcat, white screen in browser
Posted by Ken Bowen <kb...@als.com>.
Note that http://wiki.eclipse.org/WTP_Tomcat_FAQ has gobs of
(sometimes opaque) information about Eclipse and Tomcat. If you
configure Eclipse to use an external (separate) Tomcat, it uses the
external Tomcat , but at minimum, distorts the logging configuration
to just run catalina.out through its console. If you need to dig in
to a custom launch configuration for Tomcat under Eclipse, the FAQ
above has entries about that.
On Feb 13, 2010, at 6:19 PM, millerKiller wrote:
>
>
>
>> No - it shows that *something* is listening on 8005, but it's not
>> likely to
> be Tomcat. Use the Task Manager to find out what PID 520 is. As I
> mentioned before, lots of products have Tomcat embedded in them, and
> at
> least one (VMware) leaves the shutdown port set to the default,
> creating
> difficulty for anyone trying to run an out-of-the-box Tomcat.
>
>> Something *is* using 8005, which will interfere with a Tomcat
>> configured
> with the default shutdown port.
>
>> And again, be wary of running Tomcat under Eclipse, since Eclipse
>> likes to
> use its own Tomcat configuration, not the one you thing you've set up.
>
> The wierd thing about all of this is whenever I shut my tomcat down
> then the
> 127.0.0.1:8005 dissapears from the netstat list. This leads me to
> believe
> that it is Tomcat which is using this. This also leads me to
> believe there
> is something funky with eclipse's setup with Tomcat. Maybe the best
> solution is to reinstall it? (I need to use it under eclipse for the
> application I am creating JavaServlets/JSPs) If Eclipse uses its own
> settings, then how do I make it use Tomcat's or vice versa or is
> there a
> manual on this specific problem with eclipse and Tomcat getting
> confused
> with one anothers configuration settings?
>
> --
> View this message in context: http://old.nabble.com/Socket-Error-in-tomcat%2C-white-screen-in-browser-tp27567722p27579543.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Socket Error in tomcat, white screen in browser
Posted by millerKiller <sm...@hotmail.com>.
Maybe I should move this to the eclipse forums. Before I go though, then
could we finish up with a few more things that I found and see if anyone
knows?
I looked at my netstat and saw the following:
127.0.0.1:2402 127.0.0.1:2403 Established 4360
127.0.0.1:2403 127.0.0.1:2402 Established 3140
127.0.0.1:8005 0.0.0.0:0 Listening 3140
This only appears when I start Tomcat in eclipse. It looks to me like 2402
and 2403 are connected to each other through PID 4360. 8005 then attempts
to connect, but PID 3140 is allready being used. Is this look like the
problem? If it is, then what can I do to fix it?
In the task manager then PID 3140 is javaw.exe and PID 4360 is eclipse.exe.
When I kill either of these then they dont appear in netstat anymore. any
ideas?
--
View this message in context: http://old.nabble.com/Socket-Error-in-tomcat%2C-white-screen-in-browser-tp27567722p27579882.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Socket Error in tomcat, white screen in browser
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: millerKiller [mailto:smille89_k@hotmail.com]
> Subject: RE: Socket Error in tomcat, white screen in browser
>
> The wierd thing about all of this is whenever I shut my tomcat down
> then the 127.0.0.1:8005 dissapears from the netstat list.
Again, use Task Manager to verify - you don't need to guess. Does netstat show any other ports used by that PID?
> This also leads me to believe there is something funky with
> eclipse's setup with Tomcat.
As we've been saying. Personally, I never run Tomcat under an IDE because I don't want to introduce another layer of complication (and confusion). There are certainly plenty of people who do control Tomcat with Eclipse, but doing so is a topic for an Eclipse mailing list.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Socket Error in tomcat, white screen in browser
Posted by millerKiller <sm...@hotmail.com>.
>No - it shows that *something* is listening on 8005, but it's not likely to
be Tomcat. Use the Task Manager to find out what PID 520 is. As I
mentioned before, lots of products have Tomcat embedded in them, and at
least one (VMware) leaves the shutdown port set to the default, creating
difficulty for anyone trying to run an out-of-the-box Tomcat.
>Something *is* using 8005, which will interfere with a Tomcat configured
with the default shutdown port.
>And again, be wary of running Tomcat under Eclipse, since Eclipse likes to
use its own Tomcat configuration, not the one you thing you've set up.
The wierd thing about all of this is whenever I shut my tomcat down then the
127.0.0.1:8005 dissapears from the netstat list. This leads me to believe
that it is Tomcat which is using this. This also leads me to believe there
is something funky with eclipse's setup with Tomcat. Maybe the best
solution is to reinstall it? (I need to use it under eclipse for the
application I am creating JavaServlets/JSPs) If Eclipse uses its own
settings, then how do I make it use Tomcat's or vice versa or is there a
manual on this specific problem with eclipse and Tomcat getting confused
with one anothers configuration settings?
--
View this message in context: http://old.nabble.com/Socket-Error-in-tomcat%2C-white-screen-in-browser-tp27567722p27579543.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Socket Error in tomcat, white screen in browser
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: millerKiller [mailto:smille89_k@hotmail.com]
> Subject: RE: Socket Error in tomcat, white screen in browser
>
> (1) On startup, does Tomcat have to set up these dormant
> sockets(inactive/listening/passive) or, does Tomcat create
> them upon a need base?
They're established during Tomcat initialization. They should appear in the netstat display by the time Tomcat logs its server startup message. For example, here are the ones from my Vista system:
Feb 13, 2010 11:22:27 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Feb 13, 2010 11:22:27 AM org.apache.coyote.http11.Http11NioProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8081
Feb 13, 2010 11:22:27 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3943 ms
> (2) This one might answer number (1). Why does Tomcat use the three
> different sockets, doesn't it just need a single server listening
> socket?
One for each configured port. The shutdown port (default 8005) is established only on the standard IPv4 loopback address (127.0.0.1), whereas the others are on 0.0.0.0 ([::] for IPv6) - meaning all IP addresses - unless the address attribute is used on the <Connector> elements.
Your snippet of server.xml showed an HTTP <Connector> on port 80, and an AJP one on 8009, so there has to be a listener set up for each. (BTW, unless you're front-ending Tomcat with IIS or httpd, you don't need the AJP <Connector>.)
> I am testing the server on localHost and am getting
> Proto Local Address Foreign Address State
> PID
> TCP 127.0.0.1:8005 0.0.0.0:0 LISTENING
> 520
> Is this valid since I using localHost?
No - it shows that *something* is listening on 8005, but it's not likely to be Tomcat. Use the Task Manager to find out what PID 520 is. As I mentioned before, lots of products have Tomcat embedded in them, and at least one (VMware) leaves the shutdown port set to the default, creating difficulty for anyone trying to run an out-of-the-box Tomcat.
> (4)If nothing else is using the ports that I mentioned earlier when I
> use netstat -ano, then why does it think there is a bind somewhere?
Something *is* using 8005, which will interfere with a Tomcat configured with the default shutdown port.
And again, be wary of running Tomcat under Eclipse, since Eclipse likes to use its own Tomcat configuration, not the one you thing you've set up.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Socket Error in tomcat, white screen in browser
Posted by millerKiller <sm...@hotmail.com>.
I accept your apology and owe you one to. The post that threw me off the
rocker was the post that told me to look through all of the messages and not
just parts of. I apologize...
,but now that we are on the same page and using the same terminology, would
you mind if I ask you some questions? The last post was interesting and I
had some questions:
If so, here they are:
(1) On startup, does Tomcat have to set up these dormant
sockets(inactive/listening/passive) or, does Tomcat create them upon a need
base?
(2) This one might answer number (1). Why does Tomcat use the three
different sockets, doesn't it just need a single server listening socket?
(3)
> Proto Local Address Foreign Address State PID
>TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 6104
>TCP 0.0.0.0:8009 0.0.0.0:0 LISTENING 6104
>TCP [::]:80 [::]:0 LISTENING 6104
>TCP [::]:8009 [::]:0 LISTENING 6104
>The Foreign Address will always be 0.0.0.0 for passive open (LISTENING)
ports.
I am testing the server on localHost and am getting
Proto Local Address Foreign Address State PID
TCP 127.0.0.1:8005 0.0.0.0:0 LISTENING
520
Is this valid since I using localHost?
(4)If nothing else is using the ports that I mentioned earlier when I use
netstat -ano, then why does it think there is a bind somewhere?
Thanks
--
View this message in context: http://old.nabble.com/Socket-Error-in-tomcat%2C-white-screen-in-browser-tp27567722p27579336.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Socket Error in tomcat, white screen in browser
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: millerKiller [mailto:smille89_k@hotmail.com]
> Subject: Re: Socket Error in tomcat, white screen in browser
Sorry if you feel offended at anything said - it certainly wasn't intended.
> I know what connections and sockets are and infact, a
> socket is a connection!
Not quite; a socket is not necessarily a TCP or UDP connection - there are many other network and internal protocols that use sockets as endpoints. In the particular case of the sockets created for the ports specified on the Tomcat <Connector> elements, these are passive opens, so there's no actual connection until a client attempts an active open.
> I have programmed large concurrent/multithreading programming
> projects including torents and servers that deal with all kinds
> of sockets in many different contexts in many different languages.
Good experience. I started writing multithreaded assembler language on multiprocessor systems in 1969, including communications.
> As far as the other replies then you say there is a problem since
> my windows machine (windows 7 ultimate) isn't showing the other
> ports being listened on (bound).
Correct - that is a problem. Unless Tomcat has a listen established on the configured ports (they are ServerSocket instances, in Java terminology), connections cannot be established. If you're not seeing entries like this in your netstat -ano output, something is preventing Tomcat from functioning:
Proto Local Address Foreign Address State PID
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 6104
TCP 0.0.0.0:8009 0.0.0.0:0 LISTENING 6104
TCP [::]:80 [::]:0 LISTENING 6104
TCP [::]:8009 [::]:0 LISTENING 6104
The Foreign Address will always be 0.0.0.0 for passive open (LISTENING) ports.
> Since they are redirect connections
Not sure what you mean by that terminology, but I'll presume you mean they are passive opens.
> then I wouldn't be surprised if a socket (connection), only opens
> up when a page is redirecting so I don't believe that is the problem.
??? This has nothing to do with HTTP redirection, which the above statement appears to refer to. We're talking about the means of establishing an HTTP connection.
> And then as far as Root and ROOT, then come on, you know what I am
> talking about.
No, I don't. We get many, many Windows-centric people on this mailing list that often get the casing wrong, and then wonder why things aren't working.
> Were not talking about case sensitive environmental operating
> system features / registry files.
Yes, we are. Tomcat is extremely case-sensitive, so the casing of file and directory names must be exact.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Socket Error in tomcat, white screen in browser
Posted by millerKiller <sm...@hotmail.com>.
I do not mean to insult your intelligence on the matter, but we are not
getting anywhere on the matter. I feel like we are going off on a tangent
and are just wasting time (because you don't know the solution). Everything
you have told me to do then I already know about and would like to correct
you on some of the things you told me. First of all, I know what
connections and sockets are and infact, a socket is a connection! (Don't
argue with the intricate details of whether a unconnected socket is a
connection or a dormant connection waiting to happen because anything
valuable do with a socket is a connection!) I have programmed large
concurrent/multithreading programming projects including torents and servers
that deal with all kinds of sockets in many different contexts in many
different languages. I know what a socket is! Anything valuable to do with
a socket is a connection! And.... how do you define a socket without its
port number and IPaddress? A socket is meaningless without this. If you
don't believe me then here are some references from Sun's documentation and
from RFC's (Request for comments from the internet):
-------------------------------------------
Definition: A socket is one endpoint of a two-way communication link
between two programs running on the network. A socket is bound to a port
number so that the TCP layer can identify the application that data is
destined to be sent.
An endpoint is a combination of an IP address and a port number. Every TCP
connection can be uniquely identified by its two endpoints. That way you can
have multiple connections between your host and the server.
--------------------------------------------
So don't get lost in technicalities that are meaningless to the situation.
I mean sure, there can be other connections besides sockets (subset of), but
dude, getting lost in these technicalities to try and show superiority does
nothing to help figure out the situation. Now I am sure you know more about
the architecture of Tomcat then I do(maybe not, but will give you the
benefit of the doubt), I am not disputing that. I am a masters student in
computer science with a bachelors in math and computer engineering and I
feel very insulted by the last two posts. I mean, the way they were
structured (especially the last one) have bothered me. My problem is not
the logists of the science, but the Tomcat application itself.
As far as the other replies then you say there is a problem since my windows
machine (windows 7 ultimate) isn't showing the other ports being listened on
(bound). Since they are redirect connections, then I wouldn't be surprised
if a socket (connection), only opens up when a page is redirecting so I
don't believe that is the problem. (Maybe it is, but I doubt it)
And then as far as Root and ROOT, then come on, you know what I am talking
about. Were not talking about case sensitive environmental operating system
features / registry files. I feel like the comment on this was more of an
insult then to inform me. (if you don't know what I am talking about then
maybe I need to talk to someone else)
And then as far as the other guy that posted:
>read all of the other posts and not just half of them?
Yes, I did read the posts several times to see if I was missing something.
They tell me nothing useful that I already did not know. Is everyone on
your forums this stuck up. This is bullcrap!
Once again I am not insulting you on your expertise of Tomcat, but I regret
you cannot say the same for me. I feel like this forum is a waste of time
for newbies in the realm of computer science / networking to try and show
superiority over others because they know more on a specific applicaiton.
The people here are not willing to get in and help if it includes more than
the easy icing. What I am going to do next is either try another forum,
reinstall my tomcat and eclipse, or go meet with some professionals that
know tomcat. (my buddies up at the University). If there is anyone that is
willing to help me then let me know, otherwise good day to everyone and good
luck.
Good luck and good day to you.
--
View this message in context: http://old.nabble.com/Socket-Error-in-tomcat%2C-white-screen-in-browser-tp27567722p27576555.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Socket Error in tomcat, white screen in browser
Posted by André Warnier <aw...@ice-sa.com>.
millerKiller wrote:
> I apologize, I put across my last post a little misleading. The socket I
> showed before is the socket that Tomcat is using when I open it.
>
>> Local Address Foreign Address
>> ------------- ----------------
>> 127.0.0.1:8005 0.0.0.0.0
>
> I am running tomcat through the loop back address. When I start the server
> then the above shows up in netstat -ano. When I close the server then it
> goes away. This means that the only program that is using this socket is
> the Tomcat that should be using it. So it isn't a problem with sockets (IP
> addresses and port numbers) as far as I can tell.
>
>
>> BTW, a blank page in the browser is often the result of the ROOT webapp
> either not being present or >failing to deploy properly. Make sure you have
> a ROOT webapp (case matters, even on Windows), and >check the logs for any
> deployment errors.
>
> As far as this last comment, then I am aware that individual projects have a
> webapp folder and the tomcat program has its own webapp. When you talk
> about Root webapp, then you are talking about the Tomcat one right? What
> should be in this webapp folder? Here is what I have:
> Folders:
> docs
> examples
> host-manager
> manager
> Root <==== that should be ROOT, even under Windows
Re-read what Chuck wrote above.
As a matter of fact, re-read ALL the answers you have received, making
sure that you do not read only half of them.
netstat -aon
not only shows you which ports are open/LISTENing, it also shows which
process has them open.
With the Task Manager, you can see which program matches which process-id.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Socket Error in tomcat, white screen in browser
Posted by millerKiller <sm...@hotmail.com>.
Thanks for the reply. I will look into closer and see what I come up with.
When I figure out the solution, if I do, then I will let post a comment so
that it is available to everyone.
--
View this message in context: http://old.nabble.com/Socket-Error-in-tomcat%2C-white-screen-in-browser-tp27567722p27576781.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Socket Error in tomcat, white screen in browser
Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/2/13 millerKiller <sm...@hotmail.com>:
>
> And then as far as Root and ROOT, then come on, you know what I am talking
> about. Were not talking about case sensitive environmental operating system
> features / registry files. I feel like the comment on this was more of an
> insult then to inform me. (if you don't know what I am talking about then
> maybe I need to talk to someone else)
Believe us, what was said about ROOT vs Root is important.
>
> They tell me nothing useful that I already did not know. Is everyone on
> your forums this stuck up. This is bullcrap!
Try this one:
http://www.catb.org/~esr/faqs/smart-questions.html#keepcool
And it is not a forum. It is a mailing list, users @ tomcat.apache.org.
It might be that
1. You have already another instance of Tomcat running. On Windows
usually one Tomcat instance is installed as a service. If it is
already started, you won't be able to start another instance from
within Eclipse IDE using the same port numbers (There are three port
numbers used, all configured in server.xml).
2. There might be a firewall/security software that prevents listening
on that port. Thus the unusual "Unrecognized Windows Sockets error".
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Socket Error in tomcat, white screen in browser
Posted by millerKiller <sm...@hotmail.com>.
I do not mean to insult your intelligence on the matter, but we are not
getting anywhere on the matter. I feel like we are going off on a tangent
and are just wasting time (because you don't know the solution). Everything
you have told me to do then I already know about and would like to correct
you on some of the things you told me. First of all, I know what
connections and sockets are and infact, a socket is a connection! (Don't
argue with the intricate details of whether a unconnected socket is a
connection or a dormant connection waiting to happen because anything
valuable do with a socket is a connection!) I have programmed large
concurrent/multithreading programming projects including torents and servers
that deal with all kinds of sockets in many different contexts in many
different languages. I know what a socket is! Anything valuable to do with
a socket is a connection! And.... how do you define a socket without its
port number and IPaddress? A socket is meaningless without this. If you
don't believe me then here are some references from Sun's documentation and
from RFC's (Request for comments from the internet):
-------------------------------------------
Definition: A socket is one endpoint of a two-way communication link
between two programs running on the network. A socket is bound to a port
number so that the TCP layer can identify the application that data is
destined to be sent.
An endpoint is a combination of an IP address and a port number. Every TCP
connection can be uniquely identified by its two endpoints. That way you can
have multiple connections between your host and the server.
--------------------------------------------
So don't get lost in technicalities that are meaningless to the situation.
I mean sure, there can be other connections besides sockets (subset of), but
dude, getting lost in these technicalities to try and show superiority does
nothing to help figure out the situation. Now I am sure you know more about
the architecture of Tomcat then I do(maybe not, but will give you the
benefit of the doubt), I am not disputing that. I am a masters student in
computer science with a bachelors in math and computer engineering and I
feel very insulted by the last two posts. I mean, the way they were
structured (especially the last one) have bothered me. My problem is not
the logists of the science, but the Tomcat application itself.
As far as the other replies then you say there is a problem since my windows
machine (windows 7 ultimate) isn't showing the other ports being listened on
(bound). Since they are redirect connections, then I wouldn't be surprised
if a socket (connection), only opens up when a page is redirecting so I
don't believe that is the problem. (Maybe it is, but I doubt it)
And then as far as Root and ROOT, then come on, you know what I am talking
about. Were not talking about case sensitive environmental operating system
features / registry files. I feel like the comment on this was more of an
insult then to inform me. (if you don't know what I am talking about then
maybe I need to talk to someone else)
And then as far as the other guy that posted:
>read all of the other posts and not just half of them?
Yes, I did read the posts several times to see if I was missing something.
They tell me nothing useful that I already did not know. Is everyone on
your forums this stuck up. This is bullcrap!
Once again I am not insulting you on your expertise of Tomcat, but I regret
you cannot say the same for me. I feel like this forum is a waste of time
for newbies in the realm of computer science / networking to try and show
superiority over others because they know more on a specific applicaiton.
The people here are not willing to get in and help if it includes more than
the easy icing. What I am going to do next is either try another forum,
reinstall my tomcat and eclipse, or go meet with some professionals that
know tomcat. (my buddies up at the University). If there is anyone that is
willing to help me then let me know, otherwise good day to everyone and good
luck.
Good luck and good day to you.
--
View this message in context: http://old.nabble.com/Socket-Error-in-tomcat%2C-white-screen-in-browser-tp27567722p27576522.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Socket Error in tomcat, white screen in browser
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: millerKiller [mailto:smille89_k@hotmail.com]
> Subject: RE: Socket Error in tomcat, white screen in browser
> The socket I showed before is the socket that Tomcat is using
> when I open it.
That's not a socket, it's a connection. So where are the other two ports Tomcat should also be listening on? There should be lines for 80 and 8009, for the same PID as the one on 8005. The Local Address for 80 and 8009 should be 0.0.0.0 (or the IPv6 equivalent); if those aren't present in the netstat -ano display, then Windows or some other security mechanism is preventing their use, and you won't be able to access Tomcat.
> I am running tomcat through the loop back address.
Actually, you're not. Since the <Connector> elements have no address attribute, Tomcat should be listening on all IP addresses configured for the box, and netstat will show that as 0.0.0.0 (or the IPv6 equivalent).
> So it isn't a problem with sockets (IP addresses and port
> numbers) as far as I can tell.
If 8005 is the only Tomcat port you're seeing in the netstat output, then it definitely *is* a problem with ports. (And don't confuse sockets with IP addresses and ports.)
> As far as this last comment, then I am aware that individual
> projects have a webapp folder and the tomcat program has its
> own webapp.
That statement doesn't make sense. Each webapp is normally deployed under the <Host> appBase directory (default name is $CATALINA_BASE/webapps, although provisions exist for deploying them elsewhere. Tomcat does *not* have "its own webapp"; Tomcat uses whatever webapps it's been told to use or discovers by their placement under the appBase directory.
> When you talk about Root webapp
I don't talk about "Root webapp"; the term is ROOT - as I said before, it is case-sensitive, even on Windows.
> you are talking about the Tomcat one right?
No, I'm talking about whatever is deployed as ROOT. That may be the one that came with the Tomcat distribution, or it may be one that you've deployed in its place as the default webapp.
> What should be in this webapp folder?
There is no "webapp" folder; do you mean "webapps"?
> Here is what I have:
> Folders:
> docs
> examples
> host-manager
> manager
> Root
That should be ROOT, not Root. All of the above are part of the standard Tomcat distribution (other than Root, unless you really did mean ROOT).
> Standard-examples
>
> Files:
> standard-examples.war
One of the above is wrong, since they must have the same casing. I presume the .war file is what you're building with Eclipse.
You're going to need to be a lot more careful with your use of upper and lower case - this is critical. Windows tends to make people sloppy.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Socket Error in tomcat, white screen in browser
Posted by millerKiller <sm...@hotmail.com>.
I apologize, I put across my last post a little misleading. The socket I
showed before is the socket that Tomcat is using when I open it.
> Local Address Foreign Address
> ------------- ----------------
> 127.0.0.1:8005 0.0.0.0.0
I am running tomcat through the loop back address. When I start the server
then the above shows up in netstat -ano. When I close the server then it
goes away. This means that the only program that is using this socket is
the Tomcat that should be using it. So it isn't a problem with sockets (IP
addresses and port numbers) as far as I can tell.
>BTW, a blank page in the browser is often the result of the ROOT webapp
either not being present or >failing to deploy properly. Make sure you have
a ROOT webapp (case matters, even on Windows), and >check the logs for any
deployment errors.
As far as this last comment, then I am aware that individual projects have a
webapp folder and the tomcat program has its own webapp. When you talk
about Root webapp, then you are talking about the Tomcat one right? What
should be in this webapp folder? Here is what I have:
Folders:
docs
examples
host-manager
manager
Root
Standard-examples
Files:
standard-examples.war
--
View this message in context: http://old.nabble.com/Socket-Error-in-tomcat%2C-white-screen-in-browser-tp27567722p27568758.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Socket Error in tomcat, white screen in browser
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: millerKiller [mailto:smille89_k@hotmail.com]
> Subject: RE: Socket Error in tomcat, white screen in browser
>
> Here is my port information in conf/server.xml:
> <Server port="8005" shutdown="SHUTDOWN">
> <Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000"
> redirectPort="8443" />
> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
So there are three ports configured for this Tomcat: 8005, 80, and 8009.
> I pull up netstat -ano
> Here is the only thing that relates to these port numbers:
> Local Address Foreign Address
> ------------- ----------------
> 127.0.0.1:8005 0.0.0.0.0
That shows someone is using port 8005, so Tomcat won't be able to get it, resulting in the errors you see in the logs. The netstat -ano also gives you the PID of whoever's using that port; that's either another Tomcat, or possibly a Tomcat embedded in another product (e.g., VMware). You'll need to either kill the usurping process, or redefine your Tomcat's shutdown port to another value.
> So it appears that nothing is using the same port
On the contrary, it shows that something *is* using one of the ports of interest.
> what is the correct way to respond in this forum
Always post messages to the mailing list. Private ones will be returned ungraciously.
BTW, a blank page in the browser is often the result of the ROOT webapp either not being present or failing to deploy properly. Make sure you have a ROOT webapp (case matters, even on Windows), and check the logs for any deployment errors.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Socket Error in tomcat, white screen in browser
Posted by millerKiller <sm...@hotmail.com>.
Here is my port information in conf/server.xml:
<Server port="8005" shutdown="SHUTDOWN">
<Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000"
redirectPort="8443" />
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
I pull up netstat -ano
Here is the only thing that relates to these port numbers:
Local Address Foreign Address
------------- ----------------
127.0.0.1:8005 0.0.0.0.0
So it appears that nothing is using the same port, any other ideas? (Also,
what is the correct way to respond in this forum, should I post message or
send an email to you?)
--
View this message in context: http://old.nabble.com/Socket-Error-in-tomcat%2C-white-screen-in-browser-tp27567722p27568387.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Socket Error in tomcat, white screen in browser
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: millerKiller [mailto:smille89_k@hotmail.com]
> Subject: RE: Socket Error in tomcat, white screen in browser
>
> I believe I have Tomcat configured to go through port 80
That configuration is in conf/server.xml; be aware that Eclipse often uses its own Tomcat config, not the one you think you're using.
> If port 80 shows up on netstat, then is this a problem?
Yes.
> I though multiple things could use port 80.
Only one process at a time may use a given ip:port combination.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Socket Error in tomcat, white screen in browser
Posted by millerKiller <sm...@hotmail.com>.
Thanks for the quick response Chuck. I might need a little guidance on some
of the things you mentioned. I believe I have Tomcat configured to go
through port 80 and it is going through my machine locally. Where do I
check to make sure? I checked windows firewall and it is allowing eclipse
to go through the firewall. If port 80 shows up on netstat, then is this a
problem? I though multiple things could use port 80. (i.e. assign
dynamically)
thanks,
millerkiller
--
View this message in context: http://old.nabble.com/Socket-Error-in-tomcat%2C-white-screen-in-browser-tp27567722p27568110.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Socket Error in tomcat, white screen in browser
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: millerKiller [mailto:smille89_k@hotmail.com]
> Subject: Socket Error in tomcat, white screen in browser
> I don't understand, my tomcat was working last week just fine and now
> it is acting weird? Is there anyone that can help me figure it out?
Welcome to the Wacky World of Windows.
1) Use netstat -ano to make sure the ports you've configured for Tomcat are not already in use (by VMware, for example).
2) Check your Windows firewall to make sure those ports are available.
3) Reboot (early and often).
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org