[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

address family for hostname not supported

Dax Huiberts

5/4/2007 2:59:00 PM

I tried to do a capistrano deployment yesterday when it suddenly didn't
want to
work anymore.
It says "address family for hostname not supported". After a lot of
searching and googling and source code lookup I came to the following:
On my development machine @ work (Windows 2003) there is a problem with
the low level Socket.getnameinfo() call.
When I try to do a
Socket.getnameinfo(['AF_INET', '22', 'beeplet.com'])
I get the above exception. but a
Socket.getnameinfo(['AF_INET', '23', 'beeplet.com'])
it works like a charm. It doesn't have anything to do
with what domain I use, it only happens when I use port 22 (ssh) in the
method call. Everything worked fine 2 days ago and now, suddenly, it
bails on me.
Doing the above method call from my development machine @ home (Ubuntu)
it all works just fine.

I don't know how and why I get this exception and haven't been able to
find a sollution either. Maybe somebody knows something more on this
topic?

--
Posted via http://www.ruby-....

5 Answers

Daniel Berger

5/4/2007 3:15:00 PM

0

On May 4, 8:59 am, Dax Huiberts <dax.huibe...@gmail.com> wrote:
> I tried to do a capistrano deployment yesterday when it suddenly didn't
> want to
> work anymore.
> It says "address family for hostname not supported". After a lot of
> searching and googling and source code lookup I came to the following:
> On my development machine @ work (Windows 2003) there is a problem with
> the low level Socket.getnameinfo() call.
> When I try to do a
> Socket.getnameinfo(['AF_INET', '22', 'beeplet.com'])
> I get the above exception. but a
> Socket.getnameinfo(['AF_INET', '23', 'beeplet.com'])
> it works like a charm. It doesn't have anything to do
> with what domain I use, it only happens when I use port 22 (ssh) in the
> method call. Everything worked fine 2 days ago and now, suddenly, it
> bails on me.
> Doing the above method call from my development machine @ home (Ubuntu)
> it all works just fine.
>
> I don't know how and why I get this exception and haven't been able to
> find a sollution either. Maybe somebody knows something more on this
> topic?

Are you using the one click installer? Perhaps this issue (# 9438) is
related:

http://rubyforge.org/tracker/index.php?func=detail&aid=9438&group_id=167&am...

Regards,

Dan

Gordon Thiesfeld

5/4/2007 3:22:00 PM

0

You need to specify ssh in the %systemroot%\system32\drivers\etc
\services file.

Open it, and add a line like this:

ssh 22/tcp #SSH


Gordon



Dax Huiberts

5/4/2007 3:43:00 PM

0

Daniel Berger wrote:
>
> Are you using the one click installer? Perhaps this issue (# 9438) is
> related:
>
> http://rubyforge.org/tracker/index.php?func=detail&aid=9438&group_id=167&am...
>
> Regards,
>
> Dan

I'm not sure if that is the case, it worked all fine before, and I
haven't updated my ruby installation.

But I solved it another way.
I uninstalled the net-ssh1.1.0 gem and now my capistrano deployment is
working flawlessly again with net-ssh1.0.10.
Thanks to a colleague futher down the hall @ work. He had a different
error, but problems with the latest net-ssh nonetheless.

--
Posted via http://www.ruby-....

Dax Huiberts

5/4/2007 4:00:00 PM

0

Gordon Thiesfeld wrote:
> You need to specify ssh in the %systemroot%\system32\drivers\etc
> \services file.
>
> Open it, and add a line like this:
>
> ssh 22/tcp #SSH
>
>
> Gordon

Cool!

That solved one problem,
now it wanted to create a file in my %home_dir%/.ssh directory which
didn't exists and quit. Manually creating that directory and adding the
ssh line to my services file makes net-ssh1.1.0 work with windows.
Apparently net-ssh1.1.0 isn't really geared towards windows usage I
suppose.

Thanks for all the help, I now know why it didn't work and how to solve
it.

--
Posted via http://www.ruby-....

Daniel Berger

5/4/2007 5:41:00 PM

0

On May 4, 9:59 am, Dax Huiberts <dax.huibe...@gmail.com> wrote:
> Gordon Thiesfeld wrote:
> > You need to specify ssh in the %systemroot%\system32\drivers\etc
> > \services file.
>
> > Open it, and add a line like this:
>
> > ssh 22/tcp #SSH
>
> > Gordon
>
> Cool!
>
> That solved one problem,
> now it wanted to create a file in my %home_dir%/.ssh directory which
> didn't exists and quit. Manually creating that directory and adding the
> ssh line to my services file makes net-ssh1.1.0 work with windows.
> Apparently net-ssh1.1.0 isn't really geared towards windows usage I
> suppose.

I found the problem (and it wasn't a Windows problem). It's the host-
key-verifier.rb file. Change line 64 to this:

Dir.mkdir(key_directory, 0700) if !File.exists?(key_directory)

I've already filed a bug report on the project site.

Regards,

Dan