Trouble setting up a new environment

Hello, I feel newbish asking that but I freshly installed an Ubuntu 21.10 and installed the diaspora* dev en as usual, but I’m not able to access it at http://localhost:3000

diaspora* is launching normally, I set instead of the unix socket in diaspora.toml, I even tried to force the port:

PORT=3000 script/server
Starting Diaspora in development mode on port 3000 with job processing inside the request cycle.

But when I access it with Firefox, it is unreachable.
In diaspora.toml I set a name for the pod, also uncommented the certificate for Ubuntu, set SSL to false, tried with and without single process mode…

If I run netstat -p I see nothing on the port 3000. Any idea?
I’m running Ruby 2.7, but that’s what I’m also doing on my other computer and it is working fine.

Port 3000 should be the default for development, so you shouldn’t need to change your diaspora.toml and you shouldn’t need to set any env vars. If you just run script/server it should launch on port 3000. Did you try without setting anything? Otherwise I have no idea why it isn’t working, I never had these problems before.

I revert diaspora.toml to exactly diaspora.toml.example and launched again, with the same result:

/diaspora/diaspora$ script/server
Starting Diaspora in development mode with job processing inside the request cycle.

I, [2021-10-27T14:26:35.267279 #40584]  INFO -- : [diaspora:__default__] call: 
I, [2021-10-27T14:26:35.267341 #40584]  INFO -- : [diaspora:__default__] schedule :monitor (load by user)
I, [2021-10-27T14:26:35.267465 #40584]  INFO -- : [diaspora:__default__] => monitor  (load by user)
I, [2021-10-27T14:26:35.267512 #40584]  INFO -- : [diaspora:__default__] starting async with 0.2s chain monitor 
I, [2021-10-27T14:26:35.267753 #40584]  INFO -- : [Eye] <= loading: ["/home/andupara/diaspora/diaspora/config/eye.rb"]
I, [2021-10-27T14:26:35.283356 #40584]  INFO -- : [Eye] <= command: load /home/andupara/diaspora/diaspora/config/eye.rb (0.461499501s)
I, [2021-10-27T14:26:35.283549 #40584]  INFO -- : [diaspora:web] schedule :monitor (monitor by user)
I, [2021-10-27T14:26:35.283668 #40584]  INFO -- : [diaspora:web] => monitor  (monitor by user)
I, [2021-10-27T14:26:35.284381 #40584]  INFO -- : [diaspora:web] load_external_pid_file: pid_file found, but process <40447> not found
I, [2021-10-27T14:26:35.284794 #40584]  INFO -- : [diaspora:web] switch :starting [:unmonitored => :starting] monitor by user
I, [2021-10-27T14:26:35.285095 #40584]  INFO -- : [diaspora:__default__] <= monitor
I, [2021-10-27T14:26:35.285763 #40584]  INFO -- : [diaspora:web] daemonizing: `bin/bundle exec unicorn -c config/unicorn.rb` with start_grace: 2.5s, env: 'RAILS_ENV=development PORT=', <40627> (in /home/andupara/diaspora/diaspora)
I, [2021-10-27T14:26:35.285794 #40584]  INFO -- : [diaspora:web] sleeping for :start_grace 2.5
I, [2021-10-27T14:26:37.786981 #40584]  INFO -- : [diaspora:web] switch :started [:starting => :up] monitor by user
I, [2021-10-27T14:26:37.806873 #40584]  INFO -- : [diaspora:web] <= monitor
wget localhost:3000
--2021-10-27 14:29:55--  http://localhost:3000/
Résolution de localhost (localhost)…
Connexion à localhost (localhost)||:3000… échec : Connexion refusée.
$ sudo netstat -p | grep 3000

That’s really weird …

But netstat -p is not what you want, you need -l, so netstat -nlp | grep unicorn and that should then show you something like this:

tcp        0      0  *               LISTEN      2057519/unicorn mas

What if you run bin/bundle exec unicorn -c config/unicorn.rb manually? It should also print something like: I, [2021-10-27T20:55:07.199981 #2255185] INFO -- : listening on addr= fd=16 then (or check in log/eye_processes_stderr.log if you run through script/server)

Running script/server, your netstat grep doesn’t return anything.
Running unicorn manually with your command works! So there is something wrong in script/server.

Strange … when you start it through script/server, does log/eye_processes_stderr.log say something where it listens? Does the socket exist?

Does bin/bundle exec ruby ./script/get_config.rb server.rails_environment say development?

Sorry I forgot to say this, but eye err log is here but empty, same for development.log it contains my successful attempt while launching unicorn directly. And yes your command returns development, that’s also what is saying script/server when I’m running it.

So do you maybe have a problem with eye then? If the stderr log is empty, does it even start unicorn properly? What happens when you try to run eye manually?

bin/bundle exec loader_eye --stop_all -c config/eye.rb

This has the same result than script/server and the eye log still is empty. I’m wondering if I have a too recent lib, or something not installed… But there are many different packages between 20.04 and 21.10, I’m not going to bisect this.
Is there a way to make eye more verbose?

So right now I’m developing launching unicorn directly as you show above.
Btw I also encountered a trigger deletion problem when running rspec and trying to generate fixtures for jasmine and I had to grant SuperUser right to my diaspora postgresql user. I didn’t remember doing this before…

This is normal and was always (or at least since a long time of many years) the case when using postgres and development.

Hm, okay, maybe I was using mysql locally :wink:
But this is not indicated in the wiki if I’m not wrong.

For the records: on my newly setup linux mint has the same problem.


If starting this it restarts every 2 seconds. Running with rails s works.
BTW Firefox then redirects requests to https://locahost instead of http://localhost:3000. (https enforcement is turned off)

My solution: rails s with chromium.