Capistrano fails without error message - deployment

I'm having problems deploying with Capistrano. The deploy works fine from my MacBook, but when I try to run it from a server (running Debian) it fails without any error message, or at least one that I can discern. With debug mode on:
bundle exec cap staging deploy
D, [2014-05-23T13:56:12.426469 #29555] DEBUG -- net.ssh.transport.session[164f428]: establishing connection to bbos.parisleaf.com:22
D, [2014-05-23T13:56:12.457445 #29555] DEBUG -- net.ssh.transport.session[164f428]: connection established
I, [2014-05-23T13:56:12.457565 #29555] INFO -- net.ssh.transport.server_version[164e5c8]: negotiating protocol version
D, [2014-05-23T13:56:12.505677 #29555] DEBUG -- net.ssh.transport.server_version[164e5c8]: remote is `SSH-2.0-OpenSSH_5.3'
D, [2014-05-23T13:56:12.505750 #29555] DEBUG -- net.ssh.transport.server_version[164e5c8]: local is `SSH-2.0-Ruby/Net::SSH_2.9.1 x86_64-linux'
D, [2014-05-23T13:56:12.515288 #29555] DEBUG -- tcpsocket[164ef00]: read 840 bytes
D, [2014-05-23T13:56:12.515437 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 0 type 20 len 836
I, [2014-05-23T13:56:12.515548 #29555] INFO -- net.ssh.transport.algorithms[164b4e0]: got KEXINIT from server
I, [2014-05-23T13:56:12.515676 #29555] INFO -- net.ssh.transport.algorithms[164b4e0]: sending KEXINIT
D, [2014-05-23T13:56:12.515851 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 0 type 20 len 2020
D, [2014-05-23T13:56:12.515965 #29555] DEBUG -- tcpsocket[164ef00]: sent 2024 bytes
I, [2014-05-23T13:56:12.516007 #29555] INFO -- net.ssh.transport.algorithms[164b4e0]: negotiating algorithms
D, [2014-05-23T13:56:12.516119 #29555] DEBUG -- net.ssh.transport.algorithms[164b4e0]: negotiated:
* kex: diffie-hellman-group-exchange-sha1
* host_key: ssh-rsa
* encryption_server: aes128-cbc
* encryption_client: aes128-cbc
* hmac_client: hmac-sha1
* hmac_server: hmac-sha1
* compression_client: none
* compression_server: none
* language_client:
* language_server:
D, [2014-05-23T13:56:12.516170 #29555] DEBUG -- net.ssh.transport.algorithms[164b4e0]: exchanging keys
D, [2014-05-23T13:56:12.516383 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 1 type 34 len 20
D, [2014-05-23T13:56:12.516453 #29555] DEBUG -- tcpsocket[164ef00]: sent 24 bytes
D, [2014-05-23T13:56:12.532884 #29555] DEBUG -- tcpsocket[164ef00]: read 152 bytes
D, [2014-05-23T13:56:12.532976 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 1 type 31 len 148
D, [2014-05-23T13:56:12.534509 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 2 type 32 len 140
D, [2014-05-23T13:56:12.534583 #29555] DEBUG -- tcpsocket[164ef00]: sent 144 bytes
D, [2014-05-23T13:56:12.546729 #29555] DEBUG -- tcpsocket[164ef00]: read 720 bytes
D, [2014-05-23T13:56:12.546836 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 2 type 33 len 700
D, [2014-05-23T13:56:12.548450 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 3 type 21 len 20
D, [2014-05-23T13:56:12.548525 #29555] DEBUG -- tcpsocket[164ef00]: sent 24 bytes
D, [2014-05-23T13:56:12.548598 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 3 type 21 len 12
D, [2014-05-23T13:56:12.548912 #29555] DEBUG -- net.ssh.authentication.session[15a0068]: beginning authentication of `parisl5'
D, [2014-05-23T13:56:12.549056 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 4 type 5 len 28
D, [2014-05-23T13:56:12.549109 #29555] DEBUG -- tcpsocket[164ef00]: sent 52 bytes
D, [2014-05-23T13:56:12.603794 #29555] DEBUG -- tcpsocket[164ef00]: read 52 bytes
D, [2014-05-23T13:56:12.603914 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 4 type 6 len 28
D, [2014-05-23T13:56:12.604060 #29555] DEBUG -- net.ssh.authentication.session[15a0068]: trying none
D, [2014-05-23T13:56:12.604218 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 5 type 50 len 44
D, [2014-05-23T13:56:12.604288 #29555] DEBUG -- tcpsocket[164ef00]: sent 68 bytes
D, [2014-05-23T13:56:12.620777 #29555] DEBUG -- tcpsocket[164ef00]: read 84 bytes
D, [2014-05-23T13:56:12.620884 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 5 type 51 len 60
D, [2014-05-23T13:56:12.620977 #29555] DEBUG -- net.ssh.authentication.session[15a0068]: allowed methods: publickey,gssapi-keyex,gssapi-with-mic,password
D, [2014-05-23T13:56:12.621045 #29555] DEBUG -- net.ssh.authentication.methods.none[159a294]: none failed
D, [2014-05-23T13:56:12.621116 #29555] DEBUG -- net.ssh.authentication.session[15a0068]: trying publickey
D, [2014-05-23T13:56:12.621357 #29555] DEBUG -- net.ssh.authentication.agent[1591ec8]: connecting to ssh-agent
D, [2014-05-23T13:56:12.621548 #29555] DEBUG -- net.ssh.authentication.agent[1591ec8]: sending agent request 1 len 44
D, [2014-05-23T13:56:12.621663 #29555] DEBUG -- net.ssh.authentication.agent[1591ec8]: received agent packet 2 len 5
D, [2014-05-23T13:56:12.621719 #29555] DEBUG -- net.ssh.authentication.agent[1591ec8]: sending agent request 11 len 0
D, [2014-05-23T13:56:12.621791 #29555] DEBUG -- net.ssh.authentication.agent[1591ec8]: received agent packet 12 len 5
D, [2014-05-23T13:56:12.621968 #29555] DEBUG -- net.ssh.authentication.methods.publickey[159841c]: trying publickey (eb:20:b5:5e:1b:f0:fd:b7:df:36:21:37:3c:ed:5a:c7)
D, [2014-05-23T13:56:12.622136 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 6 type 50 len 348
D, [2014-05-23T13:56:12.622204 #29555] DEBUG -- tcpsocket[164ef00]: sent 372 bytes
D, [2014-05-23T13:56:12.677190 #29555] DEBUG -- tcpsocket[164ef00]: read 324 bytes
D, [2014-05-23T13:56:12.677675 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 6 type 60 len 300
D, [2014-05-23T13:56:12.681739 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 7 type 50 len 620
D, [2014-05-23T13:56:12.682001 #29555] DEBUG -- tcpsocket[164ef00]: sent 644 bytes
D, [2014-05-23T13:56:12.908290 #29555] DEBUG -- tcpsocket[164ef00]: read 36 bytes
D, [2014-05-23T13:56:12.908674 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 7 type 52 len 12
D, [2014-05-23T13:56:12.908821 #29555] DEBUG -- net.ssh.authentication.methods.publickey[159841c]: publickey succeeded (eb:20:b5:5e:1b:f0:fd:b7:df:36:21:37:3c:ed:5a:c7)
D, [2014-05-23T13:56:12.909278 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 8 type 90 len 44
D, [2014-05-23T13:56:12.909467 #29555] DEBUG -- tcpsocket[164ef00]: sent 68 bytes
D, [2014-05-23T13:56:12.919453 #29555] DEBUG -- tcpsocket[164ef00]: read 52 bytes
D, [2014-05-23T13:56:12.919568 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 8 type 91 len 28
I, [2014-05-23T13:56:12.919704 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_open_confirmation: 0 0 0 32768
I, [2014-05-23T13:56:12.919809 #29555] INFO -- net.ssh.connection.channel[157fd68]: sending channel request "auth-agent-req#openssh.com"
D, [2014-05-23T13:56:12.919911 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 9 type 98 len 44
I, [2014-05-23T13:56:12.920156 #29555] INFO -- net.ssh.connection.channel[157fd68]: sending channel request "pty-req"
D, [2014-05-23T13:56:12.920291 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 10 type 98 len 60
I, [2014-05-23T13:56:12.920414 #29555] INFO -- net.ssh.connection.channel[157fd68]: sending channel request "exec"
D, [2014-05-23T13:56:12.920510 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 11 type 98 len 76
D, [2014-05-23T13:56:12.920613 #29555] DEBUG -- tcpsocket[164ef00]: sent 252 bytes
D, [2014-05-23T13:56:12.933390 #29555] DEBUG -- tcpsocket[164ef00]: read 124 bytes
D, [2014-05-23T13:56:12.933511 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 9 type 99 len 12
I, [2014-05-23T13:56:12.933586 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_success: 0
D, [2014-05-23T13:56:12.933654 #29555] DEBUG -- net.ssh.service.forward[157dae0]: authentication agent forwarding is active
D, [2014-05-23T13:56:12.933747 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 10 type 93 len 28
I, [2014-05-23T13:56:12.933831 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_window_adjust: 0 +2097152
D, [2014-05-23T13:56:12.933923 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 11 type 99 len 12
I, [2014-05-23T13:56:12.933979 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_success: 0
D, [2014-05-23T13:56:13.341594 #29555] DEBUG -- tcpsocket[164ef00]: read 140 bytes
D, [2014-05-23T13:56:13.341887 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 12 type 98 len 44
I, [2014-05-23T13:56:13.342018 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_request: 0 exit-status false
D, [2014-05-23T13:56:13.342293 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 13 type 96 len 12
I, [2014-05-23T13:56:13.342358 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_eof: 0
D, [2014-05-23T13:56:13.342455 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 14 type 97 len 12
I, [2014-05-23T13:56:13.342515 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_close: 0
D, [2014-05-23T13:56:13.342651 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 12 type 97 len 28
D, [2014-05-23T13:56:13.342889 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 13 type 90 len 44
D, [2014-05-23T13:56:13.342999 #29555] DEBUG -- tcpsocket[164ef00]: sent 120 bytes
D, [2014-05-23T13:56:13.350744 #29555] DEBUG -- tcpsocket[164ef00]: read 52 bytes
D, [2014-05-23T13:56:13.350864 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 15 type 91 len 28
I, [2014-05-23T13:56:13.350969 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_open_confirmation: 1 2 0 32768
I, [2014-05-23T13:56:13.351257 #29555] INFO -- net.ssh.connection.channel[1561ad4]: sending channel request "exec"
D, [2014-05-23T13:56:13.351381 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 14 type 98 len 60
D, [2014-05-23T13:56:13.351510 #29555] DEBUG -- tcpsocket[164ef00]: sent 84 bytes
D, [2014-05-23T13:56:13.359771 #29555] DEBUG -- tcpsocket[164ef00]: read 88 bytes
D, [2014-05-23T13:56:13.359879 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 16 type 93 len 28
I, [2014-05-23T13:56:13.359945 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_window_adjust: 1 +2097152
D, [2014-05-23T13:56:13.360032 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 17 type 99 len 12
I, [2014-05-23T13:56:13.360090 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_success: 1
D, [2014-05-23T13:56:13.364698 #29555] DEBUG -- tcpsocket[164ef00]: read 68 bytes
D, [2014-05-23T13:56:13.364823 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 18 type 95 len 44
I, [2014-05-23T13:56:13.364897 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_extended_data: 1 1 20b
D, [2014-05-23T13:56:13.364967 #29555] DEBUG -- net.scp[1561b9c]: stdin: is not a tty
D, [2014-05-23T13:56:13.476659 #29555] DEBUG -- tcpsocket[164ef00]: read 52 bytes
D, [2014-05-23T13:56:13.476786 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 19 type 94 len 28
I, [2014-05-23T13:56:13.476857 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_data: 1 1b
D, [2014-05-23T13:56:13.477103 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 15 type 94 len 44
D, [2014-05-23T13:56:13.477204 #29555] DEBUG -- tcpsocket[164ef00]: sent 68 bytes
D, [2014-05-23T13:56:13.484968 #29555] DEBUG -- tcpsocket[164ef00]: read 52 bytes
D, [2014-05-23T13:56:13.485076 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 20 type 94 len 28
I, [2014-05-23T13:56:13.485141 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_data: 1 1b
D, [2014-05-23T13:56:13.485350 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 16 type 94 len 108
D, [2014-05-23T13:56:13.485440 #29555] DEBUG -- tcpsocket[164ef00]: sent 132 bytes
D, [2014-05-23T13:56:13.485564 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 17 type 94 len 28
D, [2014-05-23T13:56:13.485631 #29555] DEBUG -- tcpsocket[164ef00]: sent 52 bytes
D, [2014-05-23T13:56:13.540858 #29555] DEBUG -- tcpsocket[164ef00]: read 52 bytes
D, [2014-05-23T13:56:13.540985 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 21 type 94 len 28
I, [2014-05-23T13:56:13.541056 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_data: 1 1b
D, [2014-05-23T13:56:13.541190 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 18 type 96 len 28
D, [2014-05-23T13:56:13.541278 #29555] DEBUG -- tcpsocket[164ef00]: sent 52 bytes
D, [2014-05-23T13:56:13.549673 #29555] DEBUG -- tcpsocket[164ef00]: read 140 bytes
D, [2014-05-23T13:56:13.549786 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 22 type 98 len 44
I, [2014-05-23T13:56:13.549876 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_request: 1 exit-status false
D, [2014-05-23T13:56:13.549975 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 23 type 96 len 12
I, [2014-05-23T13:56:13.550034 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_eof: 1
D, [2014-05-23T13:56:13.550120 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 24 type 97 len 12
I, [2014-05-23T13:56:13.550178 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_close: 1
D, [2014-05-23T13:56:13.550286 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 19 type 97 len 28
D, [2014-05-23T13:56:13.550637 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 20 type 90 len 44
D, [2014-05-23T13:56:13.550748 #29555] DEBUG -- tcpsocket[164ef00]: sent 120 bytes
D, [2014-05-23T13:56:13.558562 #29555] DEBUG -- tcpsocket[164ef00]: read 52 bytes
D, [2014-05-23T13:56:13.558729 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 25 type 91 len 28
I, [2014-05-23T13:56:13.558809 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_open_confirmation: 2 0 0 32768
I, [2014-05-23T13:56:13.559094 #29555] INFO -- net.ssh.connection.channel[151f10c]: sending channel request "pty-req"
D, [2014-05-23T13:56:13.559211 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 21 type 98 len 60
I, [2014-05-23T13:56:13.559345 #29555] INFO -- net.ssh.connection.channel[151f10c]: sending channel request "exec"
D, [2014-05-23T13:56:13.559462 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 22 type 98 len 92
D, [2014-05-23T13:56:13.559566 #29555] DEBUG -- tcpsocket[164ef00]: sent 200 bytes
D, [2014-05-23T13:56:13.568305 #29555] DEBUG -- tcpsocket[164ef00]: read 88 bytes
D, [2014-05-23T13:56:13.568418 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 26 type 93 len 28
I, [2014-05-23T13:56:13.568487 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_window_adjust: 2 +2097152
D, [2014-05-23T13:56:13.568576 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 27 type 99 len 12
I, [2014-05-23T13:56:13.568634 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_success: 2
D, [2014-05-23T13:56:13.686413 #29555] DEBUG -- tcpsocket[164ef00]: read 140 bytes
D, [2014-05-23T13:56:13.686577 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 28 type 98 len 44
I, [2014-05-23T13:56:13.686655 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_request: 2 exit-status false
D, [2014-05-23T13:56:13.686850 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 29 type 96 len 12
I, [2014-05-23T13:56:13.686912 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_eof: 2
D, [2014-05-23T13:56:13.687034 #29555] DEBUG -- tcpsocket[164ef00]: received packet nr 30 type 97 len 12
I, [2014-05-23T13:56:13.687093 #29555] INFO -- net.ssh.connection.session[157fee4]: channel_close: 2
D, [2014-05-23T13:56:13.687186 #29555] DEBUG -- tcpsocket[164ef00]: queueing packet nr 23 type 97 len 28
D, [2014-05-23T13:56:13.688474 #29555] DEBUG -- net.ssh.transport.session[14e6a00]: establishing connection to bbos.parisleaf.com:22
D, [2014-05-23T13:56:13.718650 #29555] DEBUG -- net.ssh.transport.session[14e6a00]: connection established
I, [2014-05-23T13:56:13.718740 #29555] INFO -- net.ssh.transport.server_version[14e38a0]: negotiating protocol version
D, [2014-05-23T13:56:13.733418 #29555] DEBUG -- net.ssh.transport.server_version[14e38a0]: remote is `SSH-2.0-OpenSSH_5.3'
D, [2014-05-23T13:56:13.733476 #29555] DEBUG -- net.ssh.transport.server_version[14e38a0]: local is `SSH-2.0-Ruby/Net::SSH_2.9.1 x86_64-linux'
D, [2014-05-23T13:56:13.742420 #29555] DEBUG -- tcpsocket[14e60c8]: read 840 bytes
D, [2014-05-23T13:56:13.742512 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 0 type 20 len 836
I, [2014-05-23T13:56:13.742583 #29555] INFO -- net.ssh.transport.algorithms[14e2d60]: got KEXINIT from server
I, [2014-05-23T13:56:13.742682 #29555] INFO -- net.ssh.transport.algorithms[14e2d60]: sending KEXINIT
D, [2014-05-23T13:56:13.742834 #29555] DEBUG -- tcpsocket[14e60c8]: queueing packet nr 0 type 20 len 2020
D, [2014-05-23T13:56:13.742908 #29555] DEBUG -- tcpsocket[14e60c8]: sent 2024 bytes
I, [2014-05-23T13:56:13.742949 #29555] INFO -- net.ssh.transport.algorithms[14e2d60]: negotiating algorithms
D, [2014-05-23T13:56:13.743057 #29555] DEBUG -- net.ssh.transport.algorithms[14e2d60]: negotiated:
* kex: diffie-hellman-group-exchange-sha1
* host_key: ssh-rsa
* encryption_server: aes128-cbc
* encryption_client: aes128-cbc
* hmac_client: hmac-sha1
* hmac_server: hmac-sha1
* compression_client: none
* compression_server: none
* language_client:
* language_server:
D, [2014-05-23T13:56:13.743093 #29555] DEBUG -- net.ssh.transport.algorithms[14e2d60]: exchanging keys
D, [2014-05-23T13:56:13.743260 #29555] DEBUG -- tcpsocket[14e60c8]: queueing packet nr 1 type 34 len 20
D, [2014-05-23T13:56:13.743338 #29555] DEBUG -- tcpsocket[14e60c8]: sent 24 bytes
D, [2014-05-23T13:56:13.759984 #29555] DEBUG -- tcpsocket[14e60c8]: read 152 bytes
D, [2014-05-23T13:56:13.760078 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 1 type 31 len 148
D, [2014-05-23T13:56:13.761529 #29555] DEBUG -- tcpsocket[14e60c8]: queueing packet nr 2 type 32 len 140
D, [2014-05-23T13:56:13.761602 #29555] DEBUG -- tcpsocket[14e60c8]: sent 144 bytes
D, [2014-05-23T13:56:13.774158 #29555] DEBUG -- tcpsocket[14e60c8]: read 720 bytes
D, [2014-05-23T13:56:13.774262 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 2 type 33 len 700
D, [2014-05-23T13:56:13.775672 #29555] DEBUG -- tcpsocket[14e60c8]: queueing packet nr 3 type 21 len 20
D, [2014-05-23T13:56:13.775745 #29555] DEBUG -- tcpsocket[14e60c8]: sent 24 bytes
D, [2014-05-23T13:56:13.775818 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 3 type 21 len 12
D, [2014-05-23T13:56:13.776077 #29555] DEBUG -- net.ssh.authentication.session[130f254]: beginning authentication of `parisl5'
D, [2014-05-23T13:56:13.776176 #29555] DEBUG -- tcpsocket[14e60c8]: queueing packet nr 4 type 5 len 28
D, [2014-05-23T13:56:13.776228 #29555] DEBUG -- tcpsocket[14e60c8]: sent 52 bytes
D, [2014-05-23T13:56:13.831201 #29555] DEBUG -- tcpsocket[14e60c8]: read 52 bytes
D, [2014-05-23T13:56:13.831335 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 4 type 6 len 28
D, [2014-05-23T13:56:13.831470 #29555] DEBUG -- net.ssh.authentication.session[130f254]: trying none
D, [2014-05-23T13:56:13.831606 #29555] DEBUG -- tcpsocket[14e60c8]: queueing packet nr 5 type 50 len 44
D, [2014-05-23T13:56:13.831675 #29555] DEBUG -- tcpsocket[14e60c8]: sent 68 bytes
D, [2014-05-23T13:56:13.839770 #29555] DEBUG -- tcpsocket[14e60c8]: read 84 bytes
D, [2014-05-23T13:56:13.839887 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 5 type 51 len 60
D, [2014-05-23T13:56:13.839966 #29555] DEBUG -- net.ssh.authentication.session[130f254]: allowed methods: publickey,gssapi-keyex,gssapi-with-mic,password
D, [2014-05-23T13:56:13.840043 #29555] DEBUG -- net.ssh.authentication.methods.none[130c5cc]: none failed
D, [2014-05-23T13:56:13.840104 #29555] DEBUG -- net.ssh.authentication.session[130f254]: trying publickey
D, [2014-05-23T13:56:13.840290 #29555] DEBUG -- net.ssh.authentication.agent[12faa34]: connecting to ssh-agent
D, [2014-05-23T13:56:13.840429 #29555] DEBUG -- net.ssh.authentication.agent[12faa34]: sending agent request 1 len 44
D, [2014-05-23T13:56:13.840528 #29555] DEBUG -- net.ssh.authentication.agent[12faa34]: received agent packet 2 len 5
D, [2014-05-23T13:56:13.840577 #29555] DEBUG -- net.ssh.authentication.agent[12faa34]: sending agent request 11 len 0
D, [2014-05-23T13:56:13.840646 #29555] DEBUG -- net.ssh.authentication.agent[12faa34]: received agent packet 12 len 5
D, [2014-05-23T13:56:13.840772 #29555] DEBUG -- net.ssh.authentication.methods.publickey[12fb510]: trying publickey (eb:20:b5:5e:1b:f0:fd:b7:df:36:21:37:3c:ed:5a:c7)
D, [2014-05-23T13:56:13.840910 #29555] DEBUG -- tcpsocket[14e60c8]: queueing packet nr 6 type 50 len 348
D, [2014-05-23T13:56:13.840977 #29555] DEBUG -- tcpsocket[14e60c8]: sent 372 bytes
D, [2014-05-23T13:56:13.849281 #29555] DEBUG -- tcpsocket[14e60c8]: read 324 bytes
D, [2014-05-23T13:56:13.849394 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 6 type 60 len 300
D, [2014-05-23T13:56:13.852219 #29555] DEBUG -- tcpsocket[14e60c8]: queueing packet nr 7 type 50 len 620
D, [2014-05-23T13:56:13.852306 #29555] DEBUG -- tcpsocket[14e60c8]: sent 644 bytes
D, [2014-05-23T13:56:13.861094 #29555] DEBUG -- tcpsocket[14e60c8]: read 36 bytes
D, [2014-05-23T13:56:13.861238 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 7 type 52 len 12
D, [2014-05-23T13:56:13.861311 #29555] DEBUG -- net.ssh.authentication.methods.publickey[12fb510]: publickey succeeded (eb:20:b5:5e:1b:f0:fd:b7:df:36:21:37:3c:ed:5a:c7)
D, [2014-05-23T13:56:13.861519 #29555] DEBUG -- tcpsocket[14e60c8]: queueing packet nr 8 type 90 len 44
D, [2014-05-23T13:56:13.861650 #29555] DEBUG -- tcpsocket[14e60c8]: sent 68 bytes
D, [2014-05-23T13:56:13.877166 #29555] DEBUG -- tcpsocket[14e60c8]: read 52 bytes
D, [2014-05-23T13:56:13.877294 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 8 type 91 len 28
I, [2014-05-23T13:56:13.877399 #29555] INFO -- net.ssh.connection.session[12d5af4]: channel_open_confirmation: 0 0 0 32768
I, [2014-05-23T13:56:13.877495 #29555] INFO -- net.ssh.connection.channel[12d5504]: sending channel request "auth-agent-req#openssh.com"
D, [2014-05-23T13:56:13.877609 #29555] DEBUG -- tcpsocket[14e60c8]: queueing packet nr 9 type 98 len 44
I, [2014-05-23T13:56:13.877873 #29555] INFO -- net.ssh.connection.channel[12d5504]: sending channel request "pty-req"
D, [2014-05-23T13:56:13.878000 #29555] DEBUG -- tcpsocket[14e60c8]: queueing packet nr 10 type 98 len 60
I, [2014-05-23T13:56:13.878143 #29555] INFO -- net.ssh.connection.channel[12d5504]: sending channel request "exec"
D, [2014-05-23T13:56:13.878243 #29555] DEBUG -- tcpsocket[14e60c8]: queueing packet nr 11 type 98 len 172
D, [2014-05-23T13:56:13.878343 #29555] DEBUG -- tcpsocket[14e60c8]: sent 348 bytes
D, [2014-05-23T13:56:13.887608 #29555] DEBUG -- tcpsocket[14e60c8]: read 124 bytes
D, [2014-05-23T13:56:13.887754 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 9 type 99 len 12
I, [2014-05-23T13:56:13.887820 #29555] INFO -- net.ssh.connection.session[12d5af4]: channel_success: 0
D, [2014-05-23T13:56:13.887880 #29555] DEBUG -- net.ssh.service.forward[12d2444]: authentication agent forwarding is active
D, [2014-05-23T13:56:13.887970 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 10 type 93 len 28
I, [2014-05-23T13:56:13.888034 #29555] INFO -- net.ssh.connection.session[12d5af4]: channel_window_adjust: 0 +2097152
D, [2014-05-23T13:56:13.888141 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 11 type 99 len 12
I, [2014-05-23T13:56:13.888197 #29555] INFO -- net.ssh.connection.session[12d5af4]: channel_success: 0
D, [2014-05-23T13:56:14.164267 #29555] DEBUG -- tcpsocket[14e60c8]: read 68 bytes
D, [2014-05-23T13:56:14.164563 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 12 type 90 len 44
I, [2014-05-23T13:56:14.164670 #29555] INFO -- net.ssh.connection.session[12d5af4]: channel open auth-agent#openssh.com
I, [2014-05-23T13:56:14.164912 #29555] INFO -- net.ssh.service.forward[12d2444]: opening auth-agent channel
D, [2014-05-23T13:56:14.164998 #29555] DEBUG -- net.ssh.authentication.agent[128d4fc]: connecting to ssh-agent
D, [2014-05-23T13:56:14.165154 #29555] DEBUG -- net.ssh.authentication.agent[128d4fc]: sending agent request 1 len 44
D, [2014-05-23T13:56:14.165278 #29555] DEBUG -- net.ssh.authentication.agent[128d4fc]: received agent packet 2 len 5
D, [2014-05-23T13:56:14.165473 #29555] DEBUG -- tcpsocket[14e60c8]: queueing packet nr 12 type 91 len 28
D, [2014-05-23T13:56:14.165600 #29555] DEBUG -- tcpsocket[14e60c8]: sent 52 bytes
D, [2014-05-23T13:56:14.173389 #29555] DEBUG -- tcpsocket[14e60c8]: read 52 bytes
D, [2014-05-23T13:56:14.173498 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 13 type 94 len 28
I, [2014-05-23T13:56:14.173579 #29555] INFO -- net.ssh.connection.session[12d5af4]: channel_data: 1 5b
D, [2014-05-23T13:56:14.173626 #29555] DEBUG -- net.ssh.service.forward[12d2444]: data:5 on agent forwarded channel
D, [2014-05-23T13:56:14.174039 #29555] DEBUG -- unixsocket[128c444]: sent 5 bytes
D, [2014-05-23T13:56:14.174151 #29555] DEBUG -- unixsocket[128c444]: read 9 bytes
D, [2014-05-23T13:56:14.174245 #29555] DEBUG -- net.ssh.connection.channel[12abac4]: read 9 bytes from client, sending over agent forwarded connection
D, [2014-05-23T13:56:14.174357 #29555] DEBUG -- tcpsocket[14e60c8]: queueing packet nr 13 type 94 len 28
D, [2014-05-23T13:56:14.174442 #29555] DEBUG -- tcpsocket[14e60c8]: sent 52 bytes
D, [2014-05-23T13:56:14.234804 #29555] DEBUG -- tcpsocket[14e60c8]: read 168 bytes
D, [2014-05-23T13:56:14.234938 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 14 type 94 len 108
I, [2014-05-23T13:56:14.235011 #29555] INFO -- net.ssh.connection.session[12d5af4]: channel_data: 0 86b
D, [2014-05-23T13:56:14.235152 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 15 type 96 len 12
I, [2014-05-23T13:56:14.235216 #29555] INFO -- net.ssh.connection.session[12d5af4]: channel_eof: 1
D, [2014-05-23T13:56:14.235279 #29555] DEBUG -- net.ssh.service.forward[12d2444]: eof agent on agent forwarded channel
D, [2014-05-23T13:56:14.235441 #29555] DEBUG -- tcpsocket[14e60c8]: read 140 bytes
D, [2014-05-23T13:56:14.235534 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 16 type 96 len 12
I, [2014-05-23T13:56:14.235609 #29555] INFO -- net.ssh.connection.session[12d5af4]: channel_eof: 0
D, [2014-05-23T13:56:14.235720 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 17 type 98 len 44
I, [2014-05-23T13:56:14.235792 #29555] INFO -- net.ssh.connection.session[12d5af4]: channel_request: 0 exit-status false
D, [2014-05-23T13:56:14.235895 #29555] DEBUG -- tcpsocket[14e60c8]: received packet nr 18 type 97 len 12
I, [2014-05-23T13:56:14.235954 #29555] INFO -- net.ssh.connection.session[12d5af4]: channel_close: 0
D, [2014-05-23T13:56:14.236070 #29555] DEBUG -- tcpsocket[14e60c8]: queueing packet nr 14 type 97 len 28
INFO [f6fee6b3] Running /usr/bin/env mkdir -p /tmp/bbos/ on bbos.parisleaf.com
INFO [f6fee6b3] Finished in 0.916 seconds with exit status 0 (successful).
INFO Uploading /tmp/bbos/git-ssh.sh 100.0%
INFO [f306eea7] Running /usr/bin/env chmod +x /tmp/bbos/git-ssh.sh on bbos.parisleaf.com
INFO [f306eea7] Finished in 0.136 seconds with exit status 0 (successful).
I'm having an impossible time trying to fix this because I have no idea what the problem might be.

I had a similar problem. There were two causes:
I had an error in my git :repo_url string (ssl://#server... instead of ssh://#server...). This caused the git-check to fail.
There were no helpful error messages. It turns out that – at least in my environment – cap deploy fails rather cryptically when I omit the 'bundle exec' in front of it. The error I kept getting was:
$ cap production deploy
...
DEBUG [539c31c3] Command: /usr/bin/env chmod +x /tmp/<app>/git-ssh.sh
INFO [539c31c3] Finished in 0.096 seconds with exit status 0 (successful).
** Execute git:check
cap aborted!
fatal: No live threads left. Deadlock?
/Users/<user>/.rvm/gems/ruby-2.2.1/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:22:in `join'

Related

libnfc fails to connect to PN532 via I2C with timeout error

I want to read NFC tags using a PN532 NFC reader, which is connected via I2C to a Raspberry Pi Zero. The Pi has I2C enabled via raspi-config.
When attempting to access the device using nfc-list or nfc-pull I get a timeout error:
$ nfc-list
debug libnfc.general log_level is set to 3
debug libnfc.general allow_autoscan is set to true
debug libnfc.general allow_intrusive_scan is set to false
debug libnfc.general 1 device(s) defined by user
debug libnfc.general #0 name: "PN532 over I2C", connstring: "pn532_i2c:/dev/i2c-1"
nfc-list uses libnfc 1.8.0
debug libnfc.general 0 device(s) found using acr122_usb driver
debug libnfc.general 0 device(s) found using pn53x_usb driver
debug libnfc.chip.pn53x Diagnose
debug libnfc.chip.pn53x Timeout value: 500
debug libnfc.chip.pn53x SAMConfiguration
debug libnfc.chip.pn53x Timeout value: 1000
debug libnfc.bus.i2c TX: 00 00 ff 03 fd d4 14 01 17 00
debug libnfc.bus.i2c wrote 10 bytes successfully.
debug libnfc.driver.pn532_i2c timeout reached with no READY frame.
pn53x_check_communication: Timeout
debug libnfc.chip.pn53x InRelease
debug libnfc.bus.i2c TX: 00 00 ff 03 fd d4 52 00 da 00
debug libnfc.bus.i2c wrote 10 bytes successfully.
debug libnfc.driver.pn532_i2c timeout reached with no READY frame.
debug libnfc.general Unable to open "pn532_i2c:/dev/i2c-1".
nfc-list: ERROR: Unable to open NFC device: pn532_i2c:/dev/i2c-1
It may be related that i2cdetect reports that there exists a device at every address once the PN532 is connected to the Pi:
$ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 08 09 0a 0b 0c 0d 0e 0f
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77
If the PN532 is disconnected from the Pi, i2cdetect only finds one device:
$ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- 67 -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
There are only two i2c interfaces in /dev and i2c-2 does not have any connected devices.
$ ls -la /dev/ | grep i2c
crw-rw---- 1 root i2c 89, 1 Jun 23 15:39 i2c-1
crw-rw---- 1 root i2c 89, 2 Jun 23 15:35 i2c-2
How do I fix the timeout error?

Google SMTP servers reject my own SMTP server

I am having a problem with Google's SMTP servers. They reject my SMTP server's IP for no valid reason. My server complies with all the necessary rules to deliver the message but Google rejects it by IP without giving me details and I cannot find support either. I have written to postmaster#gmail.com but got no response. My server sends notifications to the users of the system, it does not do SPAM and apparently everything is correct. I don't see a valid reason for this crash, and I can't find a way to fix it. I would like to know if the same thing happened to someone and how they could solve it. Next I copy the console with the delivery attempt and additionally some DNS checks that show that apparently there is no problem on my server:
root#venabili:~# hostname -f
venabili.tecnologica.com.ar
root#venabili:~# id
uid=0(root) gid=0(root) grupos=0(root)
root#venabili:~# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 200.69.236.179 netmask 255.255.255.0 broadcast 200.69.236.255
inet6 fe80::f816:3eff:fe27:b8e1 prefixlen 64 scopeid 0x20<link>
ether fa:16:3e:27:b8:e1 txqueuelen 1000 (Ethernet)
RX packets 302342269 bytes 32703331063 (30.4 GiB)
RX errors 0 dropped 17 overruns 0 frame 0
TX packets 75025298 bytes 12670842456 (11.8 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root#venabili:~# nslookup
> server 8.8.8.8
Default server: 8.8.8.8
Address: 8.8.8.8#53
> set type=mx
> tecnologica.com.ar
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
tecnologica.com.ar mail exchanger = 10 venabili.tecnologica.com.ar.
Authoritative answers can be found from:
> set type=a
> venabili.tecnologica.com.ar
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: venabili.tecnologica.com.ar
Address: 200.69.236.179
> set type=aaaa
> venabili.tecnologica.com.ar
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: venabili.tecnologica.com.ar
Address: fe80::f816:3eff:fe27:b8e1
> set type=ptr
> 200.69.236.179
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
179.236.69.200.in-addr.arpa name = venabili.tecnologica.com.ar.
Authoritative answers can be found from:
> set type=txt
> tecnologica.com.ar
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
tecnologica.com.ar text = "v=spf1 a mx ip4:200.69.236.179 ip6:fe80::f816:3eff:fe27:b8e1 ~all"
Authoritative answers can be found from:
> set type=txt
> default._domainkey.tecnologica.com.ar
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
default._domainkey.tecnologica.com.ar text = "v=DKIM1; t=s; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz+GrX8vxp9W51ehJuixhL5AbjmCgcN2h7KqMiLI8LMUfmpWPP1GIhxlWCieFUVMOAQGlQrImuFE3kk/qLOgyumzUTRBwxlNX+7tix7dlBclXAWq8SjB9SbbAcPKkTBAq0pvXvp4l4qTCFnfVXAs1g/lCywlJrbfAFVVXWdN44ElFz+bD4YRYsXSmz//L1uFU7YE" "zkFUvbMtwBOL1xRvjAFXH4xQ7/vkHX6+OIxnm47vO/a2CqFVXok0FhAj44BmlBT+Py0x0SP8jsm+xhnLc238ZIsGylTwCb0Zbl3DR9bKGBy9FqXoUyRIzWKEkAtwaKq7qeBO3oRT4kQOKEOog2QIDAQAB"
Authoritative answers can be found from:
> _dmarc.tecnologica.com.ar
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
_dmarc.tecnologica.com.ar text = "v=DMARC1; p=reject; rua=mailto:postmaster#tecnologica.com.ar; ruf=mailto:postmaster#tecnologica.com.ar"
Authoritative answers can be found from:
> _smtp._tls.tecnologica.com.ar
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
_smtp._tls.tecnologica.com.ar text = "v=TLSRPTv1; rua=mailto:postmaster#tecnologica.com.ar"
Authoritative answers can be found from:
> _mta-sts.tecnologica.com.ar
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
_mta-sts.tecnologica.com.ar text = "v=STSv1; id=20200918192500"
Authoritative answers can be found from:
> set type=cname
> mta-sts.tecnologica.com.ar
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
mta-sts.tecnologica.com.ar canonical name = venabili.tecnologica.com.ar.
Authoritative answers can be found from:
> exit
root#venabili:~# openssl s_client -connect mta-sts.tecnologica.com.ar:443
CONNECTED(00000004)
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify return:1
depth=0 CN = mta-sts.tecnologica.com.ar
verify return:1
---
Certificate chain
0 s:CN = mta-sts.tecnologica.com.ar
i:C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
1 s:C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
i:O = Digital Signature Trust Co., CN = DST Root CA X3
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIFbTCCBFWgAwIBAgISBC7Vr1sblDEJHYgxBtfro6xcMA0GCSqGSIb3DQEBCwUA
MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD
ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0yMDA5MTgyMzM4MjdaFw0y
MDEyMTcyMzM4MjdaMCUxIzAhBgNVBAMTGm10YS1zdHMudGVjbm9sb2dpY2EuY29t
LmFyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5glA7vEmuS0EzKhn
w9IfLPHHertYYOYx54t/2zr8G1pSmkCjrOlfV+YHwIuWeehxDUz/ezy1JXyK11kd
raDd71MoBd9mV12fjITO99oDpkYu9g09TxJ9rpIEkU8LRGkgjfDGBBtf5X5Za+Ah
gWbJ4JudVoykVZ00riQsZzbfJ8FNZcwEgErWCZCBL45tR7tfeFlXTJGFhyszqQN+
r4gS3C/JpsObIMaoqmkJrO5YUGcfGvqDOG3INthp2L9/t743OfYUGTqRFu09Rq5S
xwEYxR8GksaLwzMWOIRelMP4W5F9ce7hhdxU68cK4j9rHXaaeNXLySeMs7K9C2vt
p1nnowIDAQABo4ICcDCCAmwwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsG
AQUFBwMBBggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBQ1A7mXXvtb
eS6ZYRtw4EA7WhJ3/zAfBgNVHSMEGDAWgBSoSmpjBH3duubRObemRWXv86jsoTBv
BggrBgEFBQcBAQRjMGEwLgYIKwYBBQUHMAGGImh0dHA6Ly9vY3NwLmludC14My5s
ZXRzZW5jcnlwdC5vcmcwLwYIKwYBBQUHMAKGI2h0dHA6Ly9jZXJ0LmludC14My5s
ZXRzZW5jcnlwdC5vcmcvMCUGA1UdEQQeMByCGm10YS1zdHMudGVjbm9sb2dpY2Eu
Y29tLmFyMEwGA1UdIARFMEMwCAYGZ4EMAQIBMDcGCysGAQQBgt8TAQEBMCgwJgYI
KwYBBQUHAgEWGmh0dHA6Ly9jcHMubGV0c2VuY3J5cHQub3JnMIIBBQYKKwYBBAHW
eQIEAgSB9gSB8wDxAHcA5xLysDd+GmL7jskMYYTx6ns3y1YdESZb8+DzS/JBVG4A
AAF0o8xFcQAABAMASDBGAiEAlc3Q8FEkd5ZUayxVfeorQv9+Jt1OSgOOP+jqVw5K
sskCIQCE0Hx7YDWcJ9o4Cck50WP7UtA/qRgmfn1fVIHyEZMftwB2AAe3XBvlfWj/
8bDGHSMVx7rmV3xXlLdq7rxhOhpp06IcAAABdKPMRZcAAAQDAEcwRQIgBVUd9xxC
DVX/kr0+308ra9YOqJC/yvBJnktxWg6YUVMCIQCR14/ouxc+Ydm4tePVBjBnmpRq
QzQEDYrd+4R7JjpiCjANBgkqhkiG9w0BAQsFAAOCAQEAlCnRwvP7wNRHTzB5N9/N
2cBPuVxKbvf1rHwusXYzQBVlyM6grEvjTgd5V/C+we1ueDUp991tP3z5AAksIGWM
/ssDlK0VSxv9PIzC1LxDK39Sl+P8xkuGj0zSDYg321sFjFyZLashP+xFYyzx3QdD
9h65J0uB/BigWOIN9sK1vLVhIB4yqV190vucyMamJBZ1dvSaYCi52dCgEEsAxM3v
LksETYgpSqB4+6zB2ae3/FN2/m3vyWCdFv1fL19hIidKjwIYhIKVOLKTQCYvCd+p
srhlTtnRf8i+P8Dni9xKmKSFwSGc8L+AS0AfTh6M/+IEPOO2zJsp1R/PBWgiy42v
fw==
-----END CERTIFICATE-----
subject=CN = mta-sts.tecnologica.com.ar
issuer=C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA-PSS
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 3203 bytes and written 403 bytes
Verification: OK
---
New, TLSv1.2, Cipher is ECDHE-RSA-CHACHA20-POLY1305
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : ECDHE-RSA-CHACHA20-POLY1305
Session-ID: 38FDD25BCB4C28F5364CA3418C05D13F279E62882E594190276850599BB67EAB
Session-ID-ctx:
Master-Key: 41AEF29EC1545AAE8C53958032EFF464E237232D8AA9D22CF9513297DFFBA40645226685FE58FEC782DA20CDFFEB5EDB
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 300 (seconds)
TLS session ticket:
0000 - 5f 78 fa 6f 3a 54 9c c2-f0 8e b2 b7 70 13 05 d4 _x.o:T......p...
0010 - 4b 39 84 62 c7 cb 96 f8-89 5c 27 09 6c 2b aa ad K9.b.....\'.l+..
0020 - 52 22 36 d6 a3 0b 8b 5e-ed 4b 78 f5 49 61 47 69 R"6....^.Kx.IaGi
0030 - c9 e7 41 88 c2 e6 29 86-b5 52 a9 8f 56 3f 79 3e ..A...)..R..V?y>
0040 - 14 bd b5 24 ca c5 f7 a4-ab b9 f9 26 dc 1c 71 7a ...$.......&..qz
0050 - ab 5a a2 a9 76 df 61 70-a5 91 5f 69 36 bc 64 69 .Z..v.ap.._i6.di
0060 - 02 b5 4b ba 79 e0 c9 a7-3b e2 a6 30 9b 2b 34 33 ..K.y...;..0.+43
0070 - 02 af 1e 3c 82 90 bc ca-32 b3 57 5b e0 b6 33 b0 ...<....2.W[..3.
0080 - a6 4c dc a8 c9 01 29 cf-98 ba 7c 40 3a ae 4b 04 .L....)...|#:.K.
0090 - 95 66 2f 96 b2 b9 5b f1-b0 f2 b0 6c e4 61 6f d0 .f/...[....l.ao.
00a0 - 98 a2 67 06 c9 22 ef a3-f5 ec 24 ac a2 b1 5f 4e ..g.."....$..._N
Start Time: 1600571394
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: yes
---
GET /.well-known/mta-sts.txt HTTP/1.1
Host: venabili.tecnologica.com.ar
HTTP/1.1 200 OK
Server: nginx/1.14.2
Date: Sun, 20 Sep 2020 03:10:22 GMT
Content-Type: text/plain
Content-Length: 77
Last-Modified: Sat, 19 Sep 2020 14:07:46 GMT
Connection: keep-alive
ETag: "5f6610b2-4d"
Accept-Ranges: bytes
version: STSv1
mode: testing
mx: venabili.tecnologica.com.ar
max_age: 604800
^C
root#venabili:~# openssl s_client -starttls smtp -connect venabili.tecnologica.com.ar:587 -crlf -ign_eof
CONNECTED(00000004)
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify return:1
depth=0 CN = venabili.tecnologica.com.ar
verify return:1
---
Certificate chain
0 s:CN = venabili.tecnologica.com.ar
i:C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
1 s:C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
i:O = Digital Signature Trust Co., CN = DST Root CA X3
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIFbzCCBFegAwIBAgISBAyLUnN1zyR0tAMF7k1G3023MA0GCSqGSIb3DQEBCwUA
MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD
ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0yMDA5MTgyMjMxMjZaFw0y
MDEyMTcyMjMxMjZaMCYxJDAiBgNVBAMTG3ZlbmFiaWxpLnRlY25vbG9naWNhLmNv
bS5hcjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL/svQH9FsoQZyGh
krGZLrN3GAzwuAV2IEsYdAixVrVXGPPjA4oTxQDWncBPVh8x6nMstJqq4xP19aBr
pw5P2rcsMvLT9RJ14wGuNzzDcx9uOmR709ZrPpPzZJ4JJnZxQP5dE2jJMrPQ7tnI
3AudscEaAMW8qBLj91jPDiv4LbRHL4xU+w46yZbB6szgb4u567SSKFaVlRQ8tmCt
msIkYdA5mP5/1Z0QN6PgtAzCWECEkn/eRpuTUHliMjgCocwQ3RYkofGrNQ1a4H7F
RgdaQzjCjQ7JdT/pZTYWrejr3alMsFAukRfIH/FMI5v8ojaxzlQOhz46WJiw3qNH
rmjb+G0CAwEAAaOCAnEwggJtMA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggr
BgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQU91GfsO41
iPZN1SROqwqnCPSN9yIwHwYDVR0jBBgwFoAUqEpqYwR93brm0Tm3pkVl7/Oo7KEw
bwYIKwYBBQUHAQEEYzBhMC4GCCsGAQUFBzABhiJodHRwOi8vb2NzcC5pbnQteDMu
bGV0c2VuY3J5cHQub3JnMC8GCCsGAQUFBzAChiNodHRwOi8vY2VydC5pbnQteDMu
bGV0c2VuY3J5cHQub3JnLzAmBgNVHREEHzAdght2ZW5hYmlsaS50ZWNub2xvZ2lj
YS5jb20uYXIwTAYDVR0gBEUwQzAIBgZngQwBAgEwNwYLKwYBBAGC3xMBAQEwKDAm
BggrBgEFBQcCARYaaHR0cDovL2Nwcy5sZXRzZW5jcnlwdC5vcmcwggEFBgorBgEE
AdZ5AgQCBIH2BIHzAPEAdwDnEvKwN34aYvuOyQxhhPHqezfLVh0RJlvz4PNL8kFU
bgAAAXSjjusOAAAEAwBIMEYCIQDOwhtVW/tkJzexdCpcX2gLXX7axA8Fw4bDURrr
tu/ecQIhAKpdzqz+iWGw9I7pkKfYNjyyLdWojRlT+IYQfR7qxQc4AHYAB7dcG+V9
aP/xsMYdIxXHuuZXfFeUt2ruvGE6GmnTohwAAAF0o47rMwAABAMARzBFAiBUUOSO
S+8ueu2ACk+862qxbAsXylwZAfHhg/7HmEeEQQIhAKq3jqMMSIjTo47t2JXrU58d
PP6E3NwNHOgGCNje4R/nMA0GCSqGSIb3DQEBCwUAA4IBAQAua/T4drS/7xpNmGDV
Xp2iFhSaVsbWeHh5+40POEAy9NvaZ8O4CeNjV3NeV84QI2Jh1PjehebM72K85rCT
7jEOqaJY5vmKrLBVji6MsgryyGLm4Y368nMR3JrXDLUkATgart+jLdsxLbaRsI1t
Gf+BLc6TYb4roGiI7TTjEQDAy2SOGqfOWbAEdVKIEr9P3IBrlOSOl2o8gd97PXQ/
vEmklVM/5zr5l5paInHOidBL8y8qVk2s9AkaQNAS2QTX5+iFl9D1u8z5mz49eKPb
sb9GSFVTm/qe0KHl02qga4/1ANRoNCuKoaE5xxhqyboJwy58qp7opbzipqxbQI0T
N8e/
-----END CERTIFICATE-----
subject=CN = venabili.tecnologica.com.ar
issuer=C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA-PSS
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 3389 bytes and written 432 bytes
Verification: OK
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 2048 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
250 CHUNKING
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
Protocol : TLSv1.3
Cipher : TLS_AES_256_GCM_SHA384
Session-ID: D8A0F5C48FBFE47FAEF6482AC696CBCAB01EB030F683053A41539DCD5B91E593
Session-ID-ctx:
Resumption PSK: 3CACF3832764ACCF8A00FFDAFA9A8771E62C04FCDF1429A85EB2A3AC0F39733F642045E4602CE73F62AEC75745B51392
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 7200 (seconds)
TLS session ticket:
0000 - 30 00 51 89 4c df 15 62-da 50 55 37 92 60 65 f2 0.Q.L..b.PU7.`e.
0010 - 05 72 39 3d fb 1e 8a 05-2f 95 6b f0 cd 33 29 b0 .r9=..../.k..3).
0020 - b7 38 89 4f 2f 32 91 66-f7 59 2f 80 43 fc 81 f7 .8.O/2.f.Y/.C...
0030 - c6 53 68 3d d8 69 0d 10-6c 4c 62 9c 81 d9 ec 60 .Sh=.i..lLb....`
0040 - 9f ef a0 95 46 d3 e0 10-29 09 20 ab 48 3b 07 34 ....F...). .H;.4
0050 - 82 d3 0e 39 3d 11 18 e8-9e 44 b7 69 b9 d0 45 2e ...9=....D.i..E.
0060 - 97 4f da 69 aa 89 27 2c-e5 9c 63 39 4b f8 3f 54 .O.i..',..c9K.?T
0070 - 23 1a db 73 ac 7e 78 20-76 f5 67 b9 8f e1 c3 34 #..s.~x v.g....4
0080 - d7 f0 b5 0b 0d c7 dc 80-f6 40 0c 20 3f 8d 16 b7 .........#. ?...
0090 - 3a c2 e2 a9 c1 b6 fd 84-65 7f a5 1c 16 81 60 5a :.......e.....`Z
00a0 - 53 12 3a bf d0 4a 0c 0e-a2 3b 57 ce ad 63 89 e6 S.:..J...;W..c..
00b0 - a7 58 ea 21 f9 2e 04 00-ff 6f a7 40 9d 2c bf 39 .X.!.....o.#.,.9
00c0 - 8d d9 19 c9 e1 05 a6 19-a4 60 06 75 8d 3e 95 89 .........`.u.>..
Start Time: 1600567929
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: no
Max Early Data: 0
---
read R BLOCK
ehlo venabili.tecnologica.com.ar
250-venabili.tecnologica.com.ar
250-PIPELINING
250-SIZE
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250 CHUNKING
auth login
334 VXNlcm5hbWU6
bm8tcmVzcG9uZGVyQHRlY25vbG9naWNhLmNvbS5hcg==
334 UGFzc3dvcmQ6
!!!
235 2.7.0 Authentication successful
mail from: no-responder#tecnologica.com.ar
250 2.1.0 Ok
rcpt to: jmouriz#gmail.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
from: root <no-responder#tecnologica.com.ar>
to: Juan Manuel Mouriz <jmouriz#gmail.com>
subject: Mensaje de prueba
Hola, este es un mensaje de prueba
.
250 2.0.0 Ok: queued as 5E50844853
quit
221 2.0.0 Bye
closed
root#venabili:~# grep 5E50844853 /var/log/mail.log
Sep 19 23:18:54 venabili postfix/submission/smtpd[7994]: 5E50844853: client=venabili.tecnologica.com.ar[200.69.236.179], sasl_method=login, sasl_username=no-responder#tecnologica.com.ar
Sep 19 23:20:35 venabili postfix/cleanup[8543]: 5E50844853: message-id=<20200920021854.5E50844853#venabili.tecnologica.com.ar>
Sep 19 23:20:35 venabili postfix/qmgr[5677]: 5E50844853: from=<no-responder#tecnologica.com.ar>, size=554, nrcpt=1 (queue active)
Sep 19 23:20:35 venabili postfix/cleanup[8543]: 6F3BE4485D: message-id=<20200920021854.5E50844853#venabili.tecnologica.com.ar>
Sep 19 23:20:35 venabili amavis[26666]: (26666-19) Passed CLEAN {RelayedOutbound}, ORIGINATING LOCAL [200.69.236.179]:55833 [200.69.236.179] <no-responder#tecnologica.com.ar> -> <jmouriz#gmail.com>, Queue-ID: 5E50844853, Message-ID: <20200920021854.5E50844853#venabili.tecnologica.com.ar>, mail_id: bcEyyqxUQvNK, Hits: -1, size: 554, queued_as: 6F3BE4485D, dkim_new=default:tecnologica.com.ar, 329 ms
Sep 19 23:20:35 venabili postfix/smtp[8676]: 5E50844853: to=<jmouriz#gmail.com>, relay=127.0.0.1[127.0.0.1]:10026, delay=115, delays=115/0.02/0.01/0.32, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10027): 250 2.0.0 Ok: queued as 6F3BE4485D)
Sep 19 23:20:35 venabili postfix/qmgr[5677]: 5E50844853: removed
root#venabili:~# grep 6F3BE4485D /var/log/mail.log
Sep 19 23:20:35 venabili postfix/smtpd[8679]: 6F3BE4485D: client=localhost[127.0.0.1]
Sep 19 23:20:35 venabili postfix/cleanup[8543]: 6F3BE4485D: message-id=<20200920021854.5E50844853#venabili.tecnologica.com.ar>
Sep 19 23:20:35 venabili postfix/qmgr[5677]: 6F3BE4485D: from=<no-responder#tecnologica.com.ar>, size=1625, nrcpt=1 (queue active)
Sep 19 23:20:35 venabili amavis[26666]: (26666-19) Passed CLEAN {RelayedOutbound}, ORIGINATING LOCAL [200.69.236.179]:55833 [200.69.236.179] <no-responder#tecnologica.com.ar> -> <jmouriz#gmail.com>, Queue-ID: 5E50844853, Message-ID: <20200920021854.5E50844853#venabili.tecnologica.com.ar>, mail_id: bcEyyqxUQvNK, Hits: -1, size: 554, queued_as: 6F3BE4485D, dkim_new=default:tecnologica.com.ar, 329 ms
Sep 19 23:20:35 venabili postfix/smtp[8676]: 5E50844853: to=<jmouriz#gmail.com>, relay=127.0.0.1[127.0.0.1]:10026, delay=115, delays=115/0.02/0.01/0.32, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10027): 250 2.0.0 Ok: queued as 6F3BE4485D)
Sep 19 23:20:37 venabili postfix/smtp[8680]: 6F3BE4485D: to=<jmouriz#gmail.com>, relay=gmail-smtp-in.l.google.com[172.217.192.26]:25, delay=1.7, delays=0.02/0.02/0.88/0.8, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[172.217.192.26] said: 550-5.7.1 [200.69.236.179] The IP you're using to send mail is not authorized to 550-5.7.1 send email directly to our servers. Please use the SMTP relay at your 550-5.7.1 service provider instead. Learn more at 550 5.7.1 https://support.google.com/mail/?p=NotAuthorizedError a44si4686321qtk.87 - gsmtp (in reply to end of DATA command))
Sep 19 23:20:37 venabili postfix/bounce[8681]: 6F3BE4485D: sender non-delivery notification: 32EF64485E
Sep 19 23:20:37 venabili postfix/qmgr[5677]: 6F3BE4485D: removed
root#venabili:~#
The domain in question is tecnologica.com.ar and I leave a link to some verifications where it is seen that the RR SPF, DKIM, DMARC, _SMTP._TLS, _MTA-STS, MTA-STS, CAA and PTR are correct and it is not a open relay:
https://mxtoolbox.com/domain/tecnologica.com.ar
The certificates are signed by Let's Encrypt. The host name matches the certificate. The classes are correct. And finally, I do not SPAM. I would greatly appreciate a help because at this point I am completely disoriented and can't find what else to do.
I am not looking for a solution but rather where I can find it.
Thank you very much for your help
Additional info
This is a report domain for DMARC:
<?xml version="1.0" encoding="UTF-8" ?>
<feedback>
<report_metadata>
<org_name>google.com</org_name>
<email>noreply-dmarc-support#google.com</email>
<extra_contact_info>https://support.google.com/a/answer/2466580</extra_contact_info>
<report_id>7762784093316082866</report_id>
<date_range>
<begin>1603756800</begin>
<end>1603843199</end>
</date_range>
</report_metadata>
<policy_published>
<domain>tecnologica.com.ar</domain>
<adkim>r</adkim>
<aspf>r</aspf>
<p>reject</p>
<sp>reject</sp>
<pct>100</pct>
</policy_published>
<record>
<row>
<source_ip>200.69.236.179</source_ip>
<count>2</count>
<policy_evaluated>
<disposition>none</disposition>
<dkim>pass</dkim>
<spf>pass</spf>
</policy_evaluated>
</row>
<identifiers>
<header_from>tecnologica.com.ar</header_from>
</identifiers>
<auth_results>
<dkim>
<domain>tecnologica.com.ar</domain>
<result>pass</result>
<selector>default</selector>
</dkim>
<spf>
<domain>tecnologica.com.ar</domain>
<result>pass</result>
</spf>
</auth_results>
</record>
</feedback>
And this is a report domain for TLS:
{"organization-name":"Google Inc.","date-range":{"start-datetime":"2020-10-26T00:00:00Z","end-datetime":"2020-10-26T23:59:59Z"},"contact-info":"smtp-tls-reporting#google.com","report-id":"2020-10-26T00:00:00Z_tecnologica.com.ar","policies":[{"policy":{"policy-type":"sts","policy-string":["version: STSv1\r","mode: testing\r","mx: venabili.tecnologica.com.ar\r","max_age: 604800\r","\r"],"policy-domain":"tecnologica.com.ar"},"summary":{"total-successful-session-count":1,"total-failure-session-count":0}}]}

Socket error on client <>, disconnecting with Paho MQTT-SN Gateway and ESP8266 CLient

I'm trying to test MQTT-SN.
I'm using Mosquitto Broker, Paho MQTT-SN Gateway and this library (https://github.com/S3ler/arduino-mqtt-sn-client) for the clients.
I'm using an esp8266 as a client.
With this client, I can connect, subscribe, receive from subscribed topics but I cant publish into topics
memset(buffer, 0x0, buffer_length);
mqttSnClient.publish(buffer, publishTopicName , qos);
Every time I try to publish with this client, Mosquitto gives me
Socket error on client <clientid>, disconnecting
And my client disconnects from the Broker.
Any clues?
EDIT1
Client Code
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include "WiFiUdpSocket.h"
#include "MqttSnClient.h"
#include <NTPClient.h>
const char* ssid = "example";
const char* password = "example1";
long utcOffsetInSeconds = -10800;
// Define NTP Client to get time
WiFiUDP ntpUDP;
NTPClient timeClient(ntpUDP, "pool.ntp.org", utcOffsetInSeconds);
#define buffer_length 10
char buffer[buffer_length + 1];
uint16_t buffer_pos = 0;
IPAddress gatewayIPAddress(192, 168, 0, 106);
uint16_t localUdpPort = 10000;
WiFiUDP udp;
WiFiUdpSocket wiFiUdpSocket(udp, localUdpPort);
MqttSnClient<WiFiUdpSocket> mqttSnClient(wiFiUdpSocket);
const char* clientId = "hamilton12";
char* subscribeTopicName = "ESP8266/123";
char* publishTopicName = "ESP8266/123";
int8_t qos = 1;
void mqttsn_callback(char *topic, uint8_t *payload, uint16_t length, bool retain) {
timeClient.update();
Serial.print("Received - Topic: ");
Serial.print(topic);
Serial.print(" Payload: ");
for (uint16_t i = 0; i < length; i++) {
char c = (char) * (payload + i);
Serial.print(c);
}
Serial.print(" Lenght: ");
Serial.print(length);
Serial.print(" Received Timestamp milliseconds: ");
Serial.print(timeClient.getHours());
Serial.print(":");
Serial.print(timeClient.getMinutes());
Serial.print(":");
Serial.println(timeClient.getSeconds());
}
void setup() {
Serial.begin(115200);
delay(10);
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
/* Explicitly set the ESP8266 to be a WiFi-client, otherwise, it by default,
would try to act as both a client and an access-point and could cause
network-issues with your other WiFi-devices on your WiFi-network. */
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
Serial.print("Starting MqttSnClient - ");
mqttSnClient.setCallback(mqttsn_callback);
if (!mqttSnClient.begin()) {
Serial.print("Could not initialize MQTT-SN Client ");
while (true) {
Serial.println(".");
delay(1000);
}
}
Serial.println(" ready!");
}
void convertIPAddressAndPortToDeviceAddress(IPAddress& source, uint16_t port, device_address& target) {
// IPAdress 0 - 3 bytes
target.bytes[0] = source[0];
target.bytes[1] = source[1];
target.bytes[2] = source[2];
target.bytes[3] = source[3];
// Port 4 - 5 bytes
target.bytes[4] = port >> 8;
target.bytes[5] = (uint8_t) port ;
}
void loop() {
if (!mqttSnClient.is_mqttsn_connected()) {
#if defined(gatewayHostAddress)
IPAddress gatewayIPAddress;
if (!WiFi.hostByName(gatewayHostAddress, gatewayIPAddress, 20000)) {
Serial.println("Could not lookup MQTT-SN Gateway.");
return;
}
#endif
device_address gateway_device_address;
convertIPAddressAndPortToDeviceAddress(gatewayIPAddress, localUdpPort, gateway_device_address);
Serial.print("MQTT-SN Gateway device_address: ");
printDeviceAddress(&gateway_device_address);
if (!mqttSnClient.connect(&gateway_device_address, clientId, 180) ) {
Serial.println("Could not connect MQTT-SN Client.");
delay(1000);
return;
}
Serial.println("MQTT-SN Client connected.");
//mqttSnClient.set_mqttsn_connected();
if (!mqttSnClient.subscribe(subscribeTopicName, qos)){
Serial.println("Cant subscribe");
}
Serial.println("Subscribed");
}
//It never enters this IF
if (Serial.available() > 0) {
buffer[buffer_pos++] = Serial.read();
if (buffer[buffer_pos - 1] == '\n') {
// only qos -1, 0, 1 are supported
if (!mqttSnClient.publish(buffer, publishTopicName , qos)) {
Serial.println("Could not publish");
}
Serial.println("Published");
memset(buffer, 0x0, buffer_length);
buffer_pos = 0;
}
}
//Uncommenting this line will give socket error
//mqttSnClient.publish(buffer, publishTopicName , qos);
mqttSnClient.loop();
}
etc/mosquitto/mosquitto.conf
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
#include_dir /etc/mosquitto/conf.d
connection_messages true
log_timestamp true
log_dest stderr
log_type error
log_type warning
log_type debug
allow_anonymous true
gateway.conf
BrokerName=192.168.0.106
BrokerPortNo=1883
BrokerSecurePortNo=8883
#
# When AggregatingGateway=YES or ClientAuthentication=YES,
# All clients must be specified by the ClientList File
#
ClientAuthentication=NO
AggregatingGateway=NO
QoS-1=NO
Forwarder=NO
#ClientsList=/path/to/your_clients.conf
PredefinedTopic=NO
#PredefinedTopicList=/path/to/your_predefinedTopic.conf
#RootCAfile=/etc/ssl/certs/ca-certificates.crt
#RootCApath=/etc/ssl/certs/
#CertsFile=/path/to/certKey.pem
#PrivateKey=/path/to/privateKey.pem
GatewayID=1
GatewayName=PahoGateway-01
KeepAlive=900
#LoginID=your_ID
#Password=your_Password
# UDP
GatewayPortNo=10000
MulticastIP=225.1.1.1
MulticastPortNo=1884
# UDP6
GatewayUDP6Bind=FFFF:FFFE::1
GatewayUDP6Port=10000
GatewayUDP6Broadcast=FF02::1
GatewayUDP6If=wpan0
# XBee
Baudrate=38400
SerialDevice=/dev/ttyUSB0
ApiMode=2
# LOG
ShearedMemory=NO;
EDIT2
Terminal running mosquitto
hamilton#hamilton-note:~$ mosquitto
1574806892: mosquitto version 1.4.15 (build date Tue, 18 Jun 2019 11:42:22 -0300) starting
1574806892: Using default config.
1574806892: Opening ipv4 listen socket on port 1883.
1574806892: Opening ipv6 listen socket on port 1883.
1574806900: New connection from 192.168.0.106 on port 1883.
1574806900: New client connected from 192.168.0.106 as hamilton123 (c1, k46080).
1574806900: Socket error on client hamilton123, disconnecting.
^C1574806911: mosquitto version 1.4.15 terminating
Terminal running Paho Gateway
hamilton#hamilton-note:~/Downloads$ ./MQTT-SNGateway
***************************************************************************
* MQTT-SN Transparent Gateway
* Part of Project Paho in Eclipse
* (http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt-sn.embedded-c.git/)
*
* Author : Tomoaki YAMAGUCHI
* Version: 1.3.1
***************************************************************************
20191126 192134.372 PahoGateway-01 has been started.
ConfigFile: ./gateway.conf
PreDefFile: ./predefinedTopic.conf
SensorN/W: UDP Multicast 225.1.1.1:1884 Gateway Port 10000
Broker: 192.168.0.106 : 1883, 8883
RootCApath: (null)
RootCAfile: (null)
CertKey: (null)
PrivateKey: (null)
20191126 192140.660 CONNECT <--- hamilton123 12 04 04 01 B4 00 68 61 6D 69 6C 74 6F 6E 31 32 33 00
20191126 192140.660 CONNECT ===> hamilton123 10 17 00 04 4D 51 54 54 04 02 B4 00 00 0B 68 61 6D 69 6C 74 6F 6E 31 32 33
20191126 192140.874 CONNACK <=== hamilton123 20 02 00 00
20191126 192140.874 CONNACK ---> hamilton123 03 05 00
20191126 192140.879 SUBSCRIBE 0200 <--- hamilton123 11 12 20 02 00 45 53 50 38 32 36 36 2F 31 32 33 00
20191126 192140.879 SUBSCRIBE 0200 ===> hamilton123 82 10 02 00 00 0B 45 53 50 38 32 36 36 2F 31 32 33 01
20191126 192140.879 SUBACK 0200 <=== hamilton123 90 03 02 00 01
20191126 192140.879 SUBACK 0200 ---> hamilton123 08 13 20 00 01 02 00 00
20191126 192140.883 PUBLISH 0300 <--- hamilton123 08 0C 22 00 01 03 00 00
20191126 192140.884 PUBLISH 0300 ===> hamilton123 32 07 00 02 00 01 03 00 00
^C20191126 192149.215 BrokerSendTask stopped.
20191126 192149.215 PacketHandleTask stopped.
20191126 192149.215 ClientSendTask stopped.
20191126 192149.386 BrokerRecvTask stopped.
20191126 192150.158 ClientRecvTask stopped.
20191126 192150.215 MQTT-SN Gateway stoped
Thank you for the help Dalton Cézane.
But I found the problem in an open issue in the client's library:
Having trouble with your example WiFiUdpMqttSnClient program in that
it does not successfully publish the test messages. I'm using
paho-mqtt-sn gateway.
I'm bashing around in the dark a bit but I think this is because it
publishes the messages with the flag TopicIdType set to 2. I think it
should be zero (normal) because it's not pre-registered nor is it a
short topic.
In file MqttSnClient.h line 216 the call to send_publish has
short_topic set to true. But that's not all; in file mqttsn_messages.h
around line 215 if short_topic flag is false it sets the flag to
predefined. I've removed the latter 'else' clause so the flag is set
to zero and I can now publish successfully.
I suspect my hack is not a complete solution but I hope it helps you
resolve this issue.
This comment was made by #nottledim, big thanks!
Now i can publish without a problem using my esp8266.
Just leaving here if anyone has this problem.
link to the issue: https://github.com/S3ler/arduino-mqtt-sn-client/issues/3

Create PCAP file from values in a database

I have a database filled with a lot of logged IPV4 messages. It is used to get queries like: "give me all messages from MacAddress ... that were logged in the period ... to ... that have ..."
Some queries will result in a huge amount of logged messages. Therefore we decided to make a PCAP file if such a request was made.
"Please create a PCAP file containing all logged messages from your
database that ..."
So upon request, my service should fetch the requested data from the database (in pages) and create a PCAP file filled with the data fetched from the database. Later callers can ask for a read-only OWIN stream to this file
The service can create such a file. The problem is that it is not recognized as a proper WireShark file.
I've read Libcap File Format. Whenever I have to create a file filled with LoggedMessages I fill a binary file as follows.
Global Header
Per logged message:
A packet header
Packet data with:
Ethernet Frame: Destination Mac, Source Mac, EtherType (0x800)
IPV4 header
Logged Data
Wireshark starts complaining about the file when it attempts to read the Ethertype. It says this is a Length. Definition of Ethernet Frame with EtherType
So below I show the start of my file. Hexadecimal format per byte + my interpretation of it. After that the comments from wireshark
The created stream starts with the Global Header: a 32 bytes structure. First the hexadecimal values then the interpretation:
=== Global Header ====
D4 C3 B2 A1 02 00 04 00
00 00 00 00 00 00 00 00
FF FF 00 00 01 00 00 00
Magic number A1B2C3D4 (Original Time Precision)
Version: 2 - 4
ThisZone 0
sigFigs 0
snapLen 0000FFFF
datalinkType 1
Note that the magic number has the LSB first, indicating that every multi-byte number will have the least significant byte first. So a 2 byte value of 0x1234 will have in memory first 34 then 12.
After that the Packets should come. Every time one Packet Header, followed by one Packet Data
=== Packet header ===
09 89 58 5A C8 85 0B 00
6B 00 00 00 6B 00 00 00
Timestamp: 1515751689.7551446 (usec precision)
Number of saved bytes (incl_len) 107 bytes (0x006b)
Actual packet length (orig_len) 107 bytes (0x006b)
=== Packet Data ===
CF 31 59 D3 E7 98 53 39 - 17 F0 A9 9C 00 08 45 00
5D 00 00 00 00 00 FF 00 - E0 0D 8A 84 77 44 E0 2B
9C FB 4D 43 D5 8A 00 00 - 00 00 41 41 41 41 41 41
41 41 41 41 41 41 41 41 - 41 41 41 41 41 41 41 41
// etc, until total 107 bytes
The packet data consists of a Mac Header, IPV4 header and a couple of 0x41 as data
=== Mac Header ===
Destination Mac: CF:31:59:D3:E7:98
Source Mac: 53:39:17:F0:A9:9C
Ether type: 0800
Note that the magic number showed that every multi-byte number has the LSB first, so the two bytes 00 08 will have a 16-bit meaning of 0x0800
If you look at the PCAP file interpretation I show below, then the problem starts here: the Ether Type is not interpreted as Ether Type, but as length.
After remark in one of the answers, I tried to reverse the two byte ether type from 00 08 into 08 00 (MSB first), but that made the problems worse.
=== IPV4 header ===
- 45 00 5D 00
- 00 00 00 00
- FF 00 E0 0D
- 8A 84 77 44
- E0 2B 9C FB
Specification of the IPV4 header structure
DWORD 0
- bits 00..04: version; bits 04..07 IP Header Length: 04 05
- bits 08..13 DSCP; bits 14..15 ECN: 00
- bits 16..31 Total Length (header + Payload): 93 (005D)
DWORD 1
- bits 00..15 Identification: 0000
- bits 16..18 Flags; bits 19..31 offset: 0000
DWORD 2
- bits 00..07 Time to Live FF
- bits 08..15 Protocol; used protocol 00
- bits 16..31 Header Checksum 3552 (0DE0)
DWORD 3 and 4
Source IP: 138.132.119.68
Destination IP: 224.43.156.251
Bacause wireshark complains about checksum, I verify as follows:
Verify checksum:
Header: 0045 005D 0000 0000 00FF 0DE0 848A 4477 2BE0 FB9C
69 + 93 + 0 + 0 + 255 + 3552 + 33930 + 17527 + 11232 + 64412 = 131070 (01FFFE)
0001 + FFFE = FFFF
1's complement: 0000 (checksum ok)
This is what WireShark (version 2.4.4) makes of it:
The following seems normal:
Frame 1: 107 bytes on wire (856 bits), 107 bytes captured (856 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Jan 12, 2018 11:08:09.755144000 W. Europe Standard Time
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1515751689.755144000 seconds
[Time delta from previous captured frame: 0.000000000 seconds]
[Time delta from previous displayed frame: 0.000000000 seconds]
[Time since reference or first frame: 0.000000000 seconds]
Frame Number: 1
Frame Length: 107 bytes (856 bits)
Capture Length: 107 bytes (856 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:llc:data]
[Coloring Rule Name: Checksum Errors]
[Coloring Rule String [truncated]: eth.fcs.status=="Bad" ||
ip.checksum.status=="Bad" || tcp.checksum.status=="Bad" ||
udp.checksum.status=="Bad" || sctp.checksum.status=="Bad" ||
mstp.checksum.status=="Bad" || cdp.checksum.status=="Bad" ||]
Here comes the first problem: EtherType is interpreted as Length
IEEE 802.3 Ethernet
Destination: cf:31:59:d3:e7:98 (cf:31:59:d3:e7:98)
Source: 53:39:17:f0:a9:9c (53:39:17:f0:a9:9c)
Length: 8
Padding: ff00e00d8a847744e02b9cfb4d43d58a0000000041414141...
Trailer: 414141414141414141414141414141414141414141414141...
Frame check sequence: 0x41414141 incorrect, should be 0xe19cae36
[FCS Status: Bad]
After the length, which I meant as an EtherType, comes a lot of padding, instead of interpretation of my 5 DWORDs.
The link to the Ethernet Frame in wikipedia I showed says:
The EtherType field is two octets long and it can be used for two
different purposes. Values of 1500 and below mean that it is used to
indicate the size of the payload in octets, while values of 1536 and
above indicate that it is used as an EtherType, to indicate which
protocol is encapsulated in the payload of the frame.
My value if 0x0800 = 2048. This certainly is above 1536
For example, an EtherType value of 0x0800 signals that the frame
contains an IPv4 datagram.
If value 0x0800 the incorrect value? Or is my error somewhere else?
Looks like your ethertype has the wrong byte order. It should be:
=== Packet Data ===
CF 31 59 D3 E7 98 53 39 - 17 F0 A9 9C 08 00 XX XX

Application won't exit after downloading a file with scala-ssh

I'm using scala-ssh 0.7.0 to download a file from a remote server.
The download itself seems to be successful (I can find the downloaded file). Here is the last part of the log output:
16:14:43.824 [main] TRACE
net.schmizz.sshj.xfer.LoggingTransferListener -- transferred 100% of
log-file.txt 16:14:43.824 [main] INFO
net.schmizz.sshj.common.StreamCopier -- 44.82421875 KiB transferred in
1.572 seconds (28.514134064885496 KiB/s) 16:14:43.825 [main] DEBUG net.schmizz.sshj.xfer.scp.SCPEngine -- Remote agrees transfer done
16:14:43.826 [main] DEBUG net.schmizz.sshj.xfer.scp.SCPEngine --
Signalling: Transfer done 16:14:43.826 [main] TRACE
net.schmizz.sshj.transport.Encoder -- Encoding packet #10: 5e 00 00 00
00 00 00 00 01 00 16:14:43.826 [main] DEBUG
net.schmizz.sshj.connection.channel.Window$Remote -- Consuming by 1
down to 2097148 16:14:44.220 [reader] TRACE
net.schmizz.sshj.transport.Decoder -- Received packet #14: 62 00 00 00
00 00 00 00 0b 65 78 69 74 2d 73 74 61 74 75 73 00 00 00 00 00
16:14:44.221 [reader] TRACE net.schmizz.sshj.transport.TransportImpl
-- Received packet CHANNEL_REQUEST 16:14:44.221 [reader] DEBUG net.schmizz.sshj.connection.channel.direct.SessionChannel -- Got chan
request for exit-status 16:14:44.222 [reader] TRACE
net.schmizz.sshj.transport.Decoder -- Received packet #15: 60 00 00 00
00 16:14:44.222 [reader] TRACE
net.schmizz.sshj.transport.TransportImpl -- Received packet
CHANNEL_EOF 16:14:44.222 [reader] DEBUG
net.schmizz.sshj.connection.channel.direct.SessionChannel -- Got EOF
16:14:44.223 [reader] TRACE net.schmizz.sshj.transport.Decoder --
Received packet #16: 61 00 00 00 00 16:14:44.223 [reader] TRACE
net.schmizz.sshj.transport.TransportImpl -- Received packet
CHANNEL_CLOSE 16:14:44.223 [main] DEBUG
net.schmizz.sshj.connection.channel.direct.SessionChannel -- Sending
close 16:14:44.223 [reader] DEBUG
net.schmizz.sshj.connection.channel.direct.SessionChannel -- Got close
16:14:44.224 [main] TRACE net.schmizz.sshj.transport.Encoder --
Encoding packet #11: 61 00 00 00 00 16:14:44.225 [main] DEBUG
net.schmizz.concurrent.Promise -- Awaiting <>
16:14:44.225 [reader] DEBUG net.schmizz.sshj.connection.ConnectionImpl
-- Forgetting session channel (#0)
16:14:44.225 [reader] DEBUG net.schmizz.concurrent.Promise -- Setting <> to SOME
My code is very simple:
import com.decodified.scalassh._
val sshClient = new SshClient(new HostConfig(login = PasswordLogin(userName, SimplePasswordProducer(password)), hostName))
sshClient.download(filePath, targetDirectory)
Now, although the download finishes successfully, and the application execution continues after the download command, the application itself doesn't exit.
Any ideas?
The implicit conversion to RichSshClient seems to be behind this.
I avoided the implicit convertion to RichSshClient by creating a new class -- 'SshClientEnhanced' which extends SshClient with ScpTransferable. Invoking download method on an instance of SshClientEnhanced works fine.