Re: [NEMO] Issues updating python

52 views
Skip to first unread message

Rampant, Mathieu A. (Ctr)

unread,
Jul 21, 2023, 7:31:58 PM7/21/23
to Sergi Lendínez, nemo

Hi Sergi,

I would try the following:

  1. Install python 3.8 separately (so you have both python 3.7 and python 3.8 in separate folders)
  2. Make sure everything still works with python 3.7 and NEMO is up and running.
  3. Use the new python3.8 command (python3.8 -m pip install NEMO==4.3.2 gunicorn==<?>) to install the same version of nemo you have and same version of gunicorn (not sure which one you have)
  4. Again, make sure everything still works with python3.7 and NEMO is still up and running.
  5. Shutdown NEMO (gunicorn) and nginx. Double check that it’s not accessible anymore and that port 8000 is not in use anymore.
  6. Switch your NEMO systemd service to point to the new python3.8 folder for gunicorn
  7. Start the NEMO service, then start the Nginx service.
  8. Check if everything is good.
  9. Then proceed to update the version of NEMO, adding necessary changes to settings.py, new service files etc.

 

A few key points to look for:

  • Gunicorn, make sure your NEMO service points to the correct python version of gunicorn (3.8) after switching.
  • Nginx really shouldn’t change at all.
  • Check NEMO’s logs to make sure it’s actually running and no errors were thrown (and gunicorn is running properly as well).
  • Restart Nginx after NEMO (sometimes Nginx can get hung up if NEMO was not accessible when Nginx was started, although I think it mostly happens with docker)

 

Or you can also switch to docker and all the problems go away 😉

 

Good luck!

--

Mathieu Rampant

Contractor – National Institute of Standards and Technology

Prometheus Computing, LLC

Tel: 240-813-0628

Alt email: m.ra...@prometheuscomputing.com

signature_2589496270 Chat with me on Teams!

 

From: ne...@list.nist.gov <ne...@list.nist.gov> on behalf of Sergi Lendínez <sergi...@gmail.com>
Date: Friday, July 21, 2023 at 6:44 PM
To: nemo <ne...@list.nist.gov>
Subject: [NEMO] Issues updating python

Dear all,

 

I have tried upgrading to python 3.8 (we are currently still running nemo 4.3.2 on python 3.7) but I have encountered some issues. The python upgrade and the nemo package installation seem to run smoothly. However, once I restart nginx and nemo, I get the  "502 Bad Gateway" message on nginx. The last entry on the error log is:

 

2023/06/19 14:43:00 [error] 2526#0: *85 connect() failed (111: Connection refused) while connecting to upstream, client: 199.190.250.14, server: nemo.che.lsu.edu, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "nemo.che.lsu.edu"

 

but I'm not sure what the error is.

 

If I downgrade to the version of nemo that we are using now (4.3.2), I still get the "502 Bad Gateway" message, so I have to restore the system from a backup image.

 

Has anyone experienced something similar, or have an idea on what the issue is?

 

Thanks,

Sergi

--
You received this message because you are subscribed to the Google Groups "nemo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nemo+uns...@list.nist.gov.
To view this discussion on the web visit https://groups.google.com/a/list.nist.gov/d/msgid/nemo/a39950ca-93fd-432e-8168-da3d1294bfecn%40list.nist.gov.

Reply all
Reply to author
Forward
0 new messages