[SOLVED] Cle-start ECONNREFUSED error


#1

I have installed the installation guide, built and reconfigured the platform without error and get OK when I run cle-nginx but when running cle-start i get the following error.
2022-11-14 17:00:57 GMT Failed to execute request http://localhost:8080/simulation. ERROR: Error: Error: connect ECONNREFUSED 127.0.0.1:8080
2022-11-14 17:01:02 GMT Failed to execute request http://localhost:8080/health/errors. ERROR: Error: Error: connect ECONNREFUSED 127.0.0.1:8080
I have read from the troubleshooting section that this is because “Nginx is not running or not running correctly.” so have checked the status of nginx using ‘service nginx status’ which shows it is inactive and has been since step 7.4 of the installation guide. Something of note is that after sourcing my .bashrc, echo $PYTHONPATH returns
/home/gsm517/Documents/NRP/GazeboRosPackages/devel/lib/python3/dist-packages:/opt/ros/noetic/lib/python3/dist-packages:/home/gsm517/Documents/NRP/GazeboRosPackages/devel/lib/python3.8/dist-packages:/home/gsm517/Documents/NRP/CLE/hbp_nrp_cle:/home/gsm517/Documents/NRP/ExperimentControl/hbp_nrp_excontrol:/home/gsm517/Documents/NRP/ExDBackend/hbp_nrp_backend:/home/gsm517/Documents/NRP/ExDBackend/hbp_nrp_cleserver:/home/gsm517/Documents/NRP/ExDBackend/hbp_nrp_commons:/home/gsm517/Documents/NRP/ExDBackend/hbp_nrp_watchdog:/home/gsm517/Documents/NRP/ExDBackend/hbp-flask-restful-swagger-master:/home/gsm517/Documents/NRP/VirtualCoach/hbp_nrp_virtual_coach:/home/gsm517/Documents/NRP/BrainSimulation/hbp_nrp_distributed_nest:/home/gsm517/.local/lib/python3.8/site-packages:/home/gsm517/.local/lib/x86_64-linux-gnu/python3.8/site-packages
so I read this thread but didn’t find any problems. ‘netstat -tulnp | grep 8080’ doesn’t show any processes running on port 8080 so am not sure what could be stopping nginx from starting while still allowing cle-nginx to return OK. Any help is much appreciated.


#2

Hi,
The NRP adds items to your PYTHONPATH indeed. But this should be unrelated to nginx not starting.
Did you try to start nginx by hand?

    /usr/sbin/nginx -c /home/bbpnrsoa/.local/etc/nginx/nginx.conf 

and watch for the console output and/or logs.


#3

Hi,
Could you please attach here the log at $HOME/nginx/error.log


#4

When running nginx by hand I am given the following error.
nginx: [alert] could not open error log file: open() “/var/log/nginx/error.log” failed (13: Permission denied)
2022/11/22 08:38:15 [emerg] 325204#325204: open() “/home/bbpnrsoa/.local/etc/nginx/nginx.conf” failed (2: No such file or directory)
My error log is empty although this is probably due to the above errors.
I have removed the first, permission denied error by changing ownership of the file to my user but still get:
2022/11/22 08:38:15 [emerg] 325204#325204: open() “/home/bbpnrsoa/.local/etc/nginx/nginx.conf” failed (2: No such file or directory)


#5

Your user name is gsm517, so you should replace bbpnrsoa in the nginx command with it:

    /usr/sbin/nginx -c /home/gsm517/.local/etc/nginx/nginx.conf

Does this now open and give you logs?


#6

running
/usr/sbin/nginx -c /home/gregor/.local/etc/nginx/nginx.conf
prints
nginx: [alert] could not open error log file: open() “/var/log/nginx/error.log” failed (13: Permission denied)
2022/11/29 15:16:35 [warn] 247849#247849: the “user” directive makes sense only if the master process runs with super-user privileges, ignored in /home/gregor/.local/etc/nginx/nginx.conf:1
in the terminal and leaves the error log empty.
Note: I reinstalled my os under a new username hence replacing gsm517


#7

Really not sure what is going on on your end. If you couldn’t solve the problem, I suggest we have a first level glance at your system online. Can you open a neurorobotics ticket at https://support.humanbrainproject.eu/ and give your email address therein so we can send you an invite?


#8

The new component haproxy was missing in the installation because of the install doc not yet having been updated. This is fixed now. Thanks Gregor for reporting and for your patience.