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

Bitbotctl fails to find socket? #367

Open
poVoq opened this issue May 27, 2023 · 2 comments
Open

Bitbotctl fails to find socket? #367

poVoq opened this issue May 27, 2023 · 2 comments

Comments

@poVoq
Copy link

poVoq commented May 27, 2023

I am running bitbotd with the --config option to load a config file from a custom location and point the bot to a custom data directory. This works perfectly fine with bitbotd.

However bitbotctl fails with the following error:

May 27 20:37:47 host systemd[1]: Reloading bitbot.service - IRCv3 bot...
░░ Subject: A reload job for unit bitbot.service has begun execution
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A reload job for unit bitbot.service has begun execution.
░░ 
░░ The job identifier is 173102.
May 27 20:37:47 host BitBot[709026]: Traceback (most recent call last):
May 27 20:37:47 host BitBot[709026]:   File "/opt/bitbot/bitbotctl", line 46, in <module>
May 27 20:37:47 host BitBot[709026]:     sock.connect(args.socket)
May 27 20:37:47 host BitBot[709026]: FileNotFoundError: [Errno 2] No such file or directory
May 27 20:37:47 host systemd[1]: bitbot.service: Control process exited, code=exited, status=1/FAILURE

I am guessing that bitbotctl also needs to be told about the custom data folder in which the bot.sock etc. can be found?

Or is this caused by something else?

As I apparently can't figure out the master-password without bitbotctl this is kind of a breaking bug, despite the bot working fine otherwise.

Thanks for the help.

@examknow
Copy link
Member

I think we discussed this on IRC a few weeks ago. For some reason, bitbot isn't able to find your socket file automatically in your specific environment. To remedy this, you need to specify the full path to your bot.sock file using the -s option (refer back to our IRC discussion for more specific usage details). You'll also need to update your systemd unit files accordingly.

Additionally, if someone else could reproduce this in their environment and report to this issue that would be awesome. I can't imagine how this would be a bug in bitbot but if it is I'd like to figure that out.

@poVoq
Copy link
Author

poVoq commented May 27, 2023

I am running it in a venv if that helps figuring out what the problem might be.

Ah, that sounds promising. So I start it with bitbotctl -s /opt/bitbot/data/bot.sock or so? Edit: seems to work. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants