Mounted onedrive fails to reconnect

What is the problem you are having with rclone?

Mounted onedrive fails to reconnect

Run the command 'rclone version' and share the full output of the command.

rclone v1.62.2

  • os/version: debian 11.7 (64 bit)
  • os/kernel: 5.15.107-1-pve (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.20.2
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

onedrive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

have mounted with fstab:
fstab:onedrive-backup:pve-backup /mnt/pve/onedrive-backup-mnt rclone rw,noauto,nofail,_netdev,x-systemd.automount,args2env,vfs_cache_mode=writes,config=/root/.config/rclone/rclone.conf,cache_dir=/var/cache/rclone,log-file="/var/log/rclone-sync/rclone.log" 0 0

in the past it has run and did it's job to save backups in this cloud folder.

but some days ago, it failes. Mount has gone. I don't know, how to repair ist.
Last try was:
rclone ls onedrive-backup:
2023/05/09 20:07:19 Failed to create file system for "onedrive-backup:": failed to get root: Get "https://graph.microsoft.com/v1.0/drives/39180xxxxxxx/root": couldn't fetch token: invalid_client: if you're using your own client id/secret, make sure they're properly set up following the docs

The rclone config contents with secrets removed.

onedrive-backup]
type = onedrive
token = {"access_token":"EwBwA8l6BxxxxxxxxdeletedxxxxxxxxxxxFP","expiry":"2023-05-07T19:57:01.037282536+02:00"}
drive_id = 391804cd3b871f41
drive_type = personal
client_secret = list

A log from the command with the -vv flag

I don't use that command

hi,

the client_id is missing from onedrive-backup?

if that does not solve the issue, then need to post a full rclone debug log

maybe it was long time and it disconnected (token expired)

try from command line:

rclone config reconnect onedrive-backup:

before doing deeper investigation

look at this from your remote:

token = {"access_token":"EwBwA8l6BxxxxxxxxdeletedxxxxxxxxxxxFP","expiry":"2023-05-07T19:57:01.037282536+02:00"}

token expired "2023-05-07" <---- May 7th?

Do i have to manualy update the expiration date?
I thought, this date would automatic be updated and an update has failed.

Due to not been updated, my system has run out of free memory without an message.
This is not aceptable. How manage my Problem?

rclone is open source release under MIT licence:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

And people helping here are doing it for fun not for money.

internet is full of guides about that.

we offered several ideas, did none of them work?

keep calm please.
I'm not so well known than you and want to understand, if i can use this tool in future.
I think, it's not written for specialists only, so I tell from user side of view, what I can accept and what not.

If it can not be improved, I have to understand that.

rclone authorize "onedrive" "ey----"
gives
Invalid numbers of argument: 2

sure, thanks for the feedback.

truth is, i use onedrive for many years and never had that issue, not sure what the next step is.

so i would try @kapitainsky suggestion and post the full output.
rclone config reconnect onedrive-backup: -vv

did so and got the answer:
root@pve:~# rclone config reconnect onedrive-backup: -vv
2023/05/23 00:57:49 DEBUG : rclone: Version "v1.62.2" starting with parameters [ "rclone" "config" "reconnect" "onedrive-backup:" "-vv"]
2023/05/23 00:57:49 DEBUG : Using config file from "/root/.config/rclone/rclone. conf"
2023/05/23 00:57:49 DEBUG : onedrive-backup: config in: state="", result=""
2023/05/23 00:57:49 DEBUG : onedrive-backup: config out: out=&{State:*oauth,choo se_type,, Option: OAuth: Error: Result:}, err=
2023/05/23 00:57:49 DEBUG : onedrive-backup: config in: state="*oauth,choose_typ e,,", result=""
2023/05/23 00:57:49 DEBUG : onedrive-backup: config out: out=&{State:*oauth-conf irm,choose_type,, Option:true OAuth: Error: Result:}, err=
2023/05/23 00:57:49 DEBUG : onedrive-backup: config: reading config parameter "c onfig_refresh_token"
Already have a token - refresh?
y) Yes (default)
n) No
y/n> y

2023/05/23 00:58:38 DEBUG : onedrive-backup: config in: state="*oauth-confirm,choose_type,,", result="true"
2023/05/23 00:58:38 DEBUG : onedrive-backup: config out: out=&{State:*oauth-islocal,choose_type,, Option:true OAuth: Error: Result:}, err=
2023/05/23 00:58:38 DEBUG : onedrive-backup: config: reading config parameter "config_is_local"
Use web browser to automatically authenticate rclone with remote?

  • Say Y if the machine running rclone has a web browser you can use
  • Say N if running rclone on a (remote) machine without web browser access
    If not sure try Y. If Y failed, try N.

y) Yes (default)
n) No
y/n> n

2023/05/23 00:59:18 DEBUG : onedrive-backup: config in: state="*oauth-islocal,choose_type,,", result="false"
2023/05/23 00:59:18 DEBUG : onedrive-backup: config out: out=&{State:*oauth-remote,choose_type,, Option: OAuth: Error: Result:}, err=
2023/05/23 00:59:18 DEBUG : onedrive-backup: config in: state="*oauth-remote,choose_type,,", result=""
2023/05/23 00:59:18 DEBUG : sending client_secret = "list"
2023/05/23 00:59:18 DEBUG : sending drive_id = "391804cd3b--------"
2023/05/23 00:59:18 DEBUG : sending drive_type = "personal"
2023/05/23 00:59:18 DEBUG : onedrive-backup: config out: out=&{State:*oauth-authorize,choose_type,, Option: OAuth: Error: Result:}, err=
2023/05/23 00:59:18 DEBUG : onedrive-backup: config: reading config parameter "config_token"
Option config_token.
For this to work, you will need rclone available on a machine that has
a web browser available.
For more help and alternate methods see: Remote Setup
Execute the following on the machine with the web browser (same rclone
version recommended):
rclone authorize "onedrive" "eyJjbGllbnRfc---deleted-------------"
Then paste the result.
Enter a value.
config_token> This value is required and it has no default.
config_token>

that's it, seems i have to reinstall or?

well, did that work or not?

--- post the output of a test command, such as rclone ls onedrive-backup: -vv
--- post the redacted config file

Step by step:

  1. the output has been posted and the procedure did not work

  2. I have deleted the config file, made a new 'rclone config' on an other machine which has an internet explorer. I copied the new config file to my proxmox server and it runs. So my Problem ist solved for the moment.

  3. searching for the cause of my problem I come to this story:
    a. There was a lack/unstability in connection my proxmox via internet line (50MBit/s [green-line] up and 100MBit/s Download [red-line]) to ondrive-server.
    See chart with bandwidth (horizontale line represents missing data):


    b. this takes so long, that an outomatic selfrepair does not work
    c. In time between the backup processes (generates about 100GB Data) have reduced lokal space and machine runs in the problem
    d. after detection the problem (due weekdend and holiday, 8 days later and absence from local access to server), i deleted the lot's of temp-files to become proxmox running.
    e. I think, in that time there has a file become damaged anywhere, which I could repair with the newly setup

I would welcome a safeguard that would prevent such problems from raising.

I will see, if i get this problem again.

If so, i will contact this community again.

I thank for quick trying to help me

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.