Python XML-RPC localhost problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tassos Souris
    New Member
    • Aug 2008
    • 152

    Python XML-RPC localhost problem

    Hello,

    i have a simple xml rpc server running on a host (e.g. 1.2.3.4)... the server has the following address:
    servAddr = ("localhost" , 8080)..

    when i run the client on a different machine (e.g. 5.6.7.8) i get a connection refused error...

    however, when i change the line
    servAddr = ("localhost" , 8080)
    to
    servAddr = ("1.2.3.4", 8080)

    everything works fine...

    what's wrong?

    (note: both machines run linux in case this is a network related problem and not a python related one)

    thanks for your time...
  • Andr3w
    New Member
    • Nov 2007
    • 42

    #2
    Hey mate,

    I am 99 % sure that's not a python related issue...most likely the server goes and binds in 127.0.0.1...whi ch on most (if not all) systems is defined as a local only and loop-back interface so you can't access it outside the machine you are running the server, so the connection refused error is quite normal. There is of course a chance that you have a multi-homed host with bridged interfaces, so even if you bind using 'local-host' as an address you will be bound in the 'primary' external interface (in most cases eth0)

    If you alter your network configuration it will be fine, I think... or you'll just have to type the address yourself!

    Hope this helped,

    Cheers!

    Comment

    Working...