Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to update DNS entries: Unable to get network info #9

Open
gnouts opened this issue Mar 21, 2018 · 11 comments
Open

Unable to update DNS entries: Unable to get network info #9

gnouts opened this issue Mar 21, 2018 · 11 comments

Comments

@gnouts
Copy link

gnouts commented Mar 21, 2018

Hi,
I just installed ztdns on raspberrypi, filled the .ztdns.toml file, and run ./ztdns server. But it gave me this error :

FATA[0001] Unable to update DNS entries: Unable to get network info: json: cannot unmarshal number 1521624552143 into Go struct field Network.Clock of type int

I use go version go1.10 linux/arm (armv6), with raspbian 9 (stretch).
zerotier-cli tells me everything is ok, I authorized the device on my network.
ifconfig show me same address as in my.zerotier.com
I authorized users to bind privileged port.

What am I missing ? :(

@AarynSmith
Copy link
Member

Looks like go for arm uses an 32 bit int size instead of 64 bits. I've opened a new branch fix-for-rpi. Please try that branch and see if that fixes your issue.

@gnouts
Copy link
Author

gnouts commented Mar 21, 2018

I ran :

git clone https://github.com/uxbh/ztdns.git
git checkout fix-for-rpi
go build
./ztdns server

But same error... 😞

@AarynSmith
Copy link
Member

Try
git checkout --track origin/fix-for-rpi

@gnouts
Copy link
Author

gnouts commented Mar 21, 2018

I had to rm and clone again.

Still, same error

@AarynSmith
Copy link
Member

Can you check your ztapi/network.go file? Clock on line 23, and 37, and CreationTime on line 38 should all be int64, not int.

@gnouts
Copy link
Author

gnouts commented Mar 21, 2018

yes it's int64 on all three variables.

@AarynSmith
Copy link
Member

What version of Raspberry Pi are you running?

@gnouts
Copy link
Author

gnouts commented Mar 21, 2018

RaspberryPi 2 B with raspbian 9

@AarynSmith
Copy link
Member

Ahh, RaspberryPi 2 is 32bit. That will require additional looking into.

@AarynSmith
Copy link
Member

I've updated the fix-for-rpi branch again, those time values should now be of type apiTime. Please let me know if this fixes the issue.

@gnouts
Copy link
Author

gnouts commented Mar 31, 2018

I pulled your changes. Same error :

./ztdns server
FATA[0003] Unable to update DNS entries: Unable to get network info: json: cannot unmarshal number 1522504183448 into Go struct field Network.Clock of type int 

Actually, the number in FATA[0003] change. Most of the time is 003, sometime 004 or 005. Dunno if interesting...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants