Quantcast

Errno::ENETUNREACH: Network is unreachable with deploy:check

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Errno::ENETUNREACH: Network is unreachable with deploy:check

simon
Hi I tried to deploy foodsoft.

I am not very much into ruby/rails etc., but this is what i did:

I forked the repo and added a deploy ssh key to my github foodsoft repo, altered the config files: deploy.rb, deploy/*.rb.
 
When excuting on my local machine the deploy:check I got the following error:

bundle exec cap production deploy:check --trace
** Invoke production (first_time)
** Execute production
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke rvm:hook (first_time)
** Execute rvm:hook
cap aborted!
Errno::ENETUNREACH: Network is unreachable - connect(2) for [2606:2800:220:1:248:1893:25c8:1946]:22
/home/simon/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/socket.rb:64:in `connect'
/home/simon/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/socket.rb:64:in `connect_internal'
/home/simon/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/socket.rb:139:in `connect'
/home/simon/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/socket.rb:636:in `block in tcp'
/home/simon/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/socket.rb:231:in `each'
/home/simon/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/socket.rb:231:in `foreach'
/home/simon/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/socket.rb:626:in `tcp'
/home/simon/.rvm/gems/ruby-2.3.0/gems/net-ssh-3.1.1/lib/net/ssh/transport/session.rb:70:in `initialize'
/home/simon/.rvm/gems/ruby-2.3.0/gems/net-ssh-3.1.1/lib/net/ssh.rb:229:in `new'
/home/simon/.rvm/gems/ruby-2.3.0/gems/net-ssh-3.1.1/lib/net/ssh.rb:229:in `start'
/home/simon/.rvm/gems/ruby-2.3.0/gems/sshkit-1.10.0/lib/sshkit/backends/connection_pool.rb:59:in `call'
/home/simon/.rvm/gems/ruby-2.3.0/gems/sshkit-1.10.0/lib/sshkit/backends/connection_pool.rb:59:in `with'
/home/simon/.rvm/gems/ruby-2.3.0/gems/sshkit-1.10.0/lib/sshkit/backends/netssh.rb:143:in `with_ssh'
/home/simon/.rvm/gems/ruby-2.3.0/gems/sshkit-1.10.0/lib/sshkit/backends/netssh.rb:96:in `execute_command'
/home/simon/.rvm/gems/ruby-2.3.0/gems/sshkit-1.10.0/lib/sshkit/backends/abstract.rb:137:in `block in create_command_and_execute'
/home/simon/.rvm/gems/ruby-2.3.0/gems/sshkit-1.10.0/lib/sshkit/backends/abstract.rb:137:in `tap'
/home/simon/.rvm/gems/ruby-2.3.0/gems/sshkit-1.10.0/lib/sshkit/backends/abstract.rb:137:in `create_command_and_execute'
/home/simon/.rvm/gems/ruby-2.3.0/gems/sshkit-1.10.0/lib/sshkit/backends/abstract.rb:50:in `test'



Any ideas?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Errno::ENETUNREACH: Network is unreachable with deploy:check

wvengen
Administrator
Hi,

This looks like you're deploying to an IPv6 address that doesn't having
SSH listening. You could try to enable SSH for IPv6, disable IPv4 on
your deploying machine, or specify an IPv4-addres in your ~/.ssh/config
for the host, among other options.

- Willem

On 23-04-16 15:13, simon [via foodsoft] wrote:
> Errno::ENETUNREACH: Network is unreachable - connect(2) for
> [2606:2800:220:1:248:1893:25c8:1946]:22
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Errno::ENETUNREACH: Network is unreachable with deploy:check

simon
I did this on the server:

sudo netstat -lntpe | grep :22
 
tcp        0      0  0.0.0.0:22              0.0.0.0:*               LISTEN      0          1906590555  435/sshd        
tcp6      0      0  :::22                       :::*                    LISTEN       0          1906590559  435/sshd


Doesn't this mean, that is is listining on ipv6 with ssh?



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Errno::ENETUNREACH: Network is unreachable with deploy:check

wvengen
Administrator
On 24-04-16 11:01, simon [via foodsoft] wrote:

> I did this on the server:
>
> sudo netstat -lntpe | grep :22
>  
> tcp        0      0  0.0.0.0:22              0.0.0.0:*              
> LISTEN      0          1906590555  435/sshd        
> tcp6      0      0  :::22                       :::*                  
>  LISTEN       0          1906590559  435/sshd
>
>
> Doesn't this mean, that is is listining on ipv6 with ssh?
Yes it is! Perhaps the firewall is still blocking it?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Errno::ENETUNREACH: Network is unreachable with deploy:check

simon
Hm, on the ubuntu 12.04 sever ufw is not active/existing.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Errno::ENETUNREACH: Network is unreachable with deploy:check

simon
And on the deploying machine ubuntu 14.04 neither (it's inactive)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Errno::ENETUNREACH: Network is unreachable with deploy:check

wvengen
Administrator
On 24-04-16 11:30, simon [via foodsoft] wrote:
> And on the deploying machine ubuntu 14.04 neither (it's inactive)
If you want to just get it deployed, I'd ssh to the IPv4 address
(instead of the hostname). IPv6 has gotten a long way, but it isn't
always fully working out of the box :( Apart from the server and your
own computer, your ISP and hosting provider also need to support it.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Errno::ENETUNREACH: Network is unreachable with deploy:check

simon
Ok, stupid me: forgot to adapt the first three lines in config/production.rb :

role :app, %w{user@exmaple.com}
etc.

Now I could connect and I will continue to set config files on server!

Thanks anyway.
Loading...