[GeoNode-users] GeoNode-Project Installation

Julierme Pinheiro juliermeopensourcedeveloper at gmail.com
Wed Nov 21 12:50:50 PST 2018


Checking the docker-compose logs -f, the response was:

django4my_geonode |   File
"/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 364, in execute_from_command_line
celery4my_geonode |     SITEURL = os.getenv('SITEURL', "http://%s:%s/" %
(SITE_HOST_NAME, SITE_HOST_PORT))
celery4my_geonode | NameError: name 'SITE_HOST_NAME' is not defined

This error shows up only when I am using
os.environ.setdefault("DJANGO_SETTINGS_MODULE",
"my_geonode.local_settings"). Also, I want to add that I changed the
docker-compose.override.yml by replacing localhost to 172.21.14.45.

It is weird, because this issue does not occur by setting wsgi.py as
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_geonode.settings").

I tested GeoNode-Project at 2.8 nad GeoNode-Project at master and the response
are the same.

I tried looking for the wsgi logs, but I could not find them.

I appreciated your time


Julierme

On Wed, Nov 21, 2018 at 6:18 PM Paolo Corti <pcorti at gmail.com> wrote:

> 502 status error means that there is something which caused your wsgi
> process fail to start. You will find the reason checking the wsgi
> logs.
> hope this helps
> best
> Paolo
> On Wed, Nov 21, 2018 at 1:23 PM Julierme Pinheiro
> <juliermeopensourcedeveloper at gmail.com> wrote:
> >
> > Dear Paolo Corti,
> >
> > Thank you very much for your reply.
> >
> > Yes I can connect to database:
> > psql -h 172.21.14.45 -U geonode -d geonode
> > psql (10.6 (Ubuntu 10.6-0ubuntu0.18.04.1), server 9.5.14)
> > Type "help" for help.
> >
> > geonode=> \q
> >
> > Now. I want to skip the remote database connection for GeoNode-Project
> installed via Docker as I am using the
> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_geonode.settings") in
> wsgi.py file. By just using db4my_geonode and
> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_geonode.settings"),
> GeoNode-Project at 2.8 installation goes fine until the end. Now, here is
> the issue: if I make local_settings.py available in my_geonode/my_geonode/
> and set wsgi.py as os.environ.setdefault("DJANGO_SETTINGS_MODULE",
> "my_geonode.local_settings"), I get the forever response:
> >
> > 502 Bad Gateway
> >
> > I appreciated your time
> >
> > Julierme
> >
> >
> > On Wed, Nov 21, 2018 at 2:20 PM Paolo Corti <pcorti at gmail.com> wrote:
> >>
> >> Hi
> >> first thing to test: can you connect from the server with psql to the
> database?
> >> best
> >> Paolo
> >> On Wed, Nov 21, 2018 at 11:16 AM Julierme Pinheiro
> >> <juliermeopensourcedeveloper at gmail.com> wrote:
> >> >
> >> > ...and yes, in the case of using
> os.environ.setdefault("DJANGO_SETTINGS_MODULE",
> "my_geonode.local_settings"), I have local_settings.py in my
> /my_geonode/my_geonode/ path.
> >> >
> >> > Thank you for your time in advance.
> >> >
> >> > Julierme
> >> >
> >> > On Wed, Nov 21, 2018 at 1:55 PM Julierme Pinheiro <
> juliermeopensourcedeveloper at gmail.com> wrote:
> >> >>
> >> >> Hi all,
> >> >>
> >> >> Regarding the previous e-mail, I made a test here. Following the
> guide to install GeoNode-Project at 2.8, everything works fine if I set the
> settings in my_geonode/wsgi.py as
> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_geonode.settings").
> However, if I change to <local_settings> in my_geonode/wsgi.py to
> os.environ.setdefault("DJANGO_SETTINGS_MODULE",
> "my_geonode.local_settings"), I have the issues showed in the previous
> e-mail. Is there anything else that I must pay attention or may be missing
> configuration?
> >> >>
> >> >> Any help on that would be appreciated.
> >> >>
> >> >> Kind regards
> >> >>
> >> >> Julierme
> >> >>
> >> >> On Tue, Nov 20, 2018 at 1:18 PM Julierme Pinheiro <
> juliermeopensourcedeveloper at gmail.com> wrote:
> >> >>>
> >> >>> Hi GeoNode users,
> >> >>>
> >> >>> I have Geonode-Project installed via Docker in Centos7 Vm and all
> works fine after following the guide in here.
> >> >>>
> >> >>> Now, I am trying to repeat the task installing GeoNode-Project in a
> server in our network, and I am facing the issue bellow.   It seems
> database connection issue:
> >> >>>
> >> >>> celery4my_geonode | django.db.utils.OperationalError: could not
> connect to server: Connection refused
> >> >>> celery4my_geonode |     Is the server running on host "localhost"
> (127.0.0.1) and accepting
> >> >>> celery4my_geonode |     TCP/IP connections on port 5432?
> >> >>> celery4my_geonode | could not connect to server: Cannot assign
> requested address
> >> >>> celery4my_geonode |     Is the server running on host "localhost"
> (::1) and accepting
> >> >>> celery4my_geonode |     TCP/IP connections on port 5432?
> >> >>>
> >> >>> I tried setting postgres/postgis database from a different server
> (host = 172.21.14.45) as shown bellow, but the problem remains
> >> >>>
> >> >>> DATABASES = {
> >> >>>     'default': {
> >> >>>         'ENGINE': 'django.db.backends.postgresql_psycopg2',
> >> >>>         'NAME': 'geonode',
> >> >>>         'USER': 'geonode',
> >> >>>         'PASSWORD': 'geonode',
> >> >>>         'HOST': 'localhost', --> 172.21.14.45
> >> >>>         'PORT': '5432',
> >> >>>         'CONN_TOUT': 900,
> >> >>>     },
> >> >>>     # vector datastore for uploads
> >> >>>     'datastore': {
> >> >>>         'ENGINE': 'django.contrib.gis.db.backends.postgis',
> >> >>>         # 'ENGINE': '', # Empty ENGINE name disables
> >> >>>         'NAME': 'geonode_data',
> >> >>>         'USER': 'geonode',
> >> >>>         'PASSWORD': 'geonode',
> >> >>>         'HOST': 'localhost', --> 172.21.14.45
> >> >>>         'PORT': '5432',
> >> >>>         'CONN_TOUT': 900,
> >> >>>     }
> >> >>> }
> >> >>> Geoserver is running smoothly, but Django and Celery are up,
> giving always a response of
> >> >>>
> >> >>> 502 Bad Gateway
> >> >>>
> >> >>> ________________________________
> >> >>> nginx/1.15.0
> >> >>>
> >> >>> Any comment on that will be very appreciated.
> >> >>>
> >> >>> Thank you very much for your time in advance.
> >> >>>
> >> >>> Julierme
> >> >
> >> > _______________________________________________
> >> > geonode-users mailing list
> >> > geonode-users at lists.osgeo.org
> >> > https://lists.osgeo.org/mailman/listinfo/geonode-users
> >>
> >>
> >>
> >> --
> >> Paolo Corti
> >> Geospatial software developer
> >> web: http://www.paolocorti.net
> >> twitter: @capooti
> >> skype: capooti
>
>
>
> --
> Paolo Corti
> Geospatial software developer
> web: http://www.paolocorti.net
> twitter: @capooti
> skype: capooti
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20181121/29a2f980/attachment.html>


More information about the geonode-users mailing list