GeoNode-Project Installation

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

GeoNode-Project Installation

juliermeopensourcedeveloper
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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoNode-Project Installation

juliermeopensourcedeveloper
Hi all,

Regarding the previous e-mail, I made a test here. Following the guide to install GeoNode-Project@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 <[hidden email]> 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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoNode-Project Installation

juliermeopensourcedeveloper
...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 <[hidden email]> wrote:
Hi all,

Regarding the previous e-mail, I made a test here. Following the guide to install GeoNode-Project@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 <[hidden email]> 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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoNode-Project Installation

Paolo Corti
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
<[hidden email]> 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 <[hidden email]> wrote:
>>
>> Hi all,
>>
>> Regarding the previous e-mail, I made a test here. Following the guide to install GeoNode-Project@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 <[hidden email]> 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
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/geonode-users



--
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti
_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoNode-Project Installation

juliermeopensourcedeveloper
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@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 <[hidden email]> 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
<[hidden email]> 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 <[hidden email]> wrote:
>>
>> Hi all,
>>
>> Regarding the previous e-mail, I made a test here. Following the guide to install GeoNode-Project@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 <[hidden email]> 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
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/geonode-users



--
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoNode-Project Installation

Paolo Corti
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
<[hidden email]> 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@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 <[hidden email]> 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
>> <[hidden email]> 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 <[hidden email]> wrote:
>> >>
>> >> Hi all,
>> >>
>> >> Regarding the previous e-mail, I made a test here. Following the guide to install GeoNode-Project@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 <[hidden email]> 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
>> > [hidden email]
>> > 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
_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoNode-Project Installation

juliermeopensourcedeveloper
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@2.8 nad GeoNode-Project@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 <[hidden email]> 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
<[hidden email]> 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@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 <[hidden email]> 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
>> <[hidden email]> 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 <[hidden email]> wrote:
>> >>
>> >> Hi all,
>> >>
>> >> Regarding the previous e-mail, I made a test here. Following the guide to install GeoNode-Project@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 <[hidden email]> 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
>> > [hidden email]
>> > 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

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoNode-Project Installation

Handy Rusydi

Trying yo to help.

just change the SITEURL to your domain name.

For example your domain name galerigis.com,just write in local_settings.py

SITEURL = 'http://galerigis.com'

--
Sent from myMail for Android


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoNode-Project Installation

Handy Rusydi
In reply to this post by juliermeopensourcedeveloper

You have mention that your domain in 172.21.14.45 so

SITEURL = 'http://172.21.14.45'
--
Sent from myMail for Android


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoNode-Project Installation

juliermeopensourcedeveloper
Dear all,

Ok. After many tests, I finally got GeoNode-Project installed using "local_settings" in my_geonode/wsgi.py --> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_geonode.local_settings").

I have an old instance of GeoNode-Project@2.7 running in a VM. I compared settings and local_settings files of GeoNode-Project@2.7 and GeoNode-Project@2.8. Here are some differences found:

Regarding local_settings.py

In GeoNode-Project@2.8 SITEURL is declared before SITE_HOST_NAME and SITE_HOST_PORT. But SITEURL depends on both variables.

In contrast, GeoNode-Project@2.7, its local_settings.py sets SITEURL right after SITE_HOST_PORT and SITE_HOST_NAME.  It seems the correct settings.

Regarding settings.py

What I realized is that settings.py for GeoNode-Project@2.8 is smaller than GeoNode-Project@2.7. For instance I can find configuration for # prevent signing up by default # in Geonode-Project@2.7 settings.py , but I can not find the same config in GeoNode-Project@2.8 settings.p.

What I did: I cloned geonode-project and my_geonode folders for GeoNode-Project@2.8 and I used settings.py@2.7 and local_settings.py@2.7 instead of
settings.py@2.8 and local_settings.py@2.8. The response is: GeoNode-Project@2.8 is up and running via Docker installation.

Find the files settings.py and local_settings.py for GeoNode-Project@2.7 and GeoNode-Project@2.8 in attached.

Kind regards

Julierme










On Wed, Nov 21, 2018 at 8:37 PM Handy Rusydi <[hidden email]> wrote:

You have mention that your domain in 172.21.14.45 so

SITEURL = 'http://172.21.14.45'
--
Sent from myMail for Android


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

settings.py.geonode@2.7 (17K) Download Attachment
local_settings.py.sample.geonode@2.7 (22K) Download Attachment
settings.py.geonode@2.8 (3K) Download Attachment
local_settings.py.sample.geonode@2.8 (26K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GeoNode-Project Installation

toni_schoenbuchner
In reply to this post by juliermeopensourcedeveloper
Hi Julierme,

as a little hint. With github you can view the history of each file.

For example local_settings:

The commit message often explains why the file was updated.
When you click the button on the right hand side showing a specific commit hash
you get a nice diff view what has changed. With this it should be easy to
see what changed form 2.7 to 2.8 etc.

Do you notice something?
– Exactly! Most of the time it´s Allesio who changed the file.
That´s why we should spend him not only one round of beer
at the next summit :))

Hope this makes your work a bit easier 
Cheers,

Toni

Am 22.11.2018 um 18:10 schrieb [hidden email]:

Message: 2
Date: Thu, 22 Nov 2018 15:10:40 -0200
From: Julierme Pinheiro <[hidden email]>
To: [hidden email]
Cc: geonode-users <[hidden email]>, Paolo Corti
<[hidden email]>
Subject: Re: [GeoNode-users] GeoNode-Project Installation
Message-ID:
<[hidden email]>
Content-Type: text/plain; charset="utf-8"

Dear all,

Ok. After many tests, I finally got GeoNode-Project installed using
"local_settings" in my_geonode/wsgi.py -->
os.environ.setdefault("DJANGO_SETTINGS_MODULE",
"my_geonode.local_settings").

I have an old instance of GeoNode-Project@2.7 running in a VM. I compared
settings and local_settings files of GeoNode-Project@2.7 and
GeoNode-Project@2.8. Here are some differences found:

Regarding local_settings.py

In GeoNode-Project@2.8 SITEURL is declared before SITE_HOST_NAME and
SITE_HOST_PORT. But SITEURL depends on both variables.

In contrast, GeoNode-Project@2.7, its local_settings.py sets SITEURL right
after SITE_HOST_PORT and SITE_HOST_NAME.  It seems the correct settings.

Regarding settings.py

What I realized is that settings.py for GeoNode-Project@2.8 is smaller than
GeoNode-Project@2.7. For instance I can find configuration for # prevent
signing up by default # in Geonode-Project@2.7 settings.py , but I can not
find the same config in GeoNode-Project@2.8 settings.p.

What I did: I cloned geonode-project and my_geonode folders for
GeoNode-Project@2.8 and I used settings.py@2.7 and local_settings.py@2.7
instead of
settings.py@2.8 and local_settings.py@2.8. The response is:
GeoNode-Project@2.8 is up and running via Docker installation.

Find the files settings.py and local_settings.py for GeoNode-Project@2.7
and GeoNode-Project@2.8 in attached.

Kind regards

Julierme


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoNode-Project Installation

juliermeopensourcedeveloper
Hi Toni,

Thank you very much for the hints. I see in https://github.com/GeoNode/geonode/commits/master/geonode/local_settings.py.geoserver.sample that there is a lot of work and contributions behind the whole project. You all deserve many rounds of beer in the next Summit. I hope to be there to celebrate with you all.

I noticed those differences I mentioned before, mainly settings.py@2.7 has more configuration than settings.py@2.8. And I am not sure about whether SITEURL can be declared before SITE_HOST_NAME and SITE_HOST_PORT (I can do a test changing SITEURL location in the file) in local_settings.py. My first guess is not because python interprets the file from top to the bottom.
One thing to consider is: If we follow the guide the way it is, using local_settings in wsgi.py. The GeoNode-Project@2.8 docker installation will fail.

I appreciated your time, Toni.

Kind regards

Julierme



On Thu, Nov 22, 2018 at 4:09 PM Toni Schönbuchner <[hidden email]> wrote:
Hi Julierme,

as a little hint. With github you can view the history of each file.

For example local_settings:

The commit message often explains why the file was updated.
When you click the button on the right hand side showing a specific commit hash
you get a nice diff view what has changed. With this it should be easy to
see what changed form 2.7 to 2.8 etc.

Do you notice something?
– Exactly! Most of the time it´s Allesio who changed the file.
That´s why we should spend him not only one round of beer
at the next summit :))

Hope this makes your work a bit easier 
Cheers,

Toni

Am 22.11.2018 um 18:10 schrieb [hidden email]:

Message: 2
Date: Thu, 22 Nov 2018 15:10:40 -0200
From: Julierme Pinheiro <[hidden email]>
To: [hidden email]
Cc: geonode-users <[hidden email]>, Paolo Corti
<[hidden email]>
Subject: Re: [GeoNode-users] GeoNode-Project Installation
Message-ID:
<[hidden email]>
Content-Type: text/plain; charset="utf-8"

Dear all,

Ok. After many tests, I finally got GeoNode-Project installed using
"local_settings" in my_geonode/wsgi.py -->
os.environ.setdefault("DJANGO_SETTINGS_MODULE",
"my_geonode.local_settings").

I have an old instance of GeoNode-Project@2.7 running in a VM. I compared
settings and local_settings files of GeoNode-Project@2.7 and
GeoNode-Project@2.8. Here are some differences found:

Regarding local_settings.py

In GeoNode-Project@2.8 SITEURL is declared before SITE_HOST_NAME and
SITE_HOST_PORT. But SITEURL depends on both variables.

In contrast, GeoNode-Project@2.7, its local_settings.py sets SITEURL right
after SITE_HOST_PORT and SITE_HOST_NAME.  It seems the correct settings.

Regarding settings.py

What I realized is that settings.py for GeoNode-Project@2.8 is smaller than
GeoNode-Project@2.7. For instance I can find configuration for # prevent
signing up by default # in Geonode-Project@2.7 settings.py , but I can not
find the same config in GeoNode-Project@2.8 settings.p.

What I did: I cloned geonode-project and my_geonode folders for
GeoNode-Project@2.8 and I used settings.py@2.7 and local_settings.py@2.7
instead of
settings.py@2.8 and local_settings.py@2.8. The response is:
GeoNode-Project@2.8 is up and running via Docker installation.

Find the files settings.py and local_settings.py for GeoNode-Project@2.7
and GeoNode-Project@2.8 in attached.

Kind regards

Julierme


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoNode-Project Installation

toni_schoenbuchner
Hi Julierme,

don´t forget settings.py and local_settings.py is a regular python file in
the django context. means you can do what ever your needs like import from libs,
define or concat variables etc. for example have a look at spc geonodes settings:
if it´s smaller or bigger depends on the settings geonode needs for a specific version. 

Personally I try to keep my local_settings small having only the things which should
differ to settings.py.

Cheers,

Toni

Am 22.11.2018 um 19:47 schrieb Julierme Pinheiro <[hidden email]>:

Hi Toni,

Thank you very much for the hints. I see in https://github.com/GeoNode/geonode/commits/master/geonode/local_settings.py.geoserver.sample that there is a lot of work and contributions behind the whole project. You all deserve many rounds of beer in the next Summit. I hope to be there to celebrate with you all.

I noticed those differences I mentioned before, mainly settings.py@2.7 has more configuration than settings.py@2.8. And I am not sure about whether SITEURL can be declared before SITE_HOST_NAME and SITE_HOST_PORT (I can do a test changing SITEURL location in the file) in local_settings.py. My first guess is not because python interprets the file from top to the bottom.
One thing to consider is: If we follow the guide the way it is, using local_settings in wsgi.py. The GeoNode-Project@2.8 docker installation will fail.

I appreciated your time, Toni.

Kind regards

Julierme



On Thu, Nov 22, 2018 at 4:09 PM Toni Schönbuchner <[hidden email]> wrote:
Hi Julierme,

as a little hint. With github you can view the history of each file.

For example local_settings:

The commit message often explains why the file was updated.
When you click the button on the right hand side showing a specific commit hash
you get a nice diff view what has changed. With this it should be easy to
see what changed form 2.7 to 2.8 etc.

Do you notice something?
– Exactly! Most of the time it´s Allesio who changed the file.
That´s why we should spend him not only one round of beer
at the next summit :))

Hope this makes your work a bit easier 
Cheers,

Toni

Am 22.11.2018 um 18:10 schrieb [hidden email]:

Message: 2
Date: Thu, 22 Nov 2018 15:10:40 -0200
From: Julierme Pinheiro <[hidden email]>
To: [hidden email]
Cc: geonode-users <[hidden email]>, Paolo Corti
<[hidden email]>
Subject: Re: [GeoNode-users] GeoNode-Project Installation
Message-ID:
<[hidden email]>
Content-Type: text/plain; charset="utf-8"

Dear all,

Ok. After many tests, I finally got GeoNode-Project installed using
"local_settings" in my_geonode/wsgi.py -->
os.environ.setdefault("DJANGO_SETTINGS_MODULE",
"my_geonode.local_settings").

I have an old instance of GeoNode-Project@2.7 running in a VM. I compared
settings and local_settings files of GeoNode-Project@2.7 and
GeoNode-Project@2.8. Here are some differences found:

Regarding local_settings.py

In GeoNode-Project@2.8 SITEURL is declared before SITE_HOST_NAME and
SITE_HOST_PORT. But SITEURL depends on both variables.

In contrast, GeoNode-Project@2.7, its local_settings.py sets SITEURL right
after SITE_HOST_PORT and SITE_HOST_NAME.  It seems the correct settings.

Regarding settings.py

What I realized is that settings.py for GeoNode-Project@2.8 is smaller than
GeoNode-Project@2.7. For instance I can find configuration for # prevent
signing up by default # in Geonode-Project@2.7 settings.py , but I can not
find the same config in GeoNode-Project@2.8 settings.p.

What I did: I cloned geonode-project and my_geonode folders for
GeoNode-Project@2.8 and I used settings.py@2.7 and local_settings.py@2.7
instead of
settings.py@2.8 and local_settings.py@2.8. The response is:
GeoNode-Project@2.8 is up and running via Docker installation.

Find the files settings.py and local_settings.py for GeoNode-Project@2.7
and GeoNode-Project@2.8 in attached.

Kind regards

Julierme



_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoNode-Project Installation

juliermeopensourcedeveloper
In reply to this post by juliermeopensourcedeveloper
Regarding the previous e-mail:

I realized that in local_settings.py@2.8 --> DATABASES: { 'HOST': 'localhost' in, but local_settings.py@2.7 --> DATABASES: { 'HOST': 'db'

Regards

Julierme


On Thu, Nov 22, 2018 at 4:47 PM Julierme Pinheiro <[hidden email]> wrote:
Hi Toni,

Thank you very much for the hints. I see in https://github.com/GeoNode/geonode/commits/master/geonode/local_settings.py.geoserver.sample that there is a lot of work and contributions behind the whole project. You all deserve many rounds of beer in the next Summit. I hope to be there to celebrate with you all.

I noticed those differences I mentioned before, mainly settings.py@2.7 has more configuration than settings.py@2.8. And I am not sure about whether SITEURL can be declared before SITE_HOST_NAME and SITE_HOST_PORT (I can do a test changing SITEURL location in the file) in local_settings.py. My first guess is not because python interprets the file from top to the bottom.
One thing to consider is: If we follow the guide the way it is, using local_settings in wsgi.py. The GeoNode-Project@2.8 docker installation will fail.

I appreciated your time, Toni.

Kind regards

Julierme



On Thu, Nov 22, 2018 at 4:09 PM Toni Schönbuchner <[hidden email]> wrote:
Hi Julierme,

as a little hint. With github you can view the history of each file.

For example local_settings:

The commit message often explains why the file was updated.
When you click the button on the right hand side showing a specific commit hash
you get a nice diff view what has changed. With this it should be easy to
see what changed form 2.7 to 2.8 etc.

Do you notice something?
– Exactly! Most of the time it´s Allesio who changed the file.
That´s why we should spend him not only one round of beer
at the next summit :))

Hope this makes your work a bit easier 
Cheers,

Toni

Am 22.11.2018 um 18:10 schrieb [hidden email]:

Message: 2
Date: Thu, 22 Nov 2018 15:10:40 -0200
From: Julierme Pinheiro <[hidden email]>
To: [hidden email]
Cc: geonode-users <[hidden email]>, Paolo Corti
<[hidden email]>
Subject: Re: [GeoNode-users] GeoNode-Project Installation
Message-ID:
<[hidden email]>
Content-Type: text/plain; charset="utf-8"

Dear all,

Ok. After many tests, I finally got GeoNode-Project installed using
"local_settings" in my_geonode/wsgi.py -->
os.environ.setdefault("DJANGO_SETTINGS_MODULE",
"my_geonode.local_settings").

I have an old instance of GeoNode-Project@2.7 running in a VM. I compared
settings and local_settings files of GeoNode-Project@2.7 and
GeoNode-Project@2.8. Here are some differences found:

Regarding local_settings.py

In GeoNode-Project@2.8 SITEURL is declared before SITE_HOST_NAME and
SITE_HOST_PORT. But SITEURL depends on both variables.

In contrast, GeoNode-Project@2.7, its local_settings.py sets SITEURL right
after SITE_HOST_PORT and SITE_HOST_NAME.  It seems the correct settings.

Regarding settings.py

What I realized is that settings.py for GeoNode-Project@2.8 is smaller than
GeoNode-Project@2.7. For instance I can find configuration for # prevent
signing up by default # in Geonode-Project@2.7 settings.py , but I can not
find the same config in GeoNode-Project@2.8 settings.p.

What I did: I cloned geonode-project and my_geonode folders for
GeoNode-Project@2.8 and I used settings.py@2.7 and local_settings.py@2.7
instead of
settings.py@2.8 and local_settings.py@2.8. The response is:
GeoNode-Project@2.8 is up and running via Docker installation.

Find the files settings.py and local_settings.py for GeoNode-Project@2.7
and GeoNode-Project@2.8 in attached.

Kind regards

Julierme


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoNode-Project Installation

juliermeopensourcedeveloper
Dear all,

Trying to find what is going on with GeoNode-Project@2.8 docker installation. Just for further information, I got to solve the SITEURL issue by placing it after SITE_HOST_NAME and SITE_HOST_PORT in local_settings.py@2.8. But now, I am getting stuck in a database issue as shown by docker-compose logs -f:
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: Network is unreachable
celery4my_geonode |     Is the server running on host "localhost" (::1) and accepting
celery4my_geonode |     TCP/IP connections on port 5432?

Any help on that will be very appreciated.

Kind regards

Julierme




 

On Thu, Nov 22, 2018 at 5:03 PM Julierme Pinheiro <[hidden email]> wrote:
Hi Toni,

Thank you very much for the highlights. I got it.

I appreciated  your time.

Regards

Julierme

On Thu, Nov 22, 2018 at 4:59 PM Julierme Pinheiro <[hidden email]> wrote:
Regarding the previous e-mail:

I realized that in local_settings.py@2.8 --> DATABASES: { 'HOST': 'localhost' in, but local_settings.py@2.7 --> DATABASES: { 'HOST': 'db'

Regards

Julierme


On Thu, Nov 22, 2018 at 4:47 PM Julierme Pinheiro <[hidden email]> wrote:
Hi Toni,

Thank you very much for the hints. I see in https://github.com/GeoNode/geonode/commits/master/geonode/local_settings.py.geoserver.sample that there is a lot of work and contributions behind the whole project. You all deserve many rounds of beer in the next Summit. I hope to be there to celebrate with you all.

I noticed those differences I mentioned before, mainly settings.py@2.7 has more configuration than settings.py@2.8. And I am not sure about whether SITEURL can be declared before SITE_HOST_NAME and SITE_HOST_PORT (I can do a test changing SITEURL location in the file) in local_settings.py. My first guess is not because python interprets the file from top to the bottom.
One thing to consider is: If we follow the guide the way it is, using local_settings in wsgi.py. The GeoNode-Project@2.8 docker installation will fail.

I appreciated your time, Toni.

Kind regards

Julierme



On Thu, Nov 22, 2018 at 4:09 PM Toni Schönbuchner <[hidden email]> wrote:
Hi Julierme,

as a little hint. With github you can view the history of each file.

For example local_settings:

The commit message often explains why the file was updated.
When you click the button on the right hand side showing a specific commit hash
you get a nice diff view what has changed. With this it should be easy to
see what changed form 2.7 to 2.8 etc.

Do you notice something?
– Exactly! Most of the time it´s Allesio who changed the file.
That´s why we should spend him not only one round of beer
at the next summit :))

Hope this makes your work a bit easier 
Cheers,

Toni

Am 22.11.2018 um 18:10 schrieb [hidden email]:

Message: 2
Date: Thu, 22 Nov 2018 15:10:40 -0200
From: Julierme Pinheiro <[hidden email]>
To: [hidden email]
Cc: geonode-users <[hidden email]>, Paolo Corti
<[hidden email]>
Subject: Re: [GeoNode-users] GeoNode-Project Installation
Message-ID:
<[hidden email]>
Content-Type: text/plain; charset="utf-8"

Dear all,

Ok. After many tests, I finally got GeoNode-Project installed using
"local_settings" in my_geonode/wsgi.py -->
os.environ.setdefault("DJANGO_SETTINGS_MODULE",
"my_geonode.local_settings").

I have an old instance of GeoNode-Project@2.7 running in a VM. I compared
settings and local_settings files of GeoNode-Project@2.7 and
GeoNode-Project@2.8. Here are some differences found:

Regarding local_settings.py

In GeoNode-Project@2.8 SITEURL is declared before SITE_HOST_NAME and
SITE_HOST_PORT. But SITEURL depends on both variables.

In contrast, GeoNode-Project@2.7, its local_settings.py sets SITEURL right
after SITE_HOST_PORT and SITE_HOST_NAME.  It seems the correct settings.

Regarding settings.py

What I realized is that settings.py for GeoNode-Project@2.8 is smaller than
GeoNode-Project@2.7. For instance I can find configuration for # prevent
signing up by default # in Geonode-Project@2.7 settings.py , but I can not
find the same config in GeoNode-Project@2.8 settings.p.

What I did: I cloned geonode-project and my_geonode folders for
GeoNode-Project@2.8 and I used settings.py@2.7 and local_settings.py@2.7
instead of
settings.py@2.8 and local_settings.py@2.8. The response is:
GeoNode-Project@2.8 is up and running via Docker installation.

Find the files settings.py and local_settings.py for GeoNode-Project@2.7
and GeoNode-Project@2.8 in attached.

Kind regards

Julierme


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoNode-Project Installation

juliermeopensourcedeveloper
... Also just adding some more information: this issue does not come out with settings in my_geonode/wsgi.py --> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_geonode.settings").

Kind regards

Julierme

On Thu, Nov 22, 2018 at 7:04 PM Julierme Pinheiro <[hidden email]> wrote:
Dear all,

Trying to find what is going on with GeoNode-Project@2.8 docker installation. Just for further information, I got to solve the SITEURL issue by placing it after SITE_HOST_NAME and SITE_HOST_PORT in local_settings.py@2.8. But now, I am getting stuck in a database issue as shown by docker-compose logs -f:
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: Network is unreachable
celery4my_geonode |     Is the server running on host "localhost" (::1) and accepting
celery4my_geonode |     TCP/IP connections on port 5432?

Any help on that will be very appreciated.

Kind regards

Julierme




 

On Thu, Nov 22, 2018 at 5:03 PM Julierme Pinheiro <[hidden email]> wrote:
Hi Toni,

Thank you very much for the highlights. I got it.

I appreciated  your time.

Regards

Julierme

On Thu, Nov 22, 2018 at 4:59 PM Julierme Pinheiro <[hidden email]> wrote:
Regarding the previous e-mail:

I realized that in local_settings.py@2.8 --> DATABASES: { 'HOST': 'localhost' in, but local_settings.py@2.7 --> DATABASES: { 'HOST': 'db'

Regards

Julierme


On Thu, Nov 22, 2018 at 4:47 PM Julierme Pinheiro <[hidden email]> wrote:
Hi Toni,

Thank you very much for the hints. I see in https://github.com/GeoNode/geonode/commits/master/geonode/local_settings.py.geoserver.sample that there is a lot of work and contributions behind the whole project. You all deserve many rounds of beer in the next Summit. I hope to be there to celebrate with you all.

I noticed those differences I mentioned before, mainly settings.py@2.7 has more configuration than settings.py@2.8. And I am not sure about whether SITEURL can be declared before SITE_HOST_NAME and SITE_HOST_PORT (I can do a test changing SITEURL location in the file) in local_settings.py. My first guess is not because python interprets the file from top to the bottom.
One thing to consider is: If we follow the guide the way it is, using local_settings in wsgi.py. The GeoNode-Project@2.8 docker installation will fail.

I appreciated your time, Toni.

Kind regards

Julierme



On Thu, Nov 22, 2018 at 4:09 PM Toni Schönbuchner <[hidden email]> wrote:
Hi Julierme,

as a little hint. With github you can view the history of each file.

For example local_settings:

The commit message often explains why the file was updated.
When you click the button on the right hand side showing a specific commit hash
you get a nice diff view what has changed. With this it should be easy to
see what changed form 2.7 to 2.8 etc.

Do you notice something?
– Exactly! Most of the time it´s Allesio who changed the file.
That´s why we should spend him not only one round of beer
at the next summit :))

Hope this makes your work a bit easier 
Cheers,

Toni

Am 22.11.2018 um 18:10 schrieb [hidden email]:

Message: 2
Date: Thu, 22 Nov 2018 15:10:40 -0200
From: Julierme Pinheiro <[hidden email]>
To: [hidden email]
Cc: geonode-users <[hidden email]>, Paolo Corti
<[hidden email]>
Subject: Re: [GeoNode-users] GeoNode-Project Installation
Message-ID:
<[hidden email]>
Content-Type: text/plain; charset="utf-8"

Dear all,

Ok. After many tests, I finally got GeoNode-Project installed using
"local_settings" in my_geonode/wsgi.py -->
os.environ.setdefault("DJANGO_SETTINGS_MODULE",
"my_geonode.local_settings").

I have an old instance of GeoNode-Project@2.7 running in a VM. I compared
settings and local_settings files of GeoNode-Project@2.7 and
GeoNode-Project@2.8. Here are some differences found:

Regarding local_settings.py

In GeoNode-Project@2.8 SITEURL is declared before SITE_HOST_NAME and
SITE_HOST_PORT. But SITEURL depends on both variables.

In contrast, GeoNode-Project@2.7, its local_settings.py sets SITEURL right
after SITE_HOST_PORT and SITE_HOST_NAME.  It seems the correct settings.

Regarding settings.py

What I realized is that settings.py for GeoNode-Project@2.8 is smaller than
GeoNode-Project@2.7. For instance I can find configuration for # prevent
signing up by default # in Geonode-Project@2.7 settings.py , but I can not
find the same config in GeoNode-Project@2.8 settings.p.

What I did: I cloned geonode-project and my_geonode folders for
GeoNode-Project@2.8 and I used settings.py@2.7 and local_settings.py@2.7
instead of
settings.py@2.8 and local_settings.py@2.8. The response is:
GeoNode-Project@2.8 is up and running via Docker installation.

Find the files settings.py and local_settings.py for GeoNode-Project@2.7
and GeoNode-Project@2.8 in attached.

Kind regards

Julierme


_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users