Subject: [nncp-devel] EOF while decoding 8 bytes / message authentication failed

From: Frank Doepper <[email-masked]>
Date: Fri, 13 Dec 2019 10:19:48 +0100 (CET)

Hi,

I have built nncp on NixOS with this expression:

	{ stdenv, go, fetchurl }:

	stdenv.mkDerivation rec {
		pname = "nncp";
		version = "5.1.1";

		buildInputs = [ go ];

		preConfigure = ''
			export GOCACHE=$PWD/.cache
		'';
		makeFlags = [ "PREFIX=$$out" ];

		src = fetchurl {
			url = "http://www.nncpgo.org/download/${pname}-${version}.tar.xz";
			sha256 = "0gx9c9v5xnc8ldisz7xb5hgx6km9sjr423fjl1pvljdmwmw7clxr";
		};

	}

When I then use nncp-call with nncp-daemon, I get connection error:

client side:

$ nncp-call --debug self
D 2019-12-13T09:10:45.315581037Z [call addr="zachiel.fritz.box:5400" node="AKKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXA"] dialing
D 2019-12-13T09:10:45.322352661Z [call addr="zachiel.fritz.box:5400" node="AKKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXA"] connected
D 2019-12-13T09:10:45.425437863Z [jobs name="ZNNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXA" nice="224" node="AKKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXA" size="3489441" xx="tx"] taken
D 2019-12-13T09:10:45.48071147Z [jobs name="7IAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXQ" nice="224" node="AKKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXA" size="3489441" xx="tx"] taken
D 2019-12-13T09:10:45.480861796Z [sp-info-our name="ZNNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXA" node="AKKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXA" size="3489441"]
D 2019-12-13T09:10:45.480886096Z [sp-info-our name="7IAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXQ" node="AKKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXA" size="3489441"]
2019-12-13T09:10:45Z We have got for self: 2 packets, 6.7 MiB
D 2019-12-13T09:10:45.499071069Z [sp-start nice="255" node="AKKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXA"] sending first message
D 2019-12-13T09:10:45.499320081Z [sp-start nice="255" node="AKKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXA"] waiting for first message
E 2019-12-13T09:10:45.500430758Z [sp-start err="xdr:DecodeFixedOpaque: EOF while decoding 8 bytes - read: '[]'" nice="255" node="AKKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXA"]
2019-12-13T09:10:45Z ERROR Connected to self

daemon side:

$ nncp-daemon -debug
D 2019-12-13T09:10:45.322423859Z [daemon addr="192.168.178.21:39060"] accepted
D 2019-12-13T09:10:45.322866333Z [sp-start nice="255"] waiting for first message
E 2019-12-13T09:10:45.499635152Z [sp-start err="chacha20poly1305: message authentication failed"]
2019-12-13T09:10:45Z ERROR Connected to unknown
^C

How to debug this? Same error when connecting to another machine.
But exchanging via nncp-file works.

спасибо большое
Frank