Full re-installation of diaspora-fr.org

Hello,

This message is more a “for your information” thing, but I think it may be interesting to share anyway.
diaspora-fr.org is on a bare metal server for 9 years and my provider now want to recycle the machine, so I bought another bare metal and will do a fresh re-installation of it. I will go with Ubuntu 24.04 because Canonical provides extended support for free for years without needing to upgrade the operating system.
I will follow the wiki guide and update it on the fly, as I think quite a lot of information may be outdated (the first page is still talking about Unicorn while we are using Puma now for example).
One thing that I don’t know is about the image proxy, diaspora-fr still uses Camo but this is very outdated. What is now the correct choice?
Also, should systemd be the default way of launching d* now?
Cheers!

1 Like

I’m biased, but camo-rs.

A systemd-unit that starts script/server is available in the wiki, that page is also linked in the installation guide.

I’m also using camo-rs since a long time now and it’s working great :slight_smile:

I’m using the variant with separate services, which is also documented in the wiki, but the one for just script/server should also work. You can decide yourself if you want a simpler setup, or a more advanced one with multiple files you need to manage but which allows you to separately restart/reload the services.

Would y’all be comfortable if I change the wiki page to point to camo-rs instead? I never did because it feels kinda cheap to promote my own project, but at this point, it’s old enough and stable enough (I don’t think it ever crashes, not even once?) to work well enough to be “the officially recommended thing”.

1 Like

Sure. I mean camo is basically dead, and it makes sense to link to something that works and is still maintained instead.

Of course. Exactly what SuperTux said.

Just a remark that having a dependency on nodejs makes us installing a lot of package. I guess we have it to compile the front-end files, but maybe those could be provided already minified from github?

Also, I see the instruction about ensuring that there is [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" in .bashrc, but our script from https://s.diaspora.software/1t already put export PATH="$PATH:$HOME/.rvm/bin" isn’t that enough? If not, why don’t we also put this second line in our script?

All our script does, is preventing you to run it as root to prevent you from installing rvm as root (because we had too many issues with people who didn’t read that they shouldn’t do that, so we created a technical solution for the problem) and then it just calls the official rvm installation script, which does everything else you mentioned.

And the line our wiki tells you to make sure is there (which if everything works correctly, the official rvm installation script should already put at all relevant places) is the one, that loads rvm into the shell, so for example it automatically loads the correct ruby-version and gemset when you cd into or out of directories. The second one you mentioned just provides rvm as an executable in your $PATH, so you could use that as a fallback to manually run things with rvm. The rvm installation script places both lines in various places.

Hey, so I am at the step of installing Camo, the webpage is still referencing the NodeJS version, do you want to modify it @denschub ?

Yes, as soon as I have enough time. Probably on the weekend or something.

In case you need help setting it up now, this page has infos on how to get binaries, and links to a systemd-unit file you can use. This page lists available config options. To match the NodeJS version, you need to set the following env vars:

CAMO_KEY=[whatever key you used for the NodeJS version, they're compatible]
CAMO_ALLOW_IMAGE=true
CAMO_ROOT_URL=/camo/
CAMO_THREADS=1

Of course, if you run camo on something that’s not the /camo/ subdirectory, change that. If you run camo on its own subdomain, like camo.diaspora-fr.org (which is actually the recommended setup these days), set CAMO_ROOT_URL=/ instead.

Is there a place where I could check the logs when diaspora* tries to send emails? I put an external smtp e-mail serveur, but that is not working.

log/sidekiq.log

well, interestingly enough this file does not exist. I tried to uncomment the line in diaspora.toml but still the same.

Are your workers even running? What’s the stdout of your worker service?

Yes they are, I am receiving messages from other pods, and the output is showing me the last lines of what would be the logs at that time (if I re-enter the command I have some fresh infos)

systemctl status diaspora-sidekiq.service 
● diaspora-sidekiq.service - Diaspora social network (sidekiq)
     Loaded: loaded (/etc/systemd/system/diaspora-sidekiq.service; enabled; preset: enabled)
     Active: active (running) since Sat 2025-01-25 17:40:19 UTC; 1h 1min ago
   Main PID: 200995 (ruby)
      Tasks: 13 (limit: 38293)
     Memory: 724.2M (peak: 730.9M)
        CPU: 5min 31.998s
     CGroup: /system.slice/diaspora-sidekiq.service
             └─200995 "sidekiq 6.5.12 diaspora [0 of 5 busy]"

Jan 25 18:41:44 diaspora-fr.org bash[200995]: 2025-01-25T18:41:44.826Z pid=200995 tid=apqv class=Workers::ReceiveLocal jid=47d7305533e47dcb690c8a55 elapsed=0.01 INFO: done
Jan 25 18:42:03 diaspora-fr.org bash[200995]: 2025-01-25T18:42:03.723Z pid=200995 tid=apqv class=Workers::Mail::PrivateMessage jid=543fa068a56cd1302a1eaca6 INFO: start
Jan 25 18:42:08 diaspora-fr.org bash[200995]: 2025-01-25T18:42:08.771Z pid=200995 tid=apqv class=Workers::Mail::PrivateMessage jid=543fa068a56cd1302a1eaca6 elapsed=5.048 INFO: fail
Jan 25 18:42:08 diaspora-fr.org bash[200995]: 2025-01-25T18:42:08.771Z pid=200995 tid=apqv WARN: {"context":"Job raised exception","job":{"retry":10,"queue":"low","backtrace":15,"args":[1,1>
Jan 25 18:42:08 diaspora-fr.org bash[200995]: 2025-01-25T18:42:08.771Z pid=200995 tid=apqv WARN: Net::ReadTimeout: Net::ReadTimeout with #<TCPSocket:(closed)> with #<TCPSocket:(closed)>
Jan 25 18:42:08 diaspora-fr.org bash[200995]: 2025-01-25T18:42:08.771Z pid=200995 tid=apqv WARN: app/workers/mail/notifier_base.rb:9:in `perform'
Jan 25 18:42:11 diaspora-fr.org bash[200995]: 2025-01-25T18:42:11.835Z pid=200995 tid=asbf class=Workers::ReceivePublic jid=02a0743a1e11193f5c03d3f9 INFO: start
Jan 25 18:42:11 diaspora-fr.org bash[200995]: 2025-01-25T18:42:11.915Z pid=200995 tid=aroz class=Workers::ReceiveLocal jid=708f36331fb147aade594321 INFO: start
Jan 25 18:42:11 diaspora-fr.org bash[200995]: 2025-01-25T18:42:11.916Z pid=200995 tid=asbf class=Workers::ReceivePublic jid=02a0743a1e11193f5c03d3f9 elapsed=0.082 INFO: done
Jan 25 18:42:11 diaspora-fr.org bash[200995]: 2025-01-25T18:42:11.925Z pid=200995 tid=aroz class=Workers::ReceiveLocal jid=708f36331fb147aade594321 elapsed=0.01 INFO: done

Well, your answer is literally right there. Sidekiq is running into a network timeout trying to connect to your email server.