Fix Some Common Transmission-CLI Errors

Installed transmission-cli but can’t use it, read this guide to fix all the basic errors.

When you try to run transmission-cli or any other tool like Stig, which is using transmission-cli under the hood, then you will be encountered with some of the common errors such as:

  • Failed to connect: http://localhost:9091/transmission/rpc
  • Authentication failed: http://localhost:9091/transmission/rpc
  • Permission Denied error when you try to download file to another directory

If you are having the following issue, then you have been redirected to the right place by your search engine, where you will learn how to fix the above stated error while using the transmission-cli or any other dependent packages.

Let’s start this guide with the first common error: “Failed to connect or couldn’t connect to the server.”

Fix Error: Failed to connect: http://localhost:9091/transmission/rpc

This error can be caused by many factors, such as when you do not have a transmission daemon in your system, a service that is not running, or the path and port number are incorrect.

tranmission-remote error couldnt connect to server
tranmission-remote error: couldn’t connect to server

Additionally, other possible causes could include firewall or network configuration issues.

And to resolve this error, you should check that the transmission daemon is installed and running on your system, verify the path and port number are correct, and make sure it’s not blocked by the firewall.

First, start by checking the status of the service, and if the service is not running, please start it and run the command, which has thrown an error (couldn’t connect to the server).

$ sudo systemctl status transmission-daemon
$ sudo systemctl start transmission-daemon

If the above command throws the error message “Unit transmission-daemon.service could not be found,” then you need to install transmission-daemon to your system by executing the following set of commands:

$ sudo apt update
$ sudo apt install transmission-cli transmission-common transmission-daemon

Most likely, your problem should be resolved, and if the issue still persists, you can run the following command to check whether the default port 9091 is accessible or not:

$ telnet localhost 9091 

If the port is accessible, then you will get the message “Connected”.

Fix Error: Authentication failed: http://localhost:9091/transmission/rpc

Once you’ve fixed the error above, you’ll get another one that says “Authentication failed.” This means you won’t be able to use the utility or access it.

To fix this error, you can either disable the authentication process or else change the long password to your preferred short password so that you can easily remember it and successfully authenticate.

To make these changes, you need to open /etc/transmission-daemon/settings.json with sudo permission to modify the file with any of your preferred text editors.

$ sudo nano /etc/transmission-daemon/settings.json  

Once you open the file, look for the “rpc-authentication-required” parameters and change it to “false” to disable the authentication mechanism so you can easily connect to the transmission-daemon without providing a username and password.

But if you want to use the password, then go a bit down and look for “rpc-password,” where you will find the default password, which you can directly use in the application or else you can make it shorter so you can easily type the password.

And after making the changes, please save the file and execute the following command to reflect the changes.

$ sudo systemctl reload transmission-daemon
$ sudo systemctl restart transmission-daemon

Fix Error: Permission Denied

If you have changed the default path for downloading files from the /etc/transmission-daemon/settings.json file, then you will get the “Permission Denied” error while downloading the file.

To resolve this issue, you need to update the permissions of the new download path or change the path back to the default location, but I’ll show you what commands you need to run when you have changed the default path to avoid the “Permission Denied” error.

So to explain it better, let me change the default path “download-dir” from “/var/lib/transmission-daemon/downloads” to /home/shen/Downloads/Torrent-files/.

After making the changes to /etc/transmission-daemon/settings.json, run the following commands to update the password, and then restart the transmission daemon service for the changes to take effect.

$ sudo systemctl stop transmission-daemon
$ sudo usermod -aG shen debian-transmission
$ sudo chmod 775 -R /home/shen/Downloads/Torrent-files/
$ sudo chown -R debian-transmission:shen /home/shen/Downloads/Torrent-files/
$ sudo systemctl restart transmission-daemon

Once it’s done, you will find that the error no longer exists on your system.

Wrap up

That’s all there is to do to resolve “couldn’t connect to server, authentication failed, and permission denied,” but if you are still having problems with the above-stated issue, do let me know in the comment section.

If you’ve already faced any other relatable issue, then let us know so any other users who are struggling to find a solution can benefit from the information.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments