(Migrated) name doesn't exist error when outgoings hosts is defined in /etc/hosts

(This message has been automatically imported from the retired mailing list)

hi,

I got a problem when i added an outgoing, whose host is defined in
/etc/hosts

tracing message is like:

2013-12-10 15:49:56,500 - INFO - 7494:Dummy-2 -
requests.packages.urllib3.connectionpool:22 - Starting new HTTP
connection (1): wms.ec3s.my
2013-12-10 15:49:56,587 - ERROR - 7494:Dummy-2 -
zato.server.connection.http_soap.channel:186 - Caught an exception,
cid:[K115410593230659760020360744192297845333], status_code:[500],
_format_exc:[Traceback (most recent call last): File
"/home/niksun/zato-1.1/zato-server/src/zato/server/connection/http_soap/cha=
nnel.py",
line 157, in dispatch self.simple_io_config, data_format,
path_info) File
"/home/niksun/zato-1.1/zato-server/src/zato/server/connection/http_soap/cha=
nnel.py",
line 275, in handle worker_store, cid, simple_io_config,
service_info=3Dservice_info, wsgi_environ=3Dwsgi_environ) File
"/home/niksun/zato-1.1/zato-server/src/zato/server/service/init.py",
line 588, in update_handle service.handle() File
"/home/niksun/development/zato/server1/work/hot-deploy/current/consume-prod=
ucts.py",
line 8, in handle resp =3D outgoing.conn.get(self.cid) File
"/home/niksun/zato-1.1/zato-server/src/zato/server/connection/http_soap/out=
going.py",
line 160, in get r =3D s.get(‘http://wms.ec3s.my/api/products’) File
"/home/niksun/zato-1.1/eggs/requests-0.14.2-py2.7.egg/requests/sessions.py"=
,
line 254, in get return self.request(‘get’, url, **kwargs) File
"/home/niksun/zato-1.1/eggs/requests-0.14.2-py2.7.egg/requests/sessions.py"=
,
line 241, in request r.send(prefetch=3Dprefetch) File
"/home/niksun/zato-1.1/eggs/requests-0.14.2-py2.7.egg/requests/models.py",
line 634, in send raise ConnectionError(sockerr)ConnectionError:
[Errno 3] name does not exist
]

If I use the host defined in DNS there is no Problem.

Do you have some idea?

By the way is there a better way to debug the server of zato without
restart the server again and again.

Thank you very much

–=20
Mit Freundlichen Gr=C3=BC=C3=9Fen

=E7=A5=9D
=E5=95=86=E7=A5=BA

Ting Wang

“The bane of my existence is doing things
that I know the computer could do for me”

On 12/10/2013 08:53 AM, ting wang wrote:

If I use the host defined in DNS there is no Problem.

Do you have some idea?

I’ll have a look at it, I’ve never used /etc/hosts aliases with outgoing
connections - I’m not sure why they’re not resolved.

By the way is there a better way to debug the server of zato without
restart the server again and again.

Yes, please have a look here :slight_smile:

https://zato.io/blog/posts/running-servers-in-foreground.html

On 12/10/2013 08:53 AM, ting wang wrote:

If I use the host defined in DNS there is no Problem.

Do you have some idea?

I’ll have a look at it, I’ve never used /etc/hosts aliases with outgoing
connections - I’m not sure why they’re not resolved.

By the way is there a better way to debug the server of zato without
restart the server again and again.

Yes, please have a look here :slight_smile:

https://zato.io/blog/posts/running-servers-in-foreground.html

On 12/10/2013 08:53 AM, ting wang wrote:

line 8, in handle resp = outgoing.conn.get(self.cid) File
"/home/niksun/zato-1.1/zato-server/src/zato/server/connection/http_soap/outgoing.py",
line 160, in get r = s.get(‘http://wms.ec3s.my/api/products’) File

One thing I’d like to confirm - is the address you’re using ‘wms.ec3s.my’?

‘.my’ is a TLD for Malaysia and I’m not sure if this is what I should
use for tests locally too? Is it this the exact value you’re entering
into /etc/hosts?

On 12/10/2013 08:53 AM, ting wang wrote:

line 8, in handle resp = outgoing.conn.get(self.cid) File
"/home/niksun/zato-1.1/zato-server/src/zato/server/connection/http_soap/outgoing.py",
line 160, in get r = s.get(‘http://wms.ec3s.my/api/products’) File

One thing I’d like to confirm - is the address you’re using ‘wms.ec3s.my’?

‘.my’ is a TLD for Malaysia and I’m not sure if this is what I should
use for tests locally too? Is it this the exact value you’re entering
into /etc/hosts?

On 12/10/2013 08:53 AM, ting wang wrote:

I got a problem when i added an outgoing, whose host is defined in
/etc/hosts

“/home/niksun/zato-1.1/eggs/requests-0.14.2-py2.7.egg/requests/models.py”,
line 634, in send raise ConnectionError(sockerr)ConnectionError:
[Errno 3] name does not exist

Hi there,

I had a look at it and it works fine using IP addresses whereas it won’t
work using domain names, no matter if using Zato or not.

I added these two entries to /etc/hosts on Ubuntu 12.04

93.184.216.119 myexample1
example.com myexample2

93.184.216.119 is example.com’s IP address.

I can connect to myexample1 just fine but myexample2 won’t resolve to
the needed IP.

$ ping myexample1
PING myexample1 (93.184.216.119) 56(84) bytes of data.
64 bytes from myexample1 (93.184.216.119): icmp_req=1 ttl=53 time=195 ms
64 bytes from myexample1 (93.184.216.119): icmp_req=2 ttl=53 time=210 ms
$

$ ping myexample2
ping: unknown host myexample2
$

And it doesn’t really matter if I use Zato, telnet, ping or any other tool.

Apparently /etc/hosts won’t resolve names recursively and maybe this is
what you’re doing and that’s why it won’t work for you?

On 12/10/2013 08:53 AM, ting wang wrote:

I got a problem when i added an outgoing, whose host is defined in
/etc/hosts

“/home/niksun/zato-1.1/eggs/requests-0.14.2-py2.7.egg/requests/models.py”,
line 634, in send raise ConnectionError(sockerr)ConnectionError:
[Errno 3] name does not exist

Hi there,

I had a look at it and it works fine using IP addresses whereas it won’t
work using domain names, no matter if using Zato or not.

I added these two entries to /etc/hosts on Ubuntu 12.04

93.184.216.119 myexample1
example.com myexample2

93.184.216.119 is example.com’s IP address.

I can connect to myexample1 just fine but myexample2 won’t resolve to
the needed IP.

$ ping myexample1
PING myexample1 (93.184.216.119) 56(84) bytes of data.
64 bytes from myexample1 (93.184.216.119): icmp_req=1 ttl=53 time=195 ms
64 bytes from myexample1 (93.184.216.119): icmp_req=2 ttl=53 time=210 ms
$

$ ping myexample2
ping: unknown host myexample2
$

And it doesn’t really matter if I use Zato, telnet, ping or any other tool.

Apparently /etc/hosts won’t resolve names recursively and maybe this is
what you’re doing and that’s why it won’t work for you?