alexandersobyanin / python.alexandersobyanin.ru

https://python.alexandersobyanin.ru
0 stars 0 forks source link

HTTP 502 after upgrade pythonanywhere.com from Ubuntu 16 earlgrey to Ubuntu 20 haggis #7

Closed b1oki closed 1 year ago

b1oki commented 1 year ago
2023-02-21 09:19:39 *** Starting uWSGI 2.0.20 (64bit) on [Tue Feb 21 09:19:39 2023] ***
2023-02-21 09:19:39 compiled with version: 9.4.0 on 22 July 2022 18:35:26
2023-02-21 09:19:39 os: Linux-5.15.0-1021-aws #25~20.04.1-Ubuntu SMP Thu Sep 22 13:59:08 UTC 2022
2023-02-21 09:19:39 nodename: green-liveweb7
2023-02-21 09:19:39 machine: x86_64
2023-02-21 09:19:39 clock source: unix
2023-02-21 09:19:39 pcre jit disabled
2023-02-21 09:19:39 detected number of CPU cores: 4

2023-02-21 09:19:39 Python version: 3.7.13 (default, Jul 22 2022, 17:01:12)  [GCC 9.4.0]
2023-02-21 09:19:39 Set PythonHome to ~/.virtualenvs/python-env/
2023-02-21 09:19:39 Fatal Python error: 
2023-02-21 09:19:39 initfsencoding
2023-02-21 09:19:39 : 
2023-02-21 09:19:39 Unable to get the locale encoding
2023-02-21 09:19:39 
2023-02-21 09:19:39 ModuleNotFoundError
2023-02-21 09:19:39 : 
2023-02-21 09:19:39 No module named 'encodings'
2023-02-21 09:19:39 
2023-02-21 09:19:39 
2023-02-21 09:19:39 Current thread 0x
2023-02-21 09:19:39 00007f180a801780
2023-02-21 09:19:39  (most recent call first):
2023-02-21 09:19:39 !!! uWSGI process 1 got Segmentation Fault !!!
2023-02-21 09:19:39 *** backtrace of 1 ***#012/usr/local/bin/uwsgi(uwsgi_backtrace+0x2e) [0x5605d7d6b9be]#012/usr/local/bin/uwsgi(uwsgi_segfault+0x27) [0x5605d7d6bda7]#012/lib/x86_64-linux-gnu/libc.so.6(+0x43090) [0x7f180c718090]#012/lib/x86_64-linux-gnu/libc.so.6(abort+0x213) [0x7f180c6f7941]#012/usr/local/lib/libpython3.7m.so.1.0(+0x6d80b) [0x7f180a49280b]#012/usr/local/lib/libpython3.7m.so.1.0(+0x196f53) [0x7f180a5bbf53]#012/usr/local/lib/libpython3.7m.so.1.0(Py_InitializeEx+0xd0) [0x7f180a5bcc90]#012/usr/lib/uwsgi/python37_plugin.so(uwsgi_python_init+0x144) [0x7f180a7840c4]#012/usr/local/bin/uwsgi(uwsgi_start+0x5af) [0x5605d7d6d01f]#012/usr/local/bin/uwsgi(uwsgi_setup+0x127c) [0x5605d7d6f2cc]#012/usr/local/bin/uwsgi(main+0xf) [0x5605d7d1ab3f]#012/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f180c6f9083]#012/usr/local/bin/uwsgi(_start+0x2e) [0x5605d7d1ab7e]#012*** end of backtrace ***
2023-02-21 09:19:39 VACUUM: unix socket /var/sockets/b1oki.pythonanywhere.com/socket removed.
b1oki commented 1 year ago

Обновил Python до 3.10

b1oki.pythonanywhere.com.server.log

2023-05-09 09:29:14 *** Starting uWSGI 2.0.20 (64bit) on [Tue May  9 09:29:13 2023] ***
2023-05-09 09:29:14 compiled with version: 9.4.0 on 22 July 2022 18:35:26
2023-05-09 09:29:14 os: Linux-5.15.0-1021-aws #25~20.04.1-Ubuntu SMP Thu Sep 22 13:59:08 UTC 2022
2023-05-09 09:29:14 nodename: green-liveweb38
2023-05-09 09:29:14 machine: x86_64
2023-05-09 09:29:14 clock source: unix
2023-05-09 09:29:14 pcre jit disabled
2023-05-09 09:29:14 detected number of CPU cores: 4
2023-05-09 09:29:14 current working directory: /home/b1oki
2023-05-09 09:29:14 detected binary path: /usr/local/bin/uwsgi
2023-05-09 09:29:14 *** dumping internal routing table ***
2023-05-09 09:29:14 [rule: 0] subject: path_info regexp: \.svgz$ action: addheader:Content-Encoding:gzip
2023-05-09 09:29:14 *** end of the internal routing table ***
2023-05-09 09:29:14 chdir() to /home/b1oki/
2023-05-09 09:29:14 your processes number limit is 128
2023-05-09 09:29:14 your memory page size is 4096 bytes
2023-05-09 09:29:14 detected max file descriptor number: 123456
2023-05-09 09:29:14 building mime-types dictionary from file /etc/mime.types...
2023-05-09 09:29:14 567 entry found
2023-05-09 09:29:14 lock engine: pthread robust mutexes
2023-05-09 09:29:14 thunder lock: disabled (you can enable it with --thunder-lock)
2023-05-09 09:29:14 uwsgi socket 0 bound to UNIX address /var/sockets/b1oki.pythonanywhere.com/socket fd 3
2023-05-09 09:29:14 Python version: 3.10.5 (main, Jul 22 2022, 17:09:35) [GCC 9.4.0]
2023-05-09 09:29:14 PEP 405 virtualenv detected: /home/b1oki/.virtualenvs/myvirtualenv/
2023-05-09 09:29:14 Set PythonHome to /home/b1oki/.virtualenvs/myvirtualenv/
2023-05-09 09:29:14 *** Python threads support is disabled. You can enable it with --enable-threads ***
2023-05-09 09:29:14 Python main interpreter initialized at 0x558d460cae40
2023-05-09 09:29:14 your server socket listen backlog is limited to 100 connections
2023-05-09 09:29:14 your mercy for graceful operations on workers is 60 seconds
2023-05-09 09:29:14 setting request body buffering size to 65536 bytes
2023-05-09 09:29:14 mapped 334256 bytes (326 KB) for 1 cores
2023-05-09 09:29:14 *** Operational MODE: single process ***
2023-05-09 09:29:14 initialized 38 metrics
2023-05-09 09:29:14 WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x558d460cae40 pid: 1 (default app)
2023-05-09 09:29:14 *** uWSGI is running in multiple interpreter mode ***
2023-05-09 09:29:14 gracefully (RE)spawned uWSGI master process (pid: 1)
2023-05-09 09:29:14 spawned uWSGI worker 1 (pid: 2, cores: 1)
2023-05-09 09:29:14 metrics collector thread started
2023-05-09 09:29:14 spawned 2 offload threads for uWSGI worker 1
2023-05-09 09:29:21 announcing my loyalty to the Emperor...

b1oki.pythonanywhere.com.error.log

2023-05-09 09:31:34,422: Error running WSGI application
2023-05-09 09:31:34,422: ModuleNotFoundError: No module named 'dotenv'
2023-05-09 09:31:34,423:   File "/var/www/b1oki_pythonanywhere_com_wsgi.py", line 10, in <module>
2023-05-09 09:31:34,423:     from dotenv import load_dotenv
2023-05-09 09:31:34,423: ***************************************************
2023-05-09 09:31:34,423: If you're seeing an import error and don't know why,
2023-05-09 09:31:34,423: we have a dedicated help page to help you debug: 
2023-05-09 09:31:34,424: https://help.pythonanywhere.com/pages/DebuggingImportError/
2023-05-09 09:31:34,424: ***************************************************
2023-05-09 09:31:35,202: Error running WSGI application
2023-05-09 09:31:35,203: ModuleNotFoundError: No module named 'dotenv'
2023-05-09 09:31:35,203:   File "/var/www/b1oki_pythonanywhere_com_wsgi.py", line 10, in <module>
2023-05-09 09:31:35,203:     from dotenv import load_dotenv
2023-05-09 09:31:35,203: ***************************************************
2023-05-09 09:31:35,204: If you're seeing an import error and don't know why,
2023-05-09 09:31:35,204: we have a dedicated help page to help you debug: 
2023-05-09 09:31:35,204: https://help.pythonanywhere.com/pages/DebuggingImportError/
2023-05-09 09:31:35,204: ***************************************************
b1oki commented 1 year ago
workon myvirtualenv
cd ~/mysite/
pip install -r requirements.txt

Now works.

b1oki commented 1 year ago

works