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

[BUG] Peerport is being reset to 51413 #296

Closed
1 task done
RA341 opened this issue Nov 23, 2024 · 12 comments · Fixed by #297
Closed
1 task done

[BUG] Peerport is being reset to 51413 #296

RA341 opened this issue Nov 23, 2024 · 12 comments · Fixed by #297

Comments

@RA341
Copy link

RA341 commented Nov 23, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Updated transmission yesterday to cc489ce02927e526f1cba573b42d31a8cac66338aadcacc4b0d998341818d620, it seems it is resetting my torrent port to 51413 on restart,

Expected Behavior

The port in the env should be used

Steps To Reproduce

  1. Start latest transmission,
  2. use the peerport env in the compose file
  3. Open transmission webgui and check the port in settings
  4. It should be different

Environment

- OS:
- How docker service was installed:

CPU architecture

x86-64

Docker creation

transmissionprivate:
    container_name: transmissionpriv
    image: lscr.io/linuxserver/transmission:latest
    env_file:
      - env/tpriv.env
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=${TZ}
    volumes:
      - ${appdata_ssd}/transmissionpriv/config:/config
      - ${media}:/media
    ports:
      - "9092:9091"
      - "9888:9888"
    restart: unless-stopped

------------------------------------
Envfile

USER=...
PASS=...
PEERPORT=9888

Container logs

ln: failed to create symbolic link '/transmissionic/index.html': File exists

ln: failed to create symbolic link '/combustion-release/index.html': File exists

ln: failed to create symbolic link '/flood-for-transmission/index.html': File exists

ln: failed to create symbolic link '/kettu/index.html': File exists

ln: failed to create symbolic link '/transmission-web-control/index.html': File exists

[custom-init] No custom files found, skipping...

Connection to localhost (127.0.0.1) 9091 port [tcp/*] succeeded!

[ls.io-init] done.
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@Banawoke
Copy link

Hi,

It is the same issue old issue her : #239
You need to change the file settings.json in your case in this folder : "${appdata_ssd}/transmissionpriv/config" the line to change is this one "peer-port"

@RA341
Copy link
Author

RA341 commented Nov 28, 2024

Tried it, didn't work, it overwrote the config again when the container restarted

@derekoharrow
Copy link

I'm having exactly the same issue. Docker compose file includes PEERPORT=51866. I stop transmission and change peerport in settings.json to 51866. Then recreate the transmission container and it starts on 51413 and the settings.json file is changed to 51413 too - thought I was going mad! Glad it's not just me.
After each creation of the container, I have to manually go into the GUI and set the port back.

@Lightjohn
Copy link

Seems I have this issue also, setting.json is getting overwritten everytime.

@j0nnymoe
Copy link
Member

you need to edit the settings.json when the container is stopped.

@Lightjohn
Copy link

The settings is overwritten on launch by container so the ENV variables are not taken in account, which is the issue

@derekoharrow
Copy link

you need to edit the settings.json when the container is stopped.

If you read my comment above, that makes no difference - even stopping transmission, changing the file, and then restarting and it still resets back to the default.

@aptalca
Copy link
Member

aptalca commented Nov 29, 2024

I can confirm the issue locally, but no idea what's causing it.

Our init does successfully modify the settings.json with the PEERPORT from env var: https://github.com/linuxserver/docker-transmission/blob/master/root/etc/s6-overlay/s6-rc.d/init-transmission-config/run#L36

But when the transmission daemon starts, it somehow gets reverted.

root@acd9e9cbd159:/# echo -E "$(jq -r --arg peerport "${PEERPORT}" '.["peer-port"] = $peerport' /config/settings.json)" >/config/settings.json
root@acd9e9cbd159:/# cat /config/settings.json | grep peer-port
  "peer-port": "55555",
  "peer-port-random-high": 65535,
  "peer-port-random-low": 49152,
  "peer-port-random-on-start": false,
root@acd9e9cbd159:/# s6-svc -u /run/service/svc-transmission
root@acd9e9cbd159:/# cat /config/settings.json | grep peer-port
    "peer-port": 51413,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,

@aptalca
Copy link
Member

aptalca commented Nov 29, 2024

I'm blind, I missed the string vs int

We'll get a fix out

@aptalca
Copy link
Member

aptalca commented Nov 29, 2024

Can you guys test this image and confirm?
ghcr.io/linuxserver/lspipepr-transmission:4.0.6-r0-pkg-ab12cd8b-dev-e40526e7dac729463aee02e60a9f1564af0f76de-pr-297

@RA341
Copy link
Author

RA341 commented Nov 29, 2024

working for me thanks

@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

6 participants