File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Error Starting TOMCAT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Error Starting TOMCAT" Watch "Error Starting TOMCAT" New topic
Author

Error Starting TOMCAT

Nandhini Davey
Greenhorn

Joined: Mar 03, 2004
Posts: 3
Hi,
I'm trying to start the TOMCAT server in unix platform. I get the following exception. This is different from the usual "Address already is Use".
I have tried to change the port number many a times but I get the same error. Also, i ahve checked netstat for ports they seem to be free...
the exception is
roperties
StandardServer.await: create[46936]: java.net.BindException: Can't assign reques
ted address
java.net.BindException: Can't assign requested address
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
at java.net.ServerSocket.bind(ServerSocket.java:309)
at java.net.ServerSocket.<init>(ServerSocket.java:183)
at org.apache.catalina.core.StandardServer.await(Unknown Source)
at org.apache.catalina.startup.Catalina.start(Unknown Source)
at org.apache.catalina.startup.Catalina.execute(Unknown Source)
at org.apache.catalina.startup.Catalina.process(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
@
NOT SURE WHY IT CANT ASSIGN THE ADDRESS..
Any Thoughts, I appreciate.
Thanks,
Nandhini
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12678
    
    5
Are you perhaps hitting a security problem due to the restrictions on using ports lower than 1024?
Bill
Johnson Leung
Greenhorn

Joined: Mar 03, 2004
Posts: 3
I get a similar problem too. I have Red Hat Linux 9. I tried to install Tomcat 5.0.19 today. I was unable to go to http://localhost:8080. So I looked into the log file:
StandardServer.await: create[8005]: java.net.BindException: Cannot assign requested address
java.net.BindException: Cannot assign requested address
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
at java.net.ServerSocket.bind(ServerSocket.java:318)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:534)
at org.apache.catalina.startup.Catalina.await(Catalina.java:657)
at org.apache.catalina.startup.Catalina.start(Catalina.java:617)
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:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
I think my problem is very similar to yours. Would someone please advise?
Thanks,
Johnson
Ariel Valentin
Ranch Hand

Joined: Jan 30, 2004
Posts: 44
Are you using catalina.sh or startup.sh?
Do you get the error with either?
Are you running Oracle/Weblogic/MySQL or any other servers in addition to that?


A. Valentin
Ariel Valentin
Ranch Hand

Joined: Jan 30, 2004
Posts: 44
Johnson Leung,

StandardServer.await: create[8005]: java.net.BindException: Cannot assign requested address
java.net.BindException: Cannot assign requested address

Is this error happening when you startup?
because this looks like the shutdown down port 8005
One would get this message if I ran the shutdown.sh twice.
Check to see no other apps are using 8005
Johnson Leung
Greenhorn

Joined: Mar 03, 2004
Posts: 3
Hi Ariel,
I have figured out what happened. javascript: x()
Basically, when I initiate the USB wireless adaptor, it wipes off the 127.0.0.1 entry in the routing table. I have to manually add it back:
> ifconfig lo 127.0.0.1
> route add -net 127.0.0.0 gw 127.0.0.1 netmask 255.0.0.0 dev 10
I can run Tomcat now.
Thanks,
Johnson
P.S.: Nandhini, did you check if you have a similar problem as mine?
Johnson Leung
Greenhorn

Joined: Mar 03, 2004
Posts: 3
Hi Ariel,
I have figured out what happened.
Basically, when I initiate the USB wireless adaptor, it wipes off the 127.0.0.1 entry in the routing table. I have to manually add it back:
> ifconfig lo 127.0.0.1
> route add -net 127.0.0.0 gw 127.0.0.1 netmask 255.0.0.0 dev 10
I can run Tomcat now.
Thanks,
Johnson
P.S.: Nandhini, did you check if you have a similar problem as mine?
Hetal Malaviya
Greenhorn

Joined: Mar 01, 2007
Posts: 1
Hi Johnson,

Thanks for your post.

I am struggling to start tomcat on ubuntu from so many days.

I read your post and done that changes on my ubuntu machine now my tomcat is working fine.

Again thank you so much.

- Hetal
Mikhail Shalai
Greenhorn

Joined: Nov 30, 2008
Posts: 1
Originally posted by Johnson Leung:

> ifconfig lo 127.0.0.1
> route add -net 127.0.0.0 gw 127.0.0.1 netmask 255.0.0.0 dev 10


Maan, I just registered to say:
YOU ROCK!!!

I spent two days strugglin' over both my tomcat n' mysql. Neither allowed connection to 127.0.0.1. /etc/hosts was okay, as for mysql: I was really shocked to see how root could not connect to that IP (having complete priveleges set, of course).

And now.. yeah, I'm serious, wanna THANK YOU SO MUCH!!!

ps: that's what worked for me

FreeBSD# uname -a
FreeBSD FreeBSD.FreeBSD.local 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 10:35:36 UTC 2008 root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD# ifconfig lo0 127.0.0.1
FreeBSD# route add -net 127.0.0.0 127.0.0.1 255.0.0.0
add net 127.0.0.0: gateway 127.0.0.1
 
Don't get me started about those stupid light bulbs.
 
subject: Error Starting TOMCAT
 
Similar Threads
Error Starting TOMCAT
Catalina start error
BindException
Error Starting TOMCAT
tomcat startup error.