Address already in use

STOP and READ USE THIS TEMPLATE NO EXCEPTIONS - By not using this, you waste your time, our time and really hate puppies. Please remove these two lines and that will confirm you have read them.

What is the problem you are having with rclone?

2023/12/22 20:34:31 Failed to start remote control: failed to init server: listen tcp 127.0.0.1:7772: bind: address already in use

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

rclone v1.65.0

  • os/version: ubuntu 22.04 (64 bit)
  • os/kernel: 6.2.0-39-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.21.4
  • go/linking: static
  • go/tags: none

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

Dropbox

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

[Unit]
Description=RClone VFS Service
Wants=network-online.target
After=network-online.target

[Service]
Type=notify
Environment=RCLONE_CONFIG=/home/klapvogn/.config/rclone/rclone.conf
KillMode=none
RestartSec=5
ExecStart=/usr/bin/rclone mount dropbox-crypt:drive2/ /home/klapvogn/data/shared-drives/drive-02 \
--use-mmap \
# This is for allowing users other than the user running rclone access to the mount
--allow-other \
# log file
--log-file /home/klapvogn/.config/rclone/rclone-dropbox-shared-data-02.log \
#--log-level DEBUG \
# Google Drive is a polling remote so this value can be set very high and any changes are detected via polling.
--dir-cache-time 5000h \
# I reduce the poll interval down to 10 seconds as this makes changes appear fast the API quotas per day are huge
--poll-interval 10s \
# This is setting the file permission on the mount to user and group have the same access and other can read
--umask 002 \
# Please set this to your own value below
--user-agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36' \
# This sets up the remote control daemon so you can issue rc commands locally
--rc \
# This is the default port it runs on
--rc-addr :7772 \
# no-auth is used as no one else uses my server and it is not a shared seedbox
--rc-no-auth \
# The local disk used for caching
--cache-dir=/home/klapvogn/.cache/dropbox-02 \
# 
# My quota per user / per 100 seconds is 20,000 requests. This can be found in your quota section.
# This changes the sleep calls to something much lower to take advantage of the API boost.
# change the min sleep from 100ms
--drive-pacer-min-sleep 10ms \
# Changing to have the ability to burst higher
--drive-pacer-burst 200 \
# This is used for caching files to local disk for streaming - full
--vfs-cache-mode writes \
# This limits the cache size to the value below - 1000G
--vfs-cache-max-size 100G \
# This limits the age in the cache if the size is reached and it removes the oldest files first
--vfs-cache-max-age 5000h \
# The polling interval for increased based on there is enough buffer space
--vfs-cache-poll-interval 5m \
# Add read ahead buffer to network latency issues - 1G
--vfs-read-ahead 512M \
--buffer-size 1G \
# This sets a per file bandwidth control and I limit this to a little bigger than my largest bitrate I'd want to play
#--bwlimit-file 32M \
# TPS LIMIT
--tpslimit 10
#MOUNTS
StandardOutput=file:/home/klapvogn/logs/rclone/dropbox_02_vfs_mount.log
ExecStop=/bin/fusermount -uz /home/klapvogn/data/shared-drives/drive-02
ExecStartPost=/usr/bin/rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:7772 _async=true
Restart=on-failure

[Install]
WantedBy=default.target

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[dropbox]
type = dropbox
token = XXX

[dropbox-crypt]
type = crypt
remote = dropbox:/VideoServer/Twitch
password = XXX
### Double check the config for sensitive info before posting publicly

A log from the command that you were trying to run with the -vv flag

No logs

Every time I reboot the server I get : 2023/12/22 20:34:31 Failed to start remote control: failed to init server: listen tcp 127.0.0.1:7772: bind: address already in use

And the port is not in use?

tcp        0      0 0.0.0.0:50512           0.0.0.0:*               LISTEN      -
tcp        0      0 127.0.0.1:36385         0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:8880            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:8920            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:9000            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:8989            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:8383            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:8282            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:9999            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:9696            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:7070            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:7878            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:8118            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:8096            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:8100            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:8084            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:7474            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:7441            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:4443            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:5454            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:3010            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:3012            0.0.0.0:*               LISTEN      -
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:325             0.0.0.0:*               LISTEN      -
tcp6       0      0 :::50512                :::*                    LISTEN      -
tcp6       0      0 :::7701                 :::*                    LISTEN      1355/rclone
tcp6       0      0 :::7703                 :::*                    LISTEN      1358/rclone
tcp6       0      0 :::7704                 :::*                    LISTEN      1360/rclone
tcp6       0      0 :::7772                 :::*                    LISTEN      1356/rclone
udp        0      0 127.0.0.53:53           0.0.0.0:*                           -

Have you tried changing port?

Hi,

Yes I tried changing port 5 time last night. the result is the same

does it happen only during reboot? or you can start this service later without any issues?

Hi,
During reboot. I have tryied to stop all my mounts and start them one by one. the outcome is the same :-/

You mean you can start it later with no issues?

If yes then delay your mounts a bit by adding:

ExecStartPre=/bin/sleep 30

in [Service] section.

Looks like it worked, when I mounted them one by one
the error message is gone :slight_smile:

you mean like this :slight_smile:

#MOUNTS
StandardOutput=file:/home/klapvogn/logs/rclone/dropbox_01_vfs_mount.log
ExecStop=/bin/fusermount -uz /home/klapvogn/data/shared-drives/drive-01
ExecStartPre=/bin/sleep 30
ExecStartPost=/usr/bin/rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:7701 _async=true
Restart=on-failure

yes. probably there is no fully initialised network subsystem during reboot when this service tries to start.

Delay is simple workaround - otherwise you have to investigate it in details and create much more sophisticated service dependencies.

double check on your system where sleep program is

Okay, thanks :slight_smile:

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