[Solved] Cant Telnet My Box

I don’t get it. I wanted to use a cool script to automatically make a snapshot from droplets on digitalocean. But it seems, that I can’t enter the command the right way, so that the email is actually send. I always get an error about a service not known and a socket error:

Sending e-mail notification.
getaddrinfo: Name or service not known
/usr/lib/ruby/2.2.0/net/smtp.rb:541:in `initialize'
/usr/lib/ruby/2.2.0/net/smtp.rb:541:in `open'
/usr/lib/ruby/2.2.0/net/smtp.rb:541:in `tcp_socket'
/usr/lib/ruby/2.2.0/net/smtp.rb:551:in `block in do_start'
/usr/lib/ruby/2.2.0/timeout.rb:89:in `block in timeout'
/usr/lib/ruby/2.2.0/timeout.rb:99:in `call'
/usr/lib/ruby/2.2.0/timeout.rb:99:in `timeout'
/usr/lib/ruby/2.2.0/net/smtp.rb:550:in `do_start'
/usr/lib/ruby/2.2.0/net/smtp.rb:520:in `start'
/home/nate/.gem/ruby/2.2.0/gems/mail-2.6.3/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
/home/nate/.gem/ruby/2.2.0/gems/mail-2.6.3/lib/mail/message.rb:252:in `deliver!'
/home/nate/.gem/ruby/2.2.0/gems/pony-1.11/lib/pony.rb:176:in `deliver'
/home/nate/.gem/ruby/2.2.0/gems/pony-1.11/lib/pony.rb:166:in `mail'
/home/nate/.gem/ruby/2.2.0/gems/do_snapshot-0.3.0/lib/do_snapshot/mail.rb:56:in `call'
/home/nate/.gem/ruby/2.2.0/gems/do_snapshot-0.3.0/lib/do_snapshot/mail.rb:56:in `notify'
/home/nate/.gem/ruby/2.2.0/gems/do_snapshot-0.3.0/lib/do_snapshot/command.rb:19:in `snap'
/home/nate/.gem/ruby/2.2.0/gems/do_snapshot-0.3.0/lib/do_snapshot/cli.rb:161:in `snap'
/home/nate/.gem/ruby/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
/home/nate/.gem/ruby/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
/home/nate/.gem/ruby/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
/home/nate/.gem/ruby/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
/home/nate/.gem/ruby/2.2.0/gems/do_snapshot-0.3.0/lib/do_snapshot/runner.rb:34:in `run_cli'
/home/nate/.gem/ruby/2.2.0/gems/do_snapshot-0.3.0/lib/do_snapshot/runner.rb:13:in `execute!'
/home/nate/.gem/ruby/2.2.0/gems/do_snapshot-0.3.0/bin/do_snapshot:15:in `<top (required)>'
/home/nate/.gem/ruby/2.2.0/bin/do_snapshot:23:in `load'
/home/nate/.gem/ruby/2.2.0/bin/do_snapshot:23:in `<main>'
Sending e-mail notification.
/usr/lib/ruby/2.2.0/net/smtp.rb:541:in `initialize': getaddrinfo: Name or service not known (SocketError)
    from /usr/lib/ruby/2.2.0/net/smtp.rb:541:in `open'
    from /usr/lib/ruby/2.2.0/net/smtp.rb:541:in `tcp_socket'
    from /usr/lib/ruby/2.2.0/net/smtp.rb:551:in `block in do_start'
    from /usr/lib/ruby/2.2.0/timeout.rb:89:in `block in timeout'
    from /usr/lib/ruby/2.2.0/timeout.rb:99:in `call'
    from /usr/lib/ruby/2.2.0/timeout.rb:99:in `timeout'
    from /usr/lib/ruby/2.2.0/net/smtp.rb:550:in `do_start'
    from /usr/lib/ruby/2.2.0/net/smtp.rb:520:in `start'
    from /home/nate/.gem/ruby/2.2.0/gems/mail-2.6.3/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
    from /home/nate/.gem/ruby/2.2.0/gems/mail-2.6.3/lib/mail/message.rb:252:in `deliver!'
    from /home/nate/.gem/ruby/2.2.0/gems/pony-1.11/lib/pony.rb:176:in `deliver'
    from /home/nate/.gem/ruby/2.2.0/gems/pony-1.11/lib/pony.rb:166:in `mail'
    from /home/nate/.gem/ruby/2.2.0/gems/do_snapshot-0.3.0/lib/do_snapshot/mail.rb:56:in `call'
    from /home/nate/.gem/ruby/2.2.0/gems/do_snapshot-0.3.0/lib/do_snapshot/mail.rb:56:in `notify'
    from /home/nate/.gem/ruby/2.2.0/gems/do_snapshot-0.3.0/lib/do_snapshot/cli.rb:219:in `send_error'
    from /home/nate/.gem/ruby/2.2.0/gems/do_snapshot-0.3.0/lib/do_snapshot/cli.rb:184:in `error_with_backtrace'
    from /home/nate/.gem/ruby/2.2.0/gems/do_snapshot-0.3.0/lib/do_snapshot/cli.rb:166:in `rescue in snap'
    from /home/nate/.gem/ruby/2.2.0/gems/do_snapshot-0.3.0/lib/do_snapshot/cli.rb:161:in `snap'
    from /home/nate/.gem/ruby/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /home/nate/.gem/ruby/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /home/nate/.gem/ruby/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /home/nate/.gem/ruby/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /home/nate/.gem/ruby/2.2.0/gems/do_snapshot-0.3.0/lib/do_snapshot/runner.rb:34:in `run_cli'
    from /home/nate/.gem/ruby/2.2.0/gems/do_snapshot-0.3.0/lib/do_snapshot/runner.rb:13:in `execute!'
    from /home/nate/.gem/ruby/2.2.0/gems/do_snapshot-0.3.0/bin/do_snapshot:15:in `<top (required)>'
    from /home/nate/.gem/ruby/2.2.0/bin/do_snapshot:23:in `load'
    from /home/nate/.gem/ruby/2.2.0/bin/do_snapshot:23:in `<main>'

Sorry, I think it is easy, but I can’t figure it out. I tried the whole day… Thanks for you patience!

Please follow the instructions at https://mailinabox.email/maintenance.html and then report back.

Okay, I followed the instructions. All is green except for 2 domains where I can’t set the DNSSEC DS records cause the provider doesn’t offer that.

Now I wanted to use do_snapshot to make automatic backups of my droplets on digitalocean. That works fine (the backup is completed), but always in the end, when it should sent an email, I get the error messages I posted above.

The command I type in: do_snapshot -p 2 --only 6269613 -k 3 -c -m to:TO from:FROM -t address:HOST user_name:LOGIN password:PASSWORD port:587 -v

I also tried with authentication and enable_starttls_auto.

When I type telnet -d box.mydomain.com

I get the following back:

Trying 2a03:b0c0:3:d0::2a:3001... setsockopt (SO_DEBUG): Permission denied

Hope that helps. And thanks for your help!

I just telnet to my box.domainname.tld

telnet -d box.domainname.tld 587

I believe you must supply the port.

HTH

Thanks @pimpedoutgeek - I forogt the port. My bad. And the other thing is today working. I dont know what I did differently. I just rebuilded all from scratch today. Weird. Ah btw: I :heart: MiaB!

1 Like