unable to connect to console

General support for problems installing or using Deluge
Post Reply
deranjer
New User
New User
Posts: 6
Joined: Wed Jan 27, 2010 8:29 pm

unable to connect to console

Post by deranjer »

whenever I attempt to connect to the console using:

Code: Select all

# deluge -u console
It give me a few errors (such as bad password) but those clear up and it lets me type on the command prompt, but if I type:

Code: Select all

>>> connect localhost
Failed to connect to localhost:58846 with reason: Password does not match
>>> connect localhost test test
Failed to connect to localhost:58846 with reason: Username does not exist
>>> connect localhost view test
Failed to connect to localhost:58846 with reason: Username does not exist
I output everything to a log file, as follows:

Code: Select all

[ERROR   ] 20:05:35 client:375 RPCError Message Received!
--------------------------------------------------------------------------------
RPCRequest: daemon.login(localclient, fe8b666497e59f802fc26ecc5032734e5e884c76)
--------------------------------------------------------------------------------
  File "/usr/lib/python2.5/site-packages/deluge-1.2.0_rc5-py2.5.egg/deluge/core/rpcserver.py", line 245, in dispatch
    ret = component.get("AuthManager").authorize(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/deluge-1.2.0_rc5-py2.5.egg/deluge/core/authmanager.py", line 93, in authorize
    raise BadLoginError("Password does not match")

[ERROR   ] 20:05:55 client:375 RPCError Message Received!
--------------------------------------------------------------------------------
RPCRequest: daemon.login(test, test)
--------------------------------------------------------------------------------
  File "/usr/lib/python2.5/site-packages/deluge-1.2.0_rc5-py2.5.egg/deluge/core/rpcserver.py", line 245, in dispatch
    ret = component.get("AuthManager").authorize(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/deluge-1.2.0_rc5-py2.5.egg/deluge/core/authmanager.py", line 87, in authorize
    raise BadLoginError("Username does not exist")

BadLoginError: Username does not exist
Here is my auth file in .config/deluge:

Code: Select all

localclient:fe8b666497e59f802fc26ecc5032734e5e884c76:10
test:test:10
view:test:1
I was hoping someone could tell me what is wrong:
I am running deluge 1.2.0-rc5 on lenny lenny (with squeeze repos)
Thank you!
discmeister
Member
Member
Posts: 45
Joined: Sat Jul 03, 2010 7:20 pm

Re: unable to connect to console

Post by discmeister »

Bounce. This is precisely the problem I'm having. I've seen discussions where people have concluded that whatever has caused this - not outlined anywhere, from what I can see - has been fixed in later versions of Deluge.

It hasn't.

Discy
hobbes487

Re: unable to connect to console

Post by hobbes487 »

same problem here. I am running 1.3.0rc1
ashirley

Re: unable to connect to console

Post by ashirley »

fwiw, I get this error when I run deluged as a different linux user to deluge-console.
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

Re: unable to connect to console

Post by johnnyg »

I would say that the console isn't using the same config folder as the daemon (hence the bad password for localclient and the non-existant users).
This could either be due to you running deluged as a different user to deluge-console and/or using a non-default config for deluged.

Code: Select all

deluge-console -c <config folder>
should work.
KFrench
New User
New User
Posts: 3
Joined: Sat Apr 30, 2016 6:15 pm

Re: unable to connect to console

Post by KFrench »

ashirley wrote:fwiw, I get this error when I run deluged as a different linux user to deluge-console.

Boom that was my problem. Awesome find.
justme2016
New User
New User
Posts: 2
Joined: Mon Nov 16, 2020 4:43 am

Re: unable to connect to console

Post by justme2016 »

wow, 13 years later and Boom-- fixed my problem !
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: unable to connect to console

Post by shamael »

As the user running deluge has the config in his profile, another solution is to use sudo
sudo -u $USER deluge-console

Take what best suits you ;)
phaffywaffle
New User
New User
Posts: 1
Joined: Thu Feb 23, 2023 1:16 am

Re: unable to connect to console

Post by phaffywaffle »

Shocking that this is still an issue and that there seems to be so little discussion about this online (at least I wasn't able to find any other solid solutions anywhere) for an issue that's specifically called out in the setup documentation !
Accessing deluged service with local UI Client

When attempting to access a daemon deluged on the same machine but running as a different user e.g. your login user is user and deluged is running as deluge, you may be unable access to deluged. This is due to the client automatically authorising using the localhost line in the auth file, which is assumed to be at the same config location as deluged.

The workaround is to replace the localclient line in your user config auth file (~/.config/deluge/auth) with the localclient line from the deluged config auth file e.g. /var/lib/deluge/auth
After following setup documentation to the letter on a completely fresh Ubuntu Server install,

Code: Select all

sudo -u $USER deluge-console
just doesn't cut it when I set up a separate user specifically to not have to run this service as root or user

Finally, after an hour of banging my head against my desk, I figured out that in addition to ~/.config/deluge/auth & /var/lib/deluge/.config/deluge/auth having to match up, so too do ~/.config/deluge/hostlist.conf & /var/lib/deluge/.config/deluge/hostlist.conf

Code: Select all

********@deluge-box:~$ sudo cp /var/lib/deluge/.config/deluge/hostlist.conf ~/.config/deluge/hostlist.conf
********@deluge-box:~$ sudo chown $USER:$USER ~/.config/deluge/hostlist.conf
********@deluge-box:~$ sudo diff ~/.config/deluge/auth /var/lib/deluge/.config/deluge/auth
********@deluge-box:~$
finally did it for me, and the console finally seems to be working as intended. Hopefully this can help someone else in the future
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: unable to connect to console

Post by mhertz »

Thanks for posting and yes should be added to documentation agreed.

Btw, the auth file workaround mentioned, works for non-interactive mode of console-UI i.e. CLI mode, but for ncurses TUI then indeed hostlist.conf needs copied as you found. Well that, or simply delete it from your user-profile-dir, so it gets automatically regenerated to match correctly, atleast last I tested/posted a few years ago or so - which shouldn't be left to the user to hunt down obviously :) Thanks again for posting.
Post Reply