[GeoNode-devel] GeoNode 3.x Advanced Installation and uwsgi issue

Alessio Fabiani alessio.fabiani at geo-solutions.it
Thu Nov 5 10:50:30 PST 2020


Hi Paolo,
just a double check, make sure that those are correctly set

chdir = <path_of_geonode_code (where you cloned the repo)>
virtualenv = <path_of_the_virtualenv>

if still not working, try to add also the wsgi directive

wsgi-file = <path_of_geonode_code (where you cloned the
repo)>/geonode/wsgi.py

e.g.:

...
plugin-dir = /usr/lib/uwsgi/plugins
plugin = python3
virtualenv = /home/geosolutions/Envs/geonode3
chdir = /home/geosolutions/geonode/
module = geonode.wsgi:application
wsgi-file = /home/geosolutions/geonode/geonode/wsgi.py
...


Il giorno gio 5 nov 2020 alle ore 19:38 Paolo Pasquali <
paolo.pasquali at gmail.com> ha scritto:

> Ciao Alessio,
>
> I'm using the virtualenv.
> As you suggested I added the plugins-dir so now I have in the uwsgi conf:
>
> plugins-dir = /usr/lib/uwsgi/plugins
>
> plugins = python3
>
>
> Now I'm not getting the no app loaded error anymore but yet the uwsgi
> fails to start.
>
>
> Nothing from this:
>
> $ uwsgi -c /etc/uwsgi/apps-available/geonode.ini
>
> [uWSGI] getting INI configuration from
> /etc/uwsgi/apps-available/geonode.ini
>
>
> You can find the uwsgi log below. Sorry for the spam.
>
>
> Thanks for your help.
>
>
>
> P.
>
>
>
>
> Thu Nov  5 19:18:40 2020 - *** Starting uWSGI 2.0.18-debian (64bit) on
> [Thu Nov  5 19:18:40 2020] ***
>
> Thu Nov  5 19:18:40 2020 - compiled with version: 10.0.1 20200405
> (experimental) [master revision
> 0be9efad938:fcb98e4978a:705510a708d3642c9c962beb663c476167e4e8a4] on 11
> April 2020 11:15:55
>
> Thu Nov  5 19:18:40 2020 - os: Linux-5.4.0-52-generic #57-Ubuntu SMP Thu
> Oct 15 10:57:00 UTC 2020
>
> Thu Nov  5 19:18:40 2020 - nodename: sdg11lab
>
> Thu Nov  5 19:18:40 2020 - machine: x86_64
>
> Thu Nov  5 19:18:40 2020 - clock source: unix
>
> Thu Nov  5 19:18:40 2020 - pcre jit disabled
>
> Thu Nov  5 19:18:40 2020 - detected number of CPU cores: 2
>
> Thu Nov  5 19:18:40 2020 - current working directory: /
>
> Thu Nov  5 19:18:40 2020 - writing pidfile to /tmp/geonode.pid
>
> Thu Nov  5 19:18:40 2020 - detected binary path: /usr/bin/uwsgi-core
>
> Thu Nov  5 19:18:40 2020 - chdir() to /opt/sdg11lab/sdg11lab
>
> Thu Nov  5 19:18:40 2020 - your processes number limit is 63713
>
> Thu Nov  5 19:18:40 2020 - your memory page size is 4096 bytes
>
> Thu Nov  5 19:18:40 2020 -  *** WARNING: you have enabled harakiri without
> post buffering. Slow upload could be rejected on post-unbuffered
> webservers ***
>
> Thu Nov  5 19:18:40 2020 - detected max file descriptor number: 1024
>
> Thu Nov  5 19:18:40 2020 - lock engine: pthread robust mutexes
>
> Thu Nov  5 19:18:40 2020 - thunder lock: disabled (you can enable it with
> --thunder-lock)
>
> Thu Nov  5 19:18:40 2020 - uwsgi socket 0 bound to UNIX address
> /run/uwsgi/app/geonode/socket fd 3
>
> Thu Nov  5 19:18:40 2020 - uwsgi socket 1 bound to TCP address
> 0.0.0.0:8000 fd 5
>
> Thu Nov  5 19:18:40 2020 - setgid() to 33
>
> Thu Nov  5 19:18:40 2020 - setuid() to 33
>
> Thu Nov  5 19:18:40 2020 - Python version: 3.8.5 (default, Jul 28 2020,
> 12:59:40)  [GCC 9.3.0]
>
> Thu Nov  5 19:18:40 2020 - PEP 405 virtualenv detected:
> /home/geonode/.virtualenvs/geonode
>
> Thu Nov  5 19:18:40 2020 - Set PythonHome to
> /home/geonode/.virtualenvs/geonode
>
> Thu Nov  5 19:18:40 2020 - Python main interpreter initialized at
> 0x562215bceb80
>
> Thu Nov  5 19:18:40 2020 - python threads support enabled
>
> Thu Nov  5 19:18:40 2020 - your server socket listen backlog is limited to
> 100 connections
>
> Thu Nov  5 19:18:40 2020 - your mercy for graceful operations on workers
> is 60 seconds
>
> Thu Nov  5 19:18:40 2020 - mapped 13105368 bytes (12798 KB) for 128 cores
>
> Thu Nov  5 19:18:40 2020 - *** Operational MODE: preforking ***
>
> Thu Nov  5 18:18:43 2020 - WSGI app 0 (mountpoint='') ready in 3 seconds
> on interpreter 0x562215bceb80 pid: 256154 (default app)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI master process (pid: 256154)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI worker 1 (pid: 256273, cores: 1)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI worker 2 (pid: 256274, cores: 1)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI worker 3 (pid: 256275, cores: 1)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI worker 4 (pid: 256276, cores: 1)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI worker 5 (pid: 256277, cores: 1)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI worker 6 (pid: 256278, cores: 1)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI worker 7 (pid: 256279, cores: 1)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI worker 8 (pid: 256280, cores: 1)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI worker 9 (pid: 256281, cores: 1)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI worker 10 (pid: 256282, cores: 1)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI worker 11 (pid: 256283, cores: 1)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI worker 12 (pid: 256284, cores: 1)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI worker 13 (pid: 256285, cores: 1)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI worker 14 (pid: 256286, cores: 1)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI worker 15 (pid: 256287, cores: 1)
>
> Thu Nov  5 18:18:43 2020 - spawned uWSGI worker 16 (pid: 256288, cores: 1)
>
> Thu Nov  5 18:18:43 2020 - unable to find requested cheaper algorithm,
> falling back to spare
>
> Thu Nov  5 18:18:45 2020 - worker 1 killed successfully (pid: 256273)
>
> Thu Nov  5 18:18:45 2020 - uWSGI worker 1 cheaped.
>
> Thu Nov  5 18:18:46 2020 - worker 2 killed successfully (pid: 256274)
>
> Thu Nov  5 18:18:46 2020 - uWSGI worker 2 cheaped.
>
> Thu Nov  5 18:18:47 2020 - worker 3 killed successfully (pid: 256275)
>
> Thu Nov  5 18:18:47 2020 - uWSGI worker 3 cheaped.
>
> Thu Nov  5 18:18:48 2020 - worker 4 killed successfully (pid: 256276)
>
> Thu Nov  5 18:18:48 2020 - uWSGI worker 4 cheaped.
>
> Thu Nov  5 18:18:49 2020 - worker 5 killed successfully (pid: 256277)
>
> Thu Nov  5 18:18:49 2020 - uWSGI worker 5 cheaped.
>
> Thu Nov  5 18:18:50 2020 - worker 6 killed successfully (pid: 256278)
>
> Thu Nov  5 18:18:50 2020 - uWSGI worker 6 cheaped.
>
> Thu Nov  5 18:18:51 2020 - worker 7 killed successfully (pid: 256279)
>
> Thu Nov  5 18:18:51 2020 - uWSGI worker 7 cheaped.
>
> Thu Nov  5 18:18:52 2020 - worker 8 killed successfully (pid: 256280)
>
> Thu Nov  5 18:18:52 2020 - uWSGI worker 8 cheaped.
>
>
> On Thu, Nov 5, 2020 at 7:12 PM Alessio Fabiani <
> alessio.fabiani at geo-solutions.it> wrote:
>
>> It is also worth to take a look at this
>> https://stackoverflow.com/questions/41535283/unable-to-load-uwsgi-plugin-python3-plugin-so-cannot-open-shared-object-file
>>
>> it seems that someone solved the issue by adding a "plugins-dir"
>> directive to the conf.
>>
>> Il giorno gio 5 nov 2020 alle ore 19:09 Alessio Fabiani <
>> alessio.fabiani at geo-solutions.it> ha scritto:
>>
>>> Paolo,
>>> it looks like you are not using the correct python environment.
>>>
>>> I guess you need to activate it before running UWSGI.
>>>
>>> Il giorno gio 5 nov 2020 alle ore 18:26 Paolo Pasquali <
>>> paolo.pasquali at gmail.com> ha scritto:
>>>
>>>> Thank you, Alessio.
>>>>
>>>> I get this error.
>>>>
>>>> $ uwsgi -c /etc/uwsgi/apps-available/geonode.ini
>>>>
>>>> [uWSGI] getting INI configuration from
>>>> /etc/uwsgi/apps-available/geonode.ini
>>>>
>>>> open("./python3_plugin.so"): No such file or directory [core/utils.c
>>>> line 3732]
>>>>
>>>> !!! UNABLE to load uWSGI plugin: ./python3_plugin.so: cannot open
>>>> shared object file: No such file or directory !!!
>>>>
>>>>
>>>> The plugin is located at
>>>>
>>>>
>>>> $ locate python3_plugin.so
>>>>
>>>> /usr/lib/uwsgi/plugins/python3_plugin.so
>>>>
>>>>
>>>> So if I remove from the geonode.ini file plugins = python3
>>>>
>>>>
>>>> $ uwsgi -c /etc/uwsgi/apps-available/geonode.ini
>>>>
>>>> [uWSGI] getting INI configuration from
>>>> /etc/uwsgi/apps-available/geonode.ini
>>>>
>>>>
>>>> And then I still get
>>>>
>>>>
>>>> $ sudo service uwsgi start
>>>>
>>>> Job for uwsgi.service failed because the control process exited with
>>>> error code.
>>>>
>>>>
>>>> Maybe because from the log
>>>>
>>>> Thu Nov  5 17:47:50 2020 - *** Operational MODE: preforking ***
>>>>
>>>> Thu Nov  5 17:47:50 2020 - *** no app loaded. GAME OVER ***
>>>>
>>>> Thu Nov  5 17:47:50 2020 - VACUUM: unix socket
>>>> /run/uwsgi/app/geonode/socket removed.
>>>>
>>>>
>>>>
>>>> Any hint or cue on this?
>>>>
>>>>
>>>> Thanks!
>>>>
>>>>
>>>>
>>>> Paolo
>>>>
>>>>
>>>>
>>>> On Thu, Nov 5, 2020 at 3:01 PM Alessio Fabiani <
>>>> alessio.fabiani at geo-solutions.it> wrote:
>>>>
>>>>> Hi Paolo,
>>>>> from the logs I cannot recognize any specific issue.
>>>>>
>>>>> It might depend on some error during the application initialization.
>>>>>
>>>>> You could do a simple test by trying to run uwsgi from the
>>>>> command line, e.g.:
>>>>>
>>>>> uwsgi -c <path to the uwsgi config ini>
>>>>>
>>>>>
>>>>>
>>>>> Il giorno gio 5 nov 2020 alle ore 10:44 Paolo Pasquali <
>>>>> paolo.pasquali at gmail.com> ha scritto:
>>>>>
>>>>>> Dear devs,
>>>>>>
>>>>>> I'm following the 3.x documentation for installing GeoNode on Ubuntu
>>>>>> 20 without docker.
>>>>>> At some point I have to create the uwsgi geonode.ini [1] file.
>>>>>>
>>>>>> I have updated the paths in the geonode.ini file according to my
>>>>>> installation and the first thing I have noticed is that I need to add
>>>>>> uid = geonode
>>>>>> or I get a permission denied error when I try to start the service.
>>>>>> That was omitted in the 3.x doc.
>>>>>>
>>>>>> Then I get another error.
>>>>>>
>>>>>> $ sudo service uwsgi start
>>>>>>
>>>>>> Job for uwsgi.service failed because the control process exited with
>>>>>> error code.
>>>>>>
>>>>>> See "systemctl status uwsgi.service" and "journalctl -xe" for details.
>>>>>>
>>>>>>
>>>>>> $ systemctl status uwsgi.service
>>>>>>
>>>>>> *●* uwsgi.service - LSB: Start/stop uWSGI server instance(s)
>>>>>>
>>>>>>      Loaded: loaded (/etc/init.d/uwsgi; generated)
>>>>>>
>>>>>>      Active: *failed* (Result: exit-code) since Thu 2020-11-05
>>>>>> 10:02:52 CET; 14s ago
>>>>>>
>>>>>>        Docs: man:systemd-sysv-generator(8)
>>>>>>
>>>>>>     Process: 208347 ExecStart=/etc/init.d/uwsgi start *(code=exited,
>>>>>> status=1/FAILURE)*
>>>>>>
>>>>>>       Tasks: 9 (limit: 19114)
>>>>>>
>>>>>>
>>>>>> Some uwgi processes are active anyway.
>>>>>> I'm attaching the log file. Could you please help me understand the
>>>>>> error I'm getting?
>>>>>> I can see an "unable to find requested cheaper algorithm, falling
>>>>>> back to spare" which is new from 2.10.
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>>
>>>>>> Paolo
>>>>>>
>>>>>>
>>>>>> [1]
>>>>>> https://docs.geonode.org/en/3.x/install/advanced/core/index.html#serving-geonode-geoserver-via-nginx
>>>>>>
>>>>>> _______________________________________________
>>>>>> geonode-devel mailing list
>>>>>> geonode-devel at lists.osgeo.org
>>>>>> https://lists.osgeo.org/mailman/listinfo/geonode-devel
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> ==
>>>>>
>>>>> GeoServer Professional Services from the experts! Visit
>>>>> http://goo.gl/it488V for more information.
>>>>> ==
>>>>> Ing. Alessio Fabiani
>>>>>
>>>>> @alfa7691
>>>>> Founder/Technical Lead
>>>>>
>>>>>
>>>>> GeoSolutions S.A.S.
>>>>> Via di Montramito 3/A - 55054  Massarosa (LU) - Italy
>>>>> phone: +39 0584 962313
>>>>> fax:     +39 0584 1660272
>>>>> mob:   +39 331 6233686
>>>>>
>>>>>
>>>>> http://www.geo-solutions.it
>>>>> http://twitter.com/geosolutions_it
>>>>> -------------------------------------------------------
>>>>>
>>>>> Con riferimento alla normativa sul trattamento dei dati personali
>>>>> (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”),
>>>>> si precisa che ogni circostanza inerente alla presente email (il suo
>>>>> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
>>>>> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
>>>>> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
>>>>> operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
>>>>>
>>>>>
>>>>> This email is intended only for the person or entity to which it is
>>>>> addressed and may contain information that is privileged, confidential or
>>>>> otherwise protected from disclosure. We remind that - as provided by
>>>>> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
>>>>> e-mail or the information herein by anyone other than the intended
>>>>> recipient is prohibited. If you have received this email by mistake, please
>>>>> notify us immediately by telephone or e-mail.
>>>>>
>>>>
>>>
>>> --
>>>
>>> ==
>>>
>>> GeoServer Professional Services from the experts! Visit
>>> http://goo.gl/it488V for more information.
>>> ==
>>> Ing. Alessio Fabiani
>>>
>>> @alfa7691
>>> Founder/Technical Lead
>>>
>>>
>>> GeoSolutions S.A.S.
>>> Via di Montramito 3/A - 55054  Massarosa (LU) - Italy
>>> phone: +39 0584 962313
>>> fax:     +39 0584 1660272
>>> mob:   +39 331 6233686
>>>
>>>
>>> http://www.geo-solutions.it
>>> http://twitter.com/geosolutions_it
>>> -------------------------------------------------------
>>>
>>> Con riferimento alla normativa sul trattamento dei dati personali (Reg.
>>> UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
>>> precisa che ogni circostanza inerente alla presente email (il suo
>>> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
>>> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
>>> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
>>> operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
>>>
>>>
>>> This email is intended only for the person or entity to which it is
>>> addressed and may contain information that is privileged, confidential or
>>> otherwise protected from disclosure. We remind that - as provided by
>>> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
>>> e-mail or the information herein by anyone other than the intended
>>> recipient is prohibited. If you have received this email by mistake, please
>>> notify us immediately by telephone or e-mail.
>>>
>>
>>
>> --
>>
>> ==
>>
>> GeoServer Professional Services from the experts! Visit
>> http://goo.gl/it488V for more information.
>> ==
>> Ing. Alessio Fabiani
>>
>> @alfa7691
>> Founder/Technical Lead
>>
>>
>> GeoSolutions S.A.S.
>> Via di Montramito 3/A - 55054  Massarosa (LU) - Italy
>> phone: +39 0584 962313
>> fax:     +39 0584 1660272
>> mob:   +39 331 6233686
>>
>>
>> http://www.geo-solutions.it
>> http://twitter.com/geosolutions_it
>> -------------------------------------------------------
>>
>> Con riferimento alla normativa sul trattamento dei dati personali (Reg.
>> UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
>> precisa che ogni circostanza inerente alla presente email (il suo
>> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
>> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
>> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
>> operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
>>
>>
>> This email is intended only for the person or entity to which it is
>> addressed and may contain information that is privileged, confidential or
>> otherwise protected from disclosure. We remind that - as provided by
>> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
>> e-mail or the information herein by anyone other than the intended
>> recipient is prohibited. If you have received this email by mistake, please
>> notify us immediately by telephone or e-mail.
>>
>

-- 

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==
Ing. Alessio Fabiani

@alfa7691
Founder/Technical Lead


GeoSolutions S.A.S.
Via di Montramito 3/A - 55054  Massarosa (LU) - Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39 331 6233686


http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------

Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
precisa che ogni circostanza inerente alla presente email (il suo
contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
operazione è illecita. Le sarei comunque grato se potesse darmene notizia.


This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential or
otherwise protected from disclosure. We remind that - as provided by
European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
e-mail or the information herein by anyone other than the intended
recipient is prohibited. If you have received this email by mistake, please
notify us immediately by telephone or e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20201105/bd188c88/attachment-0001.html>


More information about the geonode-devel mailing list