j0rsa/transmission-rpc

Issues with the dotenv configuration

Closed this issue · 4 comments

Hi,

I am still running into some issues with running the session get example. And the errors are:

cargo r --example session-get
    Finished dev [unoptimized + debuginfo] target(s) in 0.16s
     Running `target/debug/examples/session-get`
"http://0.0.0.0:9091/transmission/rpc/"
thread 'main' panicked at 'Unable to get session id', /home/vagrant/dev/pvn/transmission-rpc/src/lib.rs:69:14

Is there anything wrong with the host parameter? 0.0.0.0 is the bind address I have in the setting.json.

Thank you for creating this crate!

Hi @JethroSun! Thanks for your interest in the project.
I hope you just masked the IP address and didn't provide 0.0.0.0 in .env file. Also what is the settings.json you are referencing to?
If I misunderstood everything that you wrote, can you open the link http://0.0.0.0:9091/transmission/web ? Is it accessible? 😄

I am trying to run transmission in a remote server so it is a bit hard to check the web portal for now. For the setting.json I am talking about the one from transmission (/var/lib/transmission-daemon/info/settings.json ). Am I supposed to change the "bind-ipv4-addr" to my own ip address and use that as "host"?

thank you for the quick response

According to this article

Transmission listens on all IPv4 and IPv6 addresses available on your system, thus the bind-ipv4-address parameter is set to 0.0.0.0 and the bind-address-ipv6 parameter is set to ::.

The IP address you should provide to the library is the one that is accessible from the computer you run the code on. It is either 127.0.0.1 if you're running your app on the same computer or local IP address from the same network as your remote server or a global one (please secure your server basic Auth and preferably SSL)

Mystery solved, I need to set my own password and stop and restart the daemon in a particular way. (see this post: https://forums.sonarr.tv/t/getting-nowhere-with-transmission-setup/3795/3)

Thank you!