Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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: 27685
196
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.
 
What are you saying? I thought you said that Santa gave you that. And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic