signal-cli-rest-api icon indicating copy to clipboard operation
signal-cli-rest-api copied to clipboard

Container connectivity errors are not logged. Receiving a 400 error and 40 second timeout instead.

Open oddlama opened this issue 3 years ago • 0 comments

The problem

If the docker container has no connectivity to the signal servers, (e.g. when trying to access the qr generation endpoint), I get a 400 error after 40 seconds but no indication at all that this is related to networking problems. Took me a while to notice that the container was missing internet access.

This is what is written to the docker logs:

+ set -e
+ [ -z /home/.local/share/signal-cli ]
+ usermod -u 1000 signal-api
+ groupmod -g 1000 signal-api
usermod: no changes
+ chown 1000:1000 -R /home/.local/share/signal-cli
+ cat
+ cap_prefix=-cap_
+ cat /proc/sys/kernel/cap_last_cap
+ seq -s ,-cap_ 0 40
+ caps=-cap_0,-cap_1,-cap_2,-cap_3,-cap_4,-cap_5,-cap_6,-cap_7,-cap_8,-cap_9,-cap_10,-cap_11,-cap_12,-cap_13,-cap_14,-cap_15,-cap_16,-cap_17,-cap_18,-cap_19,-cap_20,-cap_21,-cap_22,-cap_23,-cap_24,-cap_25,-cap_26,-cap_27,-cap_28,-cap_29,-cap_30,-cap_31,-cap_32,-cap_33,-cap_34,-cap_35,-cap_36,-cap_37,-cap_38,-cap_39,-cap_40
+ [ native = json-rpc ]
+ hostname -I
+ awk {print $1}
+ export HOST_IP=172.17.0.2
+ exec setpriv --reuid=1000 --regid=1000 --init-groups --inh-caps=-cap_0,-cap_1,-cap_2,-cap_3,-cap_4,-cap_5,-cap_6,-cap_7,-cap_8,-cap_9,-cap_10,-cap_11,-cap_12,-cap_13,-cap_14,-cap_15,-cap_16,-cap_17,-cap_18,-cap_19,-cap_20,-cap_21,-cap_22,-cap_23,-cap_24,-cap_25,-cap_26,-cap_27,-cap_28,-cap_29,-cap_30,-cap_31,-cap_32,-cap_33,-cap_34,-cap_35,-cap_36,-cap_37,-cap_38,-cap_39,-cap_40 signal-cli-rest-api -signal-cli-config=/home/.local/share/signal-cli
time="2022-09-19T22:42:20Z" level=info msg="Started Signal Messenger REST API"
[GIN] 2022/09/19 - 22:44:03 | 200 |    1.932347ms |      172.17.0.1 | GET      "/v1/about"
[GIN] 2022/09/19 - 22:45:51 | 400 | 40.204496125s |      172.17.0.1 | GET      "/v1/qrcodelink?device_name=signal-api"

Are you using the latest released version?

  • [X] Yes

Have you read the troubleshooting page?

  • [X] Yes

What type of installation are you running?

signal-cli-rest-api Docker Container

In which mode are you using the docker container?

Native Mode

What's the architecture of your host system?

x86-64

Additional information

No response

oddlama avatar Sep 19 '22 22:09 oddlama