| Author |
tomcat startup problem
|
Mike Ottinger
Ranch Hand
Joined: Jan 11, 2002
Posts: 125
|
|
|
I've configured Tomcat 4.0 for windows 2000. When I go to dos and cd to the correct directory and type startup, everything looks fine. It says starting service Tomcat Apache then the next line says Tomcat Apache / 4.0.1. But when I go to a browser to load up http://localhost/ I get nothing. I changed the port in the server.xml file. I created a JAVA_HOME variable equal to C:\jdk1.3.1_02 I also created a CATALINA_HOME variable and set that to C:\tomcat. So I'm not sure what's wrong here, any suggestions?
|
SCJP 1.4 SCJD 1.5
|
 |
Mike Curwen
Ranch Hand
Joined: Feb 20, 2001
Posts: 3695
|
|
When you say "I changed the port",what did you change it to? And before you did that, did you try http://localhost:8080/ (the default port)
|
 |
Mike Ottinger
Ranch Hand
Joined: Jan 11, 2002
Posts: 125
|
|
|
I changed the port to 80 and I did try http://localhost:8080, all possible combinations, no luck.
|
 |
Mike Curwen
Ranch Hand
Joined: Feb 20, 2001
Posts: 3695
|
|
If you're on a LAN, behind a proxy, did you tell the browser to ignore 'localhost' (ie: Do not use proxy for the following addresses:") What is the exact error message you get?
|
 |
Mike Ottinger
Ranch Hand
Joined: Jan 11, 2002
Posts: 125
|
|
See that's the thing. I don't really get an error message. At the command prompt it says (verbatim) Starting service Tomcat-Standalone Apache Tomcat/4.0.1 Starting service Tomcat-Apache Apache Tomcat/4.0.1 .. That looks to me like a successful startup. Maybe you can tell me if something's missing. I'm not on a LAN nor behind a proxy, the computer I'm working on isn't even connected to the internet. Where the problem occurs is opening up my browser and going to http://localhost/ it says that this page cannot be displayed, you're typical browser error page you get when anyone goes to a page that can't be downloaded. But before all that Windows 2000 pops up a dialog box that says this page cannot be accessed offline, then it gives me the choice to connect or stay offline. When I choose stay offline (because there's no connection) then it gives me your standard page cannot be displayed error.
|
 |
Axel Janssen
Ranch Hand
Joined: Jan 08, 2001
Posts: 2164
|
|
Mike: are you sure you have a network-card or a loopback - adapter installed. Sounds strange to me. The easiest explanation for setting up tomcat is this: http://javaboutique.internet.com/tutorials/Tomcat/ hope it helps. Axel
|
 |
Mike Ottinger
Ranch Hand
Joined: Jan 11, 2002
Posts: 125
|
|
Axel, The only hardware I have for networking is my modem card. That's it. I know nothing about a loop-back adpater. The weird thing is, before I installed windows 2000 I had 98 and I was able to get tomcat 4.0 working on that. How about I just uninstall 4.0 and reinstall it. I also have a version prior to 4.0 that I could try. I no it's weird, everything seems to be set up correctly. I wondering if I might have corrupted some file in tomcat, who knows. Thanks for the help.
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14460
|
|
Your "connect to the Internet" dialog means that either the request is being addressed to some other machine (proxy) or that Tomcat didn't open for business on that port (if you just do an http://localhost it will try port 80). Check the Tomcat logs. You may find that it came up, but then it gave up and shut down (a control-alt-del to bring up the task manager program may also show you if Tomcat's still running).
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Mike Curwen
Ranch Hand
Joined: Feb 20, 2001
Posts: 3695
|
|
It's a problem with your OS thinking "I am offline, so how could I possibly service any http requests"? This is what the loopback adapter gives you. It fools Windows into thinking it is online. Machines that have a NIC don't usually have this problem, even when they are offline. I've thought about that a bit more.. the reason they don't usually have a problem (with NICs) is because they have installed the TCP/IP adapters. The OS install detects the card, realizes it needs to install the adapter, and it gets installed. As a test, try to browse to http://127.0.0.1 and see what it gives you. If you get the same online-dialog you'll have to install the loopback. This is through the 'My Network Places' properties. [ January 14, 2002: Message edited by: Mike Curwen ]
|
 |
Mike Ottinger
Ranch Hand
Joined: Jan 11, 2002
Posts: 125
|
|
Mike, Thank you so much for the suggestion. I've tried http://127.0.0.1 before and got the same results so a loopback adpater will have to be used. I went into properties on My Network Places and it gave me a Make New Connection wizard. I wasn't sure where to go from there because every option involved setting up to another computer which I can't do. Is there a program that I can download of the net and install on my computer. I have internet downstairs but not upstairs where I do all my coding. Mike
|
 |
Axel Janssen
Ranch Hand
Joined: Jan 08, 2001
Posts: 2164
|
|
Mike: (The system admins in my company would laugh if they could see me now ). But I'm sure: You install the loopback adapter from your Windows installation CD. Its something like: You have to say to setup a network (even if the computer stays solo). And then there is a selection network-card and you choose Loopback adapter. Use TCP-IP as protocol. Nothing else. Hope it helps
|
 |
Mike Ottinger
Ranch Hand
Joined: Jan 11, 2002
Posts: 125
|
|
Axel: Sorry for the ignorance on my part but I've gone through my Windows 2000 disk and installed the Network add-in components. I then went to the Network Connection Wizard and went through various network scenarios( dial-up, vpn, lan, etc) none of these seemed to prompt me for a TCP/IP configuration nor a loopback adapter install. Is there something I'm missing? Is it different for different OS's? Thanks for your help!
|
 |
Guy Allard
Ranch Hand
Joined: Nov 24, 2000
Posts: 776
|
|
Mike O. - I agree with Mike C., it's the Win OS and browser thinking the only way you can talk to anyone is via the internet. They frown on this here at JR, but I'd suggest asking in the SCWCD forum - I know there are a bunch of folks there running Tomcat on Windows boxes, and they might be able to help. I'm sure there is a way to get around Win+IE wanting to connect, but I do not know for sure how it's done. You could try the following: Set up a C:\windows\hosts file with one line: 127.0.0.1 localhost Then change the IE properties to connect through a proxy at that address. This is just a wild guess, I don't run Windows too much these days. HTH, Guy
|
 |
Mark Fletcher
Ranch Hand
Joined: Dec 08, 2001
Posts: 897
|
|
Hi There, Stupid question but have you tried setting the port back to 8080 and seeing if you can access the machine on http://localhost:8080 or http://<server_name>:8080 where <server_name> is the hostname of the machine that Tomcat is installed on? Cheers, Mark
|
Mark Fletcher - http://www.markfletcher.org/blog
I had some Java certs, but they're too old now...
|
 |
Mike Curwen
Ranch Hand
Joined: Feb 20, 2001
Posts: 3695
|
|
Mark, the problem is that a non-networked pc (running windows and ie) will not even begin to suspect that it can properly 'browse' to an http address. So 'localhost' means nothing, as does 127.0.0.1, as does 'computername'. Mike O: Try this: - Add New Hardware - Next - Add/Troubleshoot a device (it will search a long time) - Add a New Device (first in list) - No, I want to select the hardware from a list - Network Adapters - Choose Microsoft in the left hand list. - Loopback Adapter should be the only entry in the right hand list. After that, you're on your own, as I didn't choose to install it.
|
 |
Mike Ottinger
Ranch Hand
Joined: Jan 11, 2002
Posts: 125
|
|
I DID IT!!! If I were in front of you guys I'd hug you!!! It's a simple tomcat index page but it's the most beautiful website I've seen for all the work it took to get it there. Thank you so much for the help!
|
 |
Mark Fletcher
Ranch Hand
Joined: Dec 08, 2001
Posts: 897
|
|
Hi Mike, What did you do to get it working again? Cheers, Mark
|
 |
Mike Ottinger
Ranch Hand
Joined: Jan 11, 2002
Posts: 125
|
|
|
I installed a loopback adapter like Mike had suggested. So when I type in the URL my browser prompts me to either connect or work offline, when I connect, I assume the loopback kicks in and tricks the browser into thinking it's online!
|
 |
Tazzmission
Greenhorn
Joined: Jan 16, 2002
Posts: 20
|
|
Hi all, I face the same situation too (ie dialog box asking you to dialup), if I install the loopback adapter, will it affect my other normal online (dialup/browsing normal http) job? Thanks
|
 |
Mike Curwen
Ranch Hand
Joined: Feb 20, 2001
Posts: 3695
|
|
No, it should not. the loopback adapter is used only when you are 'offline'.
|
 |
Tazzmission
Greenhorn
Joined: Jan 16, 2002
Posts: 20
|
|
|
Thanks mike
|
 |
sudhindra joshi
Greenhorn
Joined: Jul 29, 2003
Posts: 1
|
|
Hello All, I am facing the same problem. After Startup a new window opens Up and then immediately closes..and I am not able to browse localhost:8080 or 127.0.0.1:8080. I am in LAN. The bypass proxy Server option is also enabled. Kindly Guide me. regards, Sudhindra
|
 |
Mike Curwen
Ranch Hand
Joined: Feb 20, 2001
Posts: 3695
|
|
sudhindra, That's actually a different problem, frequently asked... http://www.coderanch.com/t/82810/Tomcat/tomcat http://www.coderanch.com/t/81985/Tomcat/debug-tomcat-set-up-file Or the short version: "open a DOS window (no double clicking files!) and change to the Tomcat bin directory. Type catalina.bat start"
|
 |
 |
|
|
subject: tomcat startup problem
|
|
|