Page 1 of 1

unable to connect to console

Posted: Thu Jan 28, 2010 1:16 am
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!

Re: unable to connect to console

Posted: Sat Jul 10, 2010 1:34 pm
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

Re: unable to connect to console

Posted: Fri Jul 16, 2010 4:50 am
by hobbes487
same problem here. I am running 1.3.0rc1

Re: unable to connect to console

Posted: Mon Jul 26, 2010 9:53 pm
by ashirley
fwiw, I get this error when I run deluged as a different linux user to deluge-console.

Re: unable to connect to console

Posted: Mon Jul 26, 2010 11:57 pm
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.

Re: unable to connect to console

Posted: Sat Apr 30, 2016 6:16 pm
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.

Re: unable to connect to console

Posted: Tue Nov 17, 2020 6:49 am
by justme2016
wow, 13 years later and Boom-- fixed my problem !

Re: unable to connect to console

Posted: Thu Nov 19, 2020 11:43 am
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 ;)

Re: unable to connect to console

Posted: Thu Feb 23, 2023 1:44 am
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

Re: unable to connect to console

Posted: Thu Feb 23, 2023 2:51 pm
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.