jotta / jotta-cli-issues

45 stars 1 forks source link

Zyxel NAS #82

Open badkernel opened 5 years ago

badkernel commented 5 years ago

Hello all

Trying to use jotta-cli on my Zyxel NAS box I have downloaded (binary) jotta-cli-0.5.15025_linux_armhf and unpacked it, only to find out that /usr/bin is READ only. I managed to run jottad daemon but as I mentioned read only system will not allow writing (log reports this when I try to login to jottacloud)

"pid:19609 2019/06/10 12:20:10 Starting /root/usr/bin/jottad version 0.5.15025 pid:19609 2019/06/10 12:20:10 Started listener on :14443 pid:19609 2019/06/10 12:20:10 Starting with datadir /var/lib/jottad pid:19609 2019/06/10 12:20:11 Rates set @ download:0B upload:0B pid:19609 2019/06/10 12:20:11 Scan interval set to: 1h0m0s pid:19609 2019/06/10 12:20:11 Unable to register device : Post https://api.jottacloud.com/auth/v1/register: x509: failed to load system roots and no roots provided pid:19609 2019/06/10 12:20:12 Starting. No user logged in pid:19609 2019/06/10 12:20:12 Stopping database pid:19609 2019/06/10 12:20:12 grpc api running on :14443 pid:19609 2019/06/10 12:20:12 WARNING: Not enough free space for appdata 0bytes required 50.00MiB pid:19609 2019/06/10 12:20:12 Error checking for new versions Get https://repo.jotta.us/archives/VERSION: x509: failed to load system roots and no roots provided pid:19609 2019/06/10 12:20:12 Unable to register device : Post https://api.jottacloud.com/auth/v1/register: x509: faile d to load system roots and no roots provided"

Is there a way to workaround this problem ?

Kimbsen commented 5 years ago

I'm not certain there is a way to run jottad sanely without any writeable location for application data, but you can override the default application data folder by running jottad as "./jottad datadir /path/to/datadir" if you have some writeable volume on the device.

The x509 errors can/must be resolved by renewing/updating the systems list of ca root certificates. Typically this means updating the contents of the /etc/ssl/certs/ca-certificates.crt file either using a packagemanager or copying in an updated and trusted version of the file.

badkernel commented 5 years ago

Thank you for taking the time to look at this issues. Will give it a go.

stormDE commented 4 years ago

Hi this is working like @Kimbsen said. you can add the certs, i use the cert of a Ubuntu installation and copy them to the /etc on the Zyxcel nas.

Ok its fine But

after a reboot, the /etc folder is restored to default and all certs are deletet. so i cant use jotta cli after reboot the nas ... has someone a solution for that problem ?

maybe someone now how to build the jotta cli as a zyxcel package ?

edit:

this helps

  1. install metarepo
  2. install Zyxcel Tweaks(crontab daemon to run jottad) and Randomtools(Certificates)
subhappy commented 2 years ago

For anyone scratching their head over this or rclone giving an x509 error: mkdir -p /etc/ssl/certs/ curl --insecure -o /etc/ssl/certs/ca-certificates.crt https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt