Install on RPi4 - connection problem


I Installed Diaspora on a Raspberry 4 with this guide

Everything run through without any error messages.

But I can’t connect the the pod - getting 502 Bad Gateway error.

[crit] 1348#1348: *12 connect() to unix:/home/diaspora/diaspora/tmp/diaspora.sock failed (2: No such file or directory) while connecting to upstream, client:, server:, request: “GET / HTTP/2.0”, upstream: “http://unix:/home/diaspora/diaspora/tmp/diaspora.sock:/”, host: “

Any help?

can you share your nginx config? It looks like something is trying to treat your unix socket as an HTTP URL.

also, does /home/diaspora/diaspora/tmp/diaspora.sock exist?

I looked at the howto you linked, and i see that the nginx config intentionally uses http:// in front of the unix sock, and that may be normal. I dont often use nginx in that way. I would fall back to my second question though, does that sock exist at the given path?

Thanks for your answer.

  1. nginx.conf
    Hikers PrivateBin

  2. /home/diaspora/diaspora/tmp/diaspora.sock
    There is no file in this /tmp folder

OK, this is likely the problem. Is the diaspora service started? Looks like the howto has you define a systemd unit for diaspora. if you check the status of that service, is it up?

systemctl status diaspora-web

If it says its running, its possible that the sock file path is just wrong? I don’t run it via a socket, so I don’t know for sure. but if you search /home/diaspora for a .sock file it might show you.

find /home/diaspora -name *.sock
If its there, but in a different location, update the nginx config to point that upstream to the proper location.

1 Like

Is Diaspora really starded?

● diaspora-web.service - Diaspora social network (unicorn)
   Loaded: loaded (/etc/systemd/system/diaspora-web.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2021-06-14 22:06:02 CEST; 2s ago
 Main PID: 19131 (ruby)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/diaspora-web.service
           └─19131 ruby /home/diaspora/.rvm/gems/ruby-2.6.6@diaspora/bin/ruby_executable_hooks /home/diaspora/.rvm

Jun 14 22:06:02 raspberrypi systemd[1]: Started Diaspora social network (unicorn).

The time “since” is exactly the time when I check the status… it should be before this time, when Diaspora started?

And there is no other *.sock to find… Very strange

I would say try a systemctl restart diaspora-web, then wait a bit and check the status again, see if that timer is going up.

Unless its configured to start as needed (which is possible) it should show a longer up time than that.

A unix socket generally only exists when the service its linked to is running, so it should be there all the time. UNLESS, there’s another service that spawns the socket. Thats possible. But i’d have to leave that to someone with a little more expertise with diaspora to answer.

Hmm - quite other idea: Permission problem… Diaspora can’t write the *.sock file. Why I have this idea? I don’t see any logs which are enabled in diaspora.yml…

Normally diaspora logs in /home/diaspora/diaspora/logs/production.log. If that’s what you’re asking.

In the container that I run mine in, it runs as UID 1000 (diaspora), so i’d make sure that the tmp directory inside of /home/diaspora is chowned to 1000:1000.

The folder /log does not exist
Well - I have to continue tomorrow - thanks…

I hope @blacksam won’t mind me inviting him, as he did run Diaspora successfully on a Pi, and hopefully will be able to help.