Google Drive - I cannot complete configuration

Hello,

I an trying to configure rclone on a NAS Zyxel NSA325v2 with Google drive but when I enter the verification code I get this error:

Failed to configure token: failed to get token: Post https://accounts.google.com/o/oauth2/token: x509: failed to load system roots and no roots provided

I am missing a step? or doing something wrong?

This are the config steps:

No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> xxxxxxx
Type of storage to configure.
Storage> 7
Google Application Client Id - leave blank normally.
client_id>
Google Application Client Secret - leave blank normally.
client_secret>
Remote config
Use auto config?

  • Say Y if not sure
  • Say N if you are working on a remote or headless machine or Y didn’t work
    y) Yes
    n) No
    y/n> n
    If your browser doesn’t open automatically go to the following link: …://accounts.google.com/o/oauth2/auth?client_id=202264815644.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=c2b1f50f88427e7dd23b81d4d5db9733
    Log in and authorize rclone for access
    Enter verification code> ….
    2016/10/15 15:04:13 Failed to configure token: failed to get token: Post …://accounts.google.com/o/oauth2/token: x509: failed to load system roots and no roots provided

Thanks

Hopefully this should help

http://rclone.org/faq/#rclone-gives-x509-failed-to-load-system-roots-and-no-roots-provided-error

Many thanks, it worked fine! Great help from You!
bye

1 Like

Hello,
sorry to bother You, your suggestion helped me make rclone working fine (many thanks for that), but after some days I found out that after rebooting the NSA (Zyxel 325v2) the rcone configuration disappears, and also the certificates on SSL disappear.

After rebooting I received these errors:
Failed to load config file “/root/.rclone.conf” - using defaults: open /root/.rclone.conf: no such file or directory
Failed to create file system for “GoogleAT:Antonio”: didn’t find section in config file

Then if I repeat the config and if a download the certs, rclone works perfectly, but after some days and a reboot of the NAS, the errors come up again because the configuration and certs are no longer there. It seems that those files are deleted in some way, or lost…

I understand that this could not be a problem related directly to rclone, but please do You have any idea how to make config and certs permanent?

Thanks
Bye

It might be that the NAS boots off a RAM disk, so these bits of the file system aren’t persistent.

There will be bits which are persistent - post the output of mount run on the NAS.

This the output of mount:

rootfs on / type rootfs (rw)
/proc on /proc type proc (rw,relatime)
/sys on /sys type sysfs (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mtdblock8 on /zyxel/mnt/nand type yaffs2 (ro,relatime)
/dev/sda1 on /zyxel/mnt/sysdisk type ext2 (ro,relatime,errors=continue)
/dev/loop0 on /ram_bin type ext2 (ro,relatime,errors=continue)
/dev/loop0 on /usr type ext2 (ro,relatime,errors=continue)
/dev/loop0 on /lib/security type ext2 (ro,relatime,errors=continue)
/dev/loop0 on /lib/modules type ext2 (ro,relatime,errors=continue)
/dev/ram0 on /tmp/tmpfs type tmpfs (rw,relatime,size=5120k)
/dev/ram0 on /usr/local/etc type tmpfs (rw,relatime,size=5120k)
/dev/ram0 on /usr/local/var type tmpfs (rw,relatime,size=5120k)
/dev/mtdblock4 on /etc/zyxel type yaffs2 (rw,relatime)
/dev/md0 on /i-data/aa5b77d6 type ext4 (rw,noatime,barrier=0,data=writeback,usrquota)
/dev/md0 on /usr/local/zy-pkgs type ext4 (rw,noatime,barrier=0,data=writeback,usrquota)
/dev/md0 on /etc/zyxel/zy-pkgs type ext4 (rw,noatime,barrier=0,data=writeback,usrquota)
/dev/md0 on /usr/local/apache/htdocs/adv,/pkg type ext4 (rw,noatime,barrier=0,data=writeback,usrquota)
/dev/md0 on /usr/local/apache/web_framework/data/cache type ext4 (rw,noatime,barrier=0,data=writeback,usrquota)
/dev/mtdblock4 on /usr/local/apache/web_framework/data/config type yaffs2 (rw,relatime)

thanks

That does look like / and therefore /root is part of the initial ram disk (the rootfs). Sounds like you want to store the config file in one of the directories that is mounted on /dev/md0.

It might be better if you ask for help from someone who knows more about these NAS - maybe http://forum.nas-central.org/ ?

Hey tonytogna,

While I can’t help with the SSL certs being lost on reboot (as they’re stored in the RAMdisk) I did manage to get around the issues of the config files default location (depending on OS).

By appending ‘–config filename’ to the end of any command (eg rclone config --config .rclone.conf) you can tell it where to store the config file and where to read it back from when copying/syncing etc.

For example if you wish to store the config in the same directory you have rclone itself stored use

rclone config --config .rclone.conf

Or another filename if you do not wish to use .rclone.conf, then whenever you run your rclone commands they should always have --config .rclone.conf added to them

example:

rclone config --config .rclone.conf
rclone copy GoogleAT:Antonio localdir --config .rclone.conf

This however assumes that you have downloaded and are running rclone from a directory on the NAS array itself, and that you’re not downloading rclone every time you use it because it disappears with the config on reboot.

I hope that helps :slight_smile:

Thank You very much.

Your tip was good, I managed to store the config where it is persistent.

I also fixed the problem with the SSL certificates, thanks to Mijzelf of forum.nas-central.org, who suggested me to download the certs to a persistent folder and to create a script on ffp start which creates a synmbolic link on the volatile space where it is needed.

Bye

1 Like