Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old August 26th, 2002, 07:21 PM
dhtmlkitchen dhtmlkitchen is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Boston, MA
Posts: 30 dhtmlkitchen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
localhost != 127.0.0.1. How to resolve localhost on a network?

Hey,

This will probably sound stupid because I don't know anything about networking. It's not even a java question, really. I almost put it in the mysql forum.

We got DSL and a router for our 2 computers at home. Now localhost maps to the ip for my computer on the router - 192.168.n.n (replace the n's with numbers).

So if I try to use localhost for anything, there is a problem. I need to explicitly use 127.0.0.1.

See:
Code:
"...
javax.servlet.ServletException: java.sql.SQLException: Invalid authorization specification: Access denied for user: 'javauser@192.168.
..."


Can someone educate me on this?
__________________
http://dhtmlkitchen.com/

Reply With Quote
  #2  
Old August 27th, 2002, 12:13 AM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
You're right, this has nothing to do with java Try changing 'localhost' to '127.0.0.1' in your code. That'll probably fix it.

I don't know why localhost is pointing to your ethernet instead of your loopback. Most likely something played with your routing tables. Try asking in the forum for your OS and see if anyone there can shed some light on the issue.

Also, you might ask in the MySQL forum about setting up user permissions to let your connect from a remote address. I've only done that with Postgres.

Reply With Quote
  #3  
Old August 27th, 2002, 10:07 AM
kittykiller's Avatar
kittykiller kittykiller is offline
Golden Member =p
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Final Frontier
Posts: 9 kittykiller User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
it doesn't seem that your network is correctly, as networking standards go, no ip other than 127.0.0.1 should be binded to localhost...

and trying to find localhost of another machine is not gonna
get you anywhere.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > localhost != 127.0.0.1. How to resolve localhost on a network?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway