signal-golang / textsecure

TextSecure(signal) client package for Go
GNU General Public License v3.0
57 stars 26 forks source link

Crayfish not working #49

Closed Hetti closed 2 years ago

Hetti commented 2 years ago

I have built the latest version https://github.com/signal-golang/textsecure/tree/v1.4.3 and wanted to run it in gateway mode like @morph027 documented it in https://morph027.gitlab.io/signal-web-gateway/

Unfortunately the crayfish does not work. When starting the program, following output is logged:

level=info msg="[textsecure] Checking certificate"
level=debug msg="[textsecure] GetRegisteredContacts"
level=info msg="[textsecure-crayfish] Starting crayfish-backend"
level=error msg="[textsecure-crayfish] crayfish not found"
level=debug msg="[textsecure-crayfish-ws] BackendStartListening"
level=debug msg="[textsecure-crayfish-ws] websocket connecting to crayfish-server"
level=error msg="dial tcp [::1]:9081: connect: connection refused"
level=error msg="[textsecure-crayfish-ws] Failed to start listening" error="dial tcp [::1]:9081: connect: connection refused"
level=info msg="[crayfish] /home/signal\n"
level=info msg="[textsecure-crayfish-ws] out: /home/signal\n\n"
level=info msg="[textsecure-crayfish-ws] err: \n"
level=info msg="[textsecure-crayfish] Crayfish-backend finished with error: <nil>"

therefore it also unsuccessfully tries to connect to the crayfish server:

level=debug msg="[textsecure] Websocket sending message"
level=debug msg="[textsecure-crayfish-ws] websocket connecting to crayfish-server"
level=error msg="dial tcp [::1]:9081: connect: connection refused"
level=error msg="[textsecure-crayfish-ws] Failed to start listening" error="dial tcp [::1]:9081: connect: connection refused"
level=debug msg="[textsecure-crayfish-ws] websocket connecting to crayfish-server"
level=error msg="dial tcp [::1]:9081: connect: connection refused"
level=error msg="[textsecure-crayfish-ws] Failed to start listening" error="dial tcp [::1]:9081: connect: connection refused"
level=debug msg="[textsecure-crayfish-ws] websocket connecting to crayfish-server"
level=error msg="dial tcp [::1]:9081: connect: connection refused"

Any idea what I'm missing?

The service runs just as the low privileged signal user.

nanu-c commented 2 years ago

We have introduced crayfish as a new rust backend in order to use the upstream signal libraries in combination with the backend library from whisperfish, the signal client from sailfish. In order to find the root cause, did you compile crayfish? Second question is crayfish running an listening on 9081 when you start your client?

Hetti commented 2 years ago

Ah well, I didn't compile crayfish and I'm not running it :)

anywhere some guide/doc for that?

Thanks! :+1:

nanu-c commented 2 years ago

Crayfish is an submodule in the cli and then you need cargo/rust installed, then it's in the makefile :) or cd crayfish&&cargo build, also here is a hint: https://github.com/signal-golang/textsecure/tree/master/cmd/textsecure#installing

Hetti commented 2 years ago

Thank you very much @nanu-c ! :smiley:

I got it running by building the crayfish binary in a docker container and copy it on the host into /usr/bin on the system like described in the standalone signal-web-gateway doku for the signal binary itself :)