purple-signald icon indicating copy to clipboard operation
purple-signald copied to clipboard

Cannot connect to signald

Open Johnnyreyman opened this issue 2 years ago • 17 comments

I try to connect pidgin to signald and keep getting the error message +xxxxxxxxxx disconnected Could not connect to socket.

My socket is pointed to: /var/run/signald/signald.sock

Output of systemd status:

signald.service - A daemon for interacting with the Signal Private Messenger
     Loaded: loaded (/usr/lib/systemd/system/signald.service; enabled; vendor preset: disabled)
     Active: active (running) since Thu 2021-10-07 18:00:50 CDT; 55min ago
   Main PID: 8622 (java)
      Tasks: 16 (limit: 28774)
     Memory: 129.6M
        CPU: 3.269s
     CGroup: /system.slice/signald.service
             └─8622 java -classpath /var/lib/signald/lib/signald.jar:/var/lib/signald/lib/signal-service-java-x86_64-unknown-linux-gnu-2.15.3_unofficial_27.jar:/var/lib/signald/lib/bcprov-jdk15on-1.66.jar:/var/lib/signald/lib/junixsocket>

Oct 07 18:00:50 Synolvia-GX1 systemd[1]: Started A daemon for interacting with the Signal Private Messenger.
Oct 07 18:00:51 Synolvia-GX1 signald[8622]: 18:00:51.020 [main] WARN  io.finn.signald.Main - Support for this version of Java may be going away. Please update your java version. For more information see https://gitlab.com/signald/signald>
Oct 07 18:00:51 Synolvia-GX1 signald[8622]: 18:00:51.293 [main] INFO  io.finn.signald.Main - Binding to socket /var/run/signald/signald.sock
Oct 07 18:00:51 Synolvia-GX1 signald[8622]: 18:00:51.301 [main] INFO  io.finn.signald.Main - Started signald 0.15.0-6-7fb32321

Johnnyreyman avatar Oct 07 '21 23:10 Johnnyreyman

I'm having the same problem, but with bitlbee. The socket exists and is used by signald according to logs. Did you manage to get it running?

rudolfkral avatar Mar 09 '22 00:03 rudolfkral

In pidgin, how are your account settings in the "Advanced" tab regrading the control of signald?

ttlmax avatar Mar 09 '22 05:03 ttlmax

If you were talking just to @Johnnyreyman , please ignore. I'm using bitlbee, not pidgin. These are plugin settings in bitlbee:

<root> auto-join-group-chats = `true'
<root> auto_connect = `true'
<root> auto_reconnect = `true'
<root> away is empty
<root> device-name = `mydevicename'
<root> display_name is empty
<root> external-attachments = `false'
<root> external-attachments-dir = `'
<root> external-attachments-url = `'
<root> fake-online = `true'
<root> group-msg-notifications = `false'
<root> handle_signald = `false'
<root> handle_unknown is empty
<root> link = `true'
<root> nick_format = `%full_name-sig'
<root> nick_source = `handle'
<root> password = `********' (hidden)
<root> socket = `/var/run/signald/signald.sock'
<root> tag = `signal'
<root> use-group-avatar = `true'
<root> username = `+myphonenumber'

Is this helpful at all? Are there settings that are present in Pidgin but not here? Do you suggest I try pidgin to see if the plugin works with it?

rudolfkral avatar Mar 10 '22 14:03 rudolfkral

@rudolfkral I have the same issue as you with bitlbee. It works for me in pidgin, however the setup doesn't use signaldctl. It seems like pidgin talks directly to signald without signalctl so that might be where the issue lies. Hoever if that were the case I would think that I could link with pidgin and then pick up in bitlbee after it links the number in the pidgin setup.

ethanmlee avatar Apr 08 '22 02:04 ethanmlee

I see that folks are specifying the socket path explicitly. In that case, the plug-in does not search other paths. Please be aware that signald's default behaviour was changed, see #55. Can you double check the paths in your setups?

hoehermann avatar Apr 08 '22 07:04 hoehermann

@hoehermann My bitlbee log seems to check both paths:

DEBUG prpl-hehoe-signald: login
DEBUG prpl-hehoe-signald: global socket location /var/run/signald/signald.sock
DEBUG prpl-hehoe-signald: connecting ... 0 s
(...)
DEBUG prpl-hehoe-signald: connecting ... 10 s
(...)
DEBUG prpl-hehoe-signald: global socket location /var/run/signald/signald.sock
DEBUG prpl-hehoe-signald: connecting ... 0 s
(...)
DEBUG prpl-hehoe-signald: connecting ... 10 s
(...)
DEBUG prpl-hehoe-signald: global socket location (null)/signald/signald.sock
DEBUG prpl-hehoe-signald: connect() error is No such file or directory
DEBUG connection: Connection error on 0x56266b8dd2f0 (reason: 0 description: Could not connect to socket.)
(...)
DEBUG prpl-hehoe-signald: login
DEBUG prpl-hehoe-signald: global socket location /var/run/signald/signald.sock
DEBUG prpl-hehoe-signald: connecting ... 0 s

And so on, circling between the /var/run path and the (null) path. /var/run/signald/signald.sock exists and I have been able to connect to it and use it manually, so I don't know why the plugin can't connect.

rudolfkral avatar Apr 08 '22 10:04 rudolfkral

@rudolfkral (null)/signald/signald.sock should be $XDG_RUNTIME_DIR/signald/signald.sock if you switched to it. mine is located in /var/run/signald/signald.sock and still have the error tho.

ethanmlee avatar Apr 08 '22 14:04 ethanmlee

Do signald and bitlbee run as the same user? Does bitlbee have read access to the socket file?

@rudolfkral From the logs, it looks like you are using the plug-in version 0.8.x. ttlmax and I did quite a lot of work and released 0.11.0 a couple of days ago. While not directly related to this problem, I advise you to update. Versions prior to 0.9.0 will not really work with the recent version of the Signal protocol.

hoehermann avatar Apr 08 '22 18:04 hoehermann

What has changed in dd502381ae51c185e4262b802c9d9e8cf7f72892 is that there is no default location for a locally socket file controlled by the plugin itself (or am I missing something). I think if this option is selected, than you have to enter a file location. However, in the settings of @rudolfkral, handle_signald = false.

I also have faced some connection problems lately and am wondering if a timeout of 10s might be too short, since reconnecting almost always solves the problem.

ttlmax avatar Apr 08 '22 18:04 ttlmax

Do signald and bitlbee run as the same user? Does bitlbee have read access to the socket file?

@hoehermann I added the bitlbee user to the signald group like I did for my own user and it gives the same error. I also tried doing the same with the signald user adding it to the bitlbee group but still no luck. My user also is a part of both the signald and bitlbee groups.

ethanmlee avatar Apr 08 '22 18:04 ethanmlee

@ttlmax Oh, yes. I forgot SIGNALD_DEFAULT_SOCKET is the empty string. I should change that into back to something more intuitive.

@ethanmlee That is weird. I never had unix socket accessible but not connectable. Is there something which could interfere with the permissions? Something like AppArmor?

hoehermann avatar Apr 08 '22 19:04 hoehermann

Is there something which could interfere with the permissions? Something like AppArmor?

@hoehermann not that I am aware of. I don't use AppArmor or anything like that.

ethanmlee avatar Apr 08 '22 21:04 ethanmlee

What is the output of sudo lsof /var/run/signald/signald.sock?

hoehermann avatar Apr 08 '22 23:04 hoehermann

@hoehermann What is the output of sudo lsof /var/run/signald/signald.sock?

$ sudo lsof /var/run/signald/signald.sock
COMMAND  PID    USER   FD   TYPE             DEVICE SIZE/OFF  NODE NAME
java    1284 signald   52u  unix 0x00000000ff2649d8      0t0 16223 /var/run/signald/signald.sock type=STREAM

ethanmlee avatar Apr 15 '22 15:04 ethanmlee

It looks like everything is in order. I have no idea what is going on here.

hoehermann avatar Apr 18 '22 10:04 hoehermann

@ethanmlee Have you ever found a way to overcome this problem?

hoehermann avatar Jul 17 '22 22:07 hoehermann

@hoehermann Unfortunately not. i run debian and was thinking the issue could be because of the older packages it uses. Ive been meaning to spin up a fedora vm to see if thats the case. Ill reply with the results here once i do that sometime this week.

ethanmlee avatar Jul 17 '22 22:07 ethanmlee

did you ever figure this out?

isakrubin avatar Nov 09 '22 21:11 isakrubin

@isakrubin no I didn't get a chance to get to it. I tried the weechat signald plugin as well and it appears to not be working as well. Havn't done too much research into it but it appears to just be an issue with signald for me :/

ethanmlee avatar Nov 10 '22 22:11 ethanmlee

Thank you for the response. I will now close this issue as a weird edge-case I cannot replicate. In case you ever find out what stops your set-up from working, please let us know. :)

hoehermann avatar Nov 10 '22 22:11 hoehermann