Error 504 on streaming on fresh installation

Hello,

I just installed an instance, the streaming service is started but replies 504 and I can’t find anything usefull in the logs.

Here are the nginx logs:

==> /var/log/nginx/icedtux.no-error.log <==
2021/01/27 23:45:42 [error] 25153#25153: *10195 upstream timed out (110: Unknown error) while reading response header from upstream, client: 2a0e:f42:0:1:b7ba:dd1c:9eb4:2e32, server: icedtux.no, request: "GET /api/v1/streaming/? HTTP/1.1", upstream: "http://127.0.0.1:4000/api/v1/streaming/?", host: "icedtux.no"

==> /var/log/nginx/icedtux.no-access.log <==
2a0e:f42:0:1:b7ba:dd1c:9eb4:2e32 - - [27/Jan/2021:23:45:42 +0100] "GET /api/v1/streaming/? HTTP/1.1" 504 894 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0"

And the node logs:

Jan 27 23:42:41 bulbizarre mastodon-streaming: info Starting streaming API server master with 1 workers 
Jan 27 23:42:41 bulbizarre mastodon-streaming: info Starting worker 1 
Jan 27 23:42:41 bulbizarre mastodon-streaming: info Worker 1 now listening on 127.0.0.1:4000 

Where else can I gather information?

I found the error. My distribution was too up-to-date compared to the docs, I downgraded from nodejs 14 to 12 and now I have subscriptions on mastodon-streaming:

Jan 28 13:49:47 bulbizarre mastodon-streaming: info Worker 1 exiting, bye bye 
Jan 28 13:49:48 bulbizarre mastodon-streaming: info Starting streaming API server master with 1 workers 
Jan 28 13:49:48 bulbizarre mastodon-streaming: info Starting worker 1 
Jan 28 13:49:48 bulbizarre mastodon-streaming: info Worker 1 now listening on 127.0.0.1:4000 
Jan 28 13:50:09 bulbizarre mastodon-streaming: verb Subscribe timeline:access_token:4 
Jan 28 13:50:09 bulbizarre mastodon-streaming: verb f114f863-d57d-468a-87be-66da03b08891 Starting stream from timeline:1 for 1
Jan 28 13:50:09 bulbizarre mastodon-streaming: verb Subscribe timeline:1 

It could be nice to say in the docs that nodejs > 12 isn’t supported.

The actual reason might be different. Binary node modules have to be compiled for particular major version of node because of frequent Application Binary Interface changes. So you need to reinstall all node modules when changing node versions like that.

The yarn command from the doc has been ran while the version 14 was still installed, and I didn’t run it again after the downgrade to 12

Yes, all node modules should have been reinstalled after the node 12 downgrade. That explains the problem.

As I didn’t ran yarn again, how the modules could have been reinstalled?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.