• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

http://localhost:8080 not working,giving IP works fine!

 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.

My Tomcat is running fine and so is my application. The problem is that I am able to access it by giving: http://10.xxx.xxx.xxx:8080/appname but on giving http://localhost:8080/appname (or even using 127.0.0.1) I am getting following error:
500 Server Error
The following error occurred:

[code=CANT_CONNECT_LOOPBACK] Cannot connect due to potential loopback problems
Please contact the administrator.

Any clues, what might have broken?

Thanks
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had a similar problem; the bowser could access localhost:8080 but ant tasks and some java web service clients couldn't

I'm running Win7 and had installed wireshark earlier in the day but never rebooted.

I disabled IPv6 on my system and rebooted and it started working.

LATER: i re-enabled IPv6 and it was still working??? So i have to assume my problem was the rebooted. (Thanks nothing win7)
 
Saloon Keeper
Posts: 28713
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Most likely the entry for "localhost" in the hosts file (/etc/hosts for Linux/Unix/Solaris) is defective. Windows has a hosts file, too, but I'm not sure if it uses it to get localhost.

I think Eric has a different problem. Java apps that want the server's IP address (assuming it only has one) can't get it from reverse lookups on "localhost", so sometimes the apps have to be explictly configured.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic