Diaspora.sock failed (2: No such file or directory)

Hello guys,

I just finished the setup of my Diaspora Pod on my VPS under Debian 10.
All seems to be ok but when i go on my domain name via my browser i’ve a 502 error (Bad Gateway).

In my /etc/nginx/log/dspr-error.log i’ve a line i don’t understand :

2019/12/18 09:01:54 [crit] 1868#1868: *24161 connect() to unix:/home/diaspora/diaspora/tmp/diaspora.sock failed (2: No such file or directory) while connecting to upstream, client: 209.27.85.154, server: www.mydomain.org, request: “GET / HTTP/1.1”, upstream: “http://unix:/home/diaspora/diaspora/tmp/diaspora.sock:/”, host: “web.mypferdefutter.com

Thanks for help

It is hard to give definitive answer but basically your web server says it can’t connect to Diaspora server.

Is Diaspora server running? How do you start it (by default it is done by running ./script/server which has to be kept running)? Did you change the mode of operation (socket vs. port) in diaspora.yml?

Hello Spc Cw,

Here what is happen when i lauch Diaspora with command “./script/server”

https://pastebin.com/W0NHz7u8

Thank you for your analysis

Scott

Here is the revelent information from your log :

I, [2019-12-19T09:11:33.823379 #128828] INFO – : [diaspora:sidekiq:sidekiq1] switch :crashed [:up => :down] crashed

Your sidekiq process crash everytime diaspora* try to start it and finally give up. Would you mind providing your sidekiq log ? (probably in (/home/diaspora/diaspora/log/sidekiq.log)

Hello Sébastien, french ?

Here last lines of the sidekiq.log, for me it is charabia :slight_smile:

https://pastebin.com/2DgTz4jY

Oui français :stuck_out_tongue:

Each these lines is a sidekiq startup.
Mine look like :

2019-12-15T13:38:01.162Z 65 TID-64wb9 INFO: Booting Sidekiq 5.2.5 with redis options {:url=>“redis://redis”, :id=>“Sidekiq-server-PID-65”}

Do you spot the difference ? (you have “url”=> nil)

You havent set the diaspora.yml parameter environnement>redis. Do this (and make sure there’s a redis indeed there)

1 Like

Ah un français !!! Excellent ! me too :slight_smile:
Donc désolé si je te fais répéter mais tu peux redonner tes explications en FR stp ?

Ah si c’est bon j’ai compris, j’ai oublié de paramétrer Redis dans diaspora.yml

Je regarde ça de suite, Merci Seb

Bon j’ai fait plusieurs modifs mais ça ne fonctionne toujours pas :frowning:
Est ce que le fait que je sois sous Debian 10 change quelque chose ?

Diaspora* works well on debian 10.
How is your setup ? Everything on the same host ?
Have a look at this guide : https://angristan.fr/installer-pod-diaspora-debian-ubuntu/

Hello Sébastien,

I’m following the Angristan’s tuto from the scratch, but i’m stoppped at the point where in need to install bundle with the next lines under diaspora profile :

gem install bundler
script/configure_bundler

But i’ve an answer “bash: gem: command not found”

Other thing i red in the tuto that the ruby version was 2.4.3, but the 2.4.9 is available, can i install the latest stable version with these commands ? :

rbenv install 2.4.9
rbenv global 2.4.9

I tried to lauch the command “sudo gem install bundler” but the account diaspora has been created with the “–disabled-login” there’s no password to validate the sudo command.

I never had problems with the official guide even though it is for Debian 8.

But you have to follow it carefully, e.g. it matters under which user and in which directory commands are run.

In your case it is possible you are not running it under diaspora user and in diaspora directory (typically /home/diaspora/diaspora). If you do then please check the official guide in case you missed something.

Hello all,

i reinstall all from the scratch following the official guide but always the same error 502 Bad Gateway. I give you all infos you could need to find where i made a mistake. Big thanks for your help

Conf diaspora.yml
https://pastebin.com/zumUB73p

Conf database.yml
https://pastebin.com/AUSa13Nk

Conf NGinX /etc/nginx/conf.d/mydomain.org.conf
https://pastebin.com/sD07nCAZ

Conf NGinX nginx.conf
https://pastebin.com/B2cDn81K

Command bundle exec sidekiq
https://pastebin.com/reV54aKt

Logs Lauching Diaspora
https://pastebin.com/xgFZY8Xy

Log Sidekiq.log
https://pastebin.com/3WW4CyHN

Log eye_processes_stderr.log
https://pastebin.com/XPXUHRnA

One thing I notice is that this line in diaspora.yml is commented on my pod:

redis: 'redis://production.mydomain.org:6379'

1 Like

i fixed the file Pastebin, cause the line is commented too on my pod.

Hopefully someone knowing the internals better checks this and gives some insights :slight_smile:

However today I moved my pod to another server and I did this by setting up entirely fresh pod with the same URL and then replacing the DB and uploads folder.

I followed the official install guide and I also had Debian 10. The first time I tried it it failed similar to yours - everything seemed to be more or less okay except no connection to Diaspora server and no .sock file.

Then I just dropped the DB and did all the instructions from the install guide all over again from the start (over the existing installation without removing anything). I reinstalled Ruby and left Diaspora files from git in place too. And this time it worked even though I did all the same steps.

Maybe there is something buggy in there (but before it was rock solid, I installed Diaspora two times and it went without glitch).

Hi Spc Cw,

Thanks for your cool answer. Personally I had to install it at least 10 times, following two differents tutorials, the official and this one : https://angristan.fr/installer-pod-diaspora-debian-ubuntu/

But always the same result :frowning:

It’s Christmas day and my Pod works !!! I finally found how to lauch it without crash !!

I increased th setup backtrace from 15 to 30 in the diaspora.yml !

Merry Christmas and congratulations!

I have no idea how this setting can affect pod startup, right now I have it set to false but I am pretty sure it worked as default too. Must be some bug.

Make sure to set up pod backups (DB, uploads folder, database.yml, diaspora.yml) and feel free to ask any other questions, we’ll try to help :slight_smile: