[GeoNode-users] Geonode Install on Ubuntu 18.04
Toni Schönbuchner
toni.schoenbuchner at csgis.de
Wed Dec 5 23:25:12 PST 2018
Hi José,
this is strange as the admin account should have been created by a fixture.
I think via paver sync.
We´re talking about the full stack not the dev envrionment running under localhost:8000, right?
Then the switch between IP´s is as the docs say. Mainly apache config (geonode.conf),
wsgi (pointing to local_settings), updated layers and oauth2 IPs.
You can use $ updatelayers for the later tasks (In Alessios installation guide it´s at the bottom)
In case if it´s interesting for you, in this branch I´ve created a set of low level
ansible tasks which stay close to the docs. https://github.com/csgis/geonode_ansible/tree/bionic
This branch targests an automated geonode master isntallation on ubuntu 2.18.
If you´re interested I can help you to get it running.
In case you´re running this instance online I would suggest to get familiar with server hardening,
in a next step. Apache, Tomcat, SSH, wsgi, Ports, Directory permissions are the parts you should make yourself
familliar with. Which of course is a chapter on it´s own.
Best regards,
Toni
> Am 06.12.2018 um 03:34 schrieb Jose Cáceres <jose.atyus at gmail.com>:
>
>
> HI Toni,
>
> Thanks again for all your help, I try to do everything again on a fresh Ubuntu 18.04 install but I stuck again on:
>
>
> GeoNodeException('You must have an admin account configured before importing data Try: django-admin.py createsuperuser')
> I know is a long shot to know why this is happening, but I just have one more question. If I'm trying to deploy Geonode on localhost, I'm I supposed to change something alone the way besides my working directory? Or just by following the instructions provides I should have it up and running?
>
> Thanks again for your help.
>
> Kind Regards,
>
> José
>
> <https://mailtrack.io/?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&> Remitente notificado con
> Mailtrack <https://mailtrack.io/?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&> 05/12/18 20:30:06
>
> On Sun, Dec 2, 2018 at 11:15 AM Toni Schönbuchner <toni.schoenbuchner at csgis.de <mailto:toni.schoenbuchner at csgis.de>> wrote:
> Hi Jose,
>
> at some point something is messed up unfortuantely I cannot really say where.
> Can you run paver sync again (with enabled virutalenv and local_settings)? This should setup admin:admin
> Can you log in to django admin http://yourIP/admin <http://yourip/admin> with your newly created superuser?
>
> Cheers,
>
> Toni
>
>> Am 02.12.2018 um 17:22 schrieb Jose Cáceres <jose.atyus at gmail.com <mailto:jose.atyus at gmail.com>>:
>>
>>
>> UPDATE,
>>
>> After doing what you sugested in your previous email, mi site is not whowing the 500 error anymore, I can see the interface of geonode now, however I'm having troubles logging in to the site, I think is because the last error I got after running sudo WORKON_HOME=/home/geoportal/Envs/geonode DJANGO_SETTINGS_MODULE=geonode.local_settings GEONODE_ETC=/home/geoportal/geonode/geonode GEOSERVER_DATA_DIR=/var/lib/tomcat8/webapps/geoserver/data geonode_updateip -p 10.8.11.66, where i showed:
>>
>> PUBLIC_IP http://10.8.11.66 <http://10.8.11.66/>
>> LOCAL_IP http://localhost <http://localhost/>
>> Replacing SITEURL value with 'http://10.8.11.66 <http://10.8.11.66/>' in /home/geoportal/geonode/geonode/local_settings.py ... done.
>> Adding entry for '10.8.11.66' in /var/lib/tomcat8/webapps/geoserver/data/printing/config.yaml ... '10.8.11.66' already found to the printing whitelist.
>> Setting up oauth
>> Waiting Tomcat Service to Restart...
>> Waiting Apache HTTPD Service to Restart...
>> Traceback (most recent call last):
>> File "/home/geoportal/Envs/geonode/bin/django-admin", line 11, in <module>
>> sys.exit(execute_from_command_line())
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
>> utility.execute()
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
>> self.execute(*args, **cmd_options)
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
>> output = self.handle(*args, **options)
>> File "/home/geoportal/geonode/geonode/geoserver/management/commands/updatelayers.py", line 98, in handle
>> owner = get_valid_user(user)
>> File "/home/geoportal/geonode/geonode/people/utils.py", line 44, in get_valid_user
>> theuser = get_default_user()
>> File "/home/geoportal/geonode/geonode/people/utils.py", line 35, in get_default_user
>> raise GeoNodeException('You must have an admin account configured '
>> geonode.GeoNodeException: You must have an admin account configured before importing data. Try: django-admin.py createsuperuser
>>
>> I cannot log on with default credentials, user:'admin', pass:'admin'
>>
>> I try ./mange.py createsuperuser and created a new one, restart apache after, but cannot log on with that either.
>>
>> Username: jcaceres
>> Email address:
>> Password:
>> Password (again):
>> Superuser created successfully.
>>
>> I try:
>>
>> curl -X GET http://10.8.11.66/api/roles <http://10.8.11.66/api/roles>
>>
>> {"groups": ["anonymous", "admin"]}
>>
>> curl -X GET http://10.8.11.66/api/users <http://10.8.11.66/api/users>
>>
>> {"users": [{"username": "AnonymousUser", "groups": ["anonymous"]}, {"username": "administrador", "groups": ["anonymous"]}]}
>>
>> curl -X GET http://10.8.11.66/api/users/admin <http://10.8.11.66/api/users/admin>
>>
>> {"users": []}
>>
>>
>> I can't see the superuser I just created either.
>>
>> Very grateful for all your help.
>>
>> Kind Regards,
>>
>> José
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> <https://mailtrack.io/?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&> Remitente notificado con
>> Mailtrack <https://mailtrack.io/?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&> 02/12/18 10:21:17
>>
>> On Sun, Dec 2, 2018 at 9:15 AM Jose Cáceres <jose.atyus at gmail.com <mailto:jose.atyus at gmail.com>> wrote:
>>
>> Hi Toni
>>
>> Thanks again for your reply.
>>
>> geonode.settings is using sqlite, here is what that line looks like in my file:
>>
>> DATABASE_URL = os.getenv(
>> 'DATABASE_URL',
>> 'sqlite:///{path}'.format <>(
>> path=os.path.join(PROJECT_ROOT, 'development.db')
>> )
>> )
>>
>> Everything looks same as in the file https://github.com/GeoNode/geonode/blob/master/geonode/settings.py#L104 <https://github.com/GeoNode/geonode/blob/master/geonode/settings.py#L104>.
>> I'm I supposed to change that?
>>
>> Running ./manage.py migrate sites --settings=geonode.local_settings gave me this:
>>
>> Operations to perform:
>> Apply all migrations: sites
>> Running migrations:
>> Applying sites.0001_initial... OK
>> Applying sites.0002_alter_domain_unique... OK
>> Traceback (most recent call last):
>> File "./manage.py", line 29, in <module>
>> execute_from_command_line(sys.argv)
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
>> utility.execute()
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
>> self.execute(*args, **cmd_options)
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
>> output = self.handle(*args, **options)
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 227, in handle
>> self.verbosity, self.interactive, connection.alias, apps=post_migrate_apps, plan=plan,
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/django/core/management/sql.py", line 53, in emit_post_migrate_signal
>> **kwargs
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 193, in send
>> for receiver in self._live_receivers(sender)
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/jsonfield_compat/convert.py", line 48, in handler_convert_json_fields
>> convert_model_json_fields(model)
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/jsonfield_compat/convert.py", line 43, in convert_model_json_fields
>> convert_column_to_json(model, column_name)
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/jsonfield_compat/convert.py", line 23, in convert_column_to_json
>> current_type = cursor.fetchone()[0].upper()
>> TypeError: 'NoneType' object has no attribute '__getitem__'
>>
>>
>> ./manage.py migrate --settings=geonode.local_settings gave me this:
>>
>> Operations to perform:
>> Apply all migrations: account, actstream, admin, agon_ratings, announcements, auth, avatar, base, contenttypes, dialogos, documents, geonode_client, geonode_themes, groups, guardian, invitations, layers, maps, monitoring, oauth2_provider, people, pinax_notifications, services, sessions, sites, socialaccount, taggit, tastypie, upload, user_messages
>> Running migrations:
>> Applying contenttypes.0001_initial... OK
>> Applying taggit.0001_initial... OK
>> Applying taggit.0002_auto_20150616_2121... OK
>> Applying contenttypes.0002_remove_content_type_name... OK
>> Applying auth.0001_initial... OK
>> Applying auth.0002_alter_permission_name_max_length... OK
>> Applying auth.0003_alter_user_email_max_length... OK
>> Applying auth.0004_alter_user_username_opts... OK
>> Applying auth.0005_alter_user_last_login_null... OK
>> Applying auth.0006_require_contenttypes_0002... OK
>> Applying people.24_initial... OK
>> Applying account.0001_initial... OK
>> Applying account.0002_email_max_length... OK
>> Applying actstream.0001_initial... OK
>> Applying actstream.0002_remove_action_data... OK
>> Applying admin.0001_initial... OK
>> Applying admin.0002_logentry_remove_auto_add... OK
>> Applying agon_ratings.0001_initial... OK
>> Applying announcements.0001_initial... OK
>> Applying announcements.0002_auto_20181201_1638... OK
>> Applying auth.0007_alter_validators_add_error_messages... OK
>> Applying auth.0008_alter_user_username_max_length... OK
>> Applying avatar.0001_initial... OK
>> Applying base.24_initial... OK
>> Applying base.24_to_26... OK
>> Applying base.26_to_27... OK
>> Applying base.0027_auto_20170801_1228... OK
>> Applying base.0028_resourcebase_is_approved... OK
>> Applying base.0029_auto_20171114_0341... OK
>> Applying base.0030_auto_20180309_0833... OK
>> Applying base.0031_auto_20180309_0837... OK
>> Applying base.0032_auto_20180329_1844... OK
>> Applying base.0033_auto_20180330_0951... OK
>> Applying base.0034_auto_20180606_1543... OK
>> Applying base.0035_resourcebase_dirty_state... OK
>> Applying dialogos.0001_initial... OK
>> Applying documents.24_initial... OK
>> Applying documents.25_add_documentresourcelink_table... OK
>> Applying documents.26_move_data_to_documentresourcelink_table... OK
>> Applying documents.27_drop_resource_columns_from_document_table... OK
>> Applying documents.0028_auto_20170801_1228... OK
>> Applying documents.0029_auto_20180301_1947... OK
>> Applying documents.0030_auto_20180302_0430... OK
>> Applying documents.0031_auto_20180409_1238... OK
>> Applying documents.0032_auto_20180412_0822... OK
>> Applying documents.0033_auto_20180414_2120... OK
>> Applying geonode_client.0001_initial... OK
>> Applying geonode_client.0002_auto_20180412_1039... OK
>> Applying geonode_client.0003_geonodethemecustomization_jumbotron_welcome_hide... OK
>> Applying geonode_client.0004_auto_20180416_1319... OK
>> Applying geonode_client.0005_auto_20181015_1201... OK
>> Applying geonode_themes.0001_initial... OK
>> Applying geonode_themes.0002_auto_20181015_1208... OK
>> Applying geonode_themes.0003_remove_geonodethemecustomization_identifier... OK
>> Applying groups.24_initial... OK
>> Applying groups.26_to_27... OK
>> Applying groups.0027_auto_20180105_1631... OK
>> Applying groups.0028_auto_20180606_1543... OK
>> Applying guardian.0001_initial... OK
>> Applying invitations.0001_initial... OK
>> Applying invitations.0002_auto_20151126_0426... OK
>> Applying invitations.0003_auto_20151126_1523... OK
>> Applying layers.24_initial... OK
>> Applying services.24_initial... OK
>> Applying services.0025_harvestjob... OK
>> Applying services.0026_auto_20171130_0600... OK
>> Applying services.0027_harvestjob_details... OK
>> Applying services.0028_auto_20171201_0640... OK
>> Applying services.0029_auto_20171203_1624... OK
>> Applying services.0030_auto_20171212_0518... OK
>> Applying layers.24_to_26... OK
>> Applying layers.26_to_27... OK
>> Applying layers.0027_auto_20170801_1228... OK
>> Applying layers.0028_auto_20171218_0249... OK
>> Applying layers.0029_layer_service... OK
>> Applying layers.0030_auto_20180228_0812... OK
>> Applying layers.0031_uploadsession_resource... OK
>> Applying layers.0032_auto_20180424_1638... OK
>> Applying layers.0033_auto_20180606_1543... OK
>> Applying maps.24_initial... OK
>> Applying maps.0025_auto_20170801_1228... OK
>> Applying maps.0026_auto_20180301_1947... OK
>> Applying maps.0027_auto_20180302_0430... OK
>> Applying maps.0028_auto_20180409_1238... OK
>> Applying maps.0029_auto_20180412_0822... OK
>> Applying maps.0030_auto_20180414_2120... OK
>> Applying monitoring.0001_monitoring_init... OK
>> Applying monitoring.0002_monitoring_update... OK
>> Applying monitoring.0003_monitoring_resources... OK
>> Applying monitoring.0004_monitoring_metric_type... OK
>> Applying monitoring.0005_monitoring_ows_service... OK
>> Applying monitoring.0006_monitoring_path_text... OK
>> Applying monitoring.0007_monitoring_exception_message... OK
>> Applying monitoring.0008_monitoring_notifications_check... OK
>> Applying monitoring.0009_sample_count... OK
>> Applying monitoring.0010_metric_unit... OK
>> Applying monitoring.0011_notification_def... OK
>> Applying monitoring.0012_notifications_service... OK
>> Applying monitoring.0013_notifications_def_description... OK
>> Applying monitoring.0014_notifications_emails... OK
>> Applying monitoring.0015_notification_grace_period... OK
>> Applying monitoring.0016_notification_severity... OK
>> Applying monitoring.0017_monitoring_notification_active... OK
>> Applying monitoring.0018_notification_check_def... OK
>> Applying monitoring.0019_notification_check_def_link... OK
>> Applying monitoring.0020_metric_description... OK
>> Applying monitoring.0021_auto_20180301_0932... OK
>> Applying monitoring.0022_service_last_check_default... OK
>> Applying oauth2_provider.0001_initial... OK
>> Applying oauth2_provider.0002_08_updates... OK
>> Applying oauth2_provider.0003_auto_20160316_1503... OK
>> Applying oauth2_provider.0004_auto_20160525_1623... OK
>> Applying oauth2_provider.0005_auto_20170514_1141... OK
>> Applying oauth2_provider.0006_auto_20170903_1632... OK
>> Applying oauth2_provider.0007_application_algorithm... OK
>> Applying oauth2_provider.0008_idtoken... OK
>> Applying oauth2_provider.0006_auto_20171214_2232... OK
>> Applying oauth2_provider.0009_merge_20180606_1314... OK
>> Applying people.0025_auto_20170924_0932... OK
>> Applying people.0026_auto_20171120_0730... OK
>> Applying people.0027_auto_20180414_2120... OK
>> Applying people.0028_auto_20180606_1543... OK
>> Applying pinax_notifications.0001_initial... OK
>> Applying pinax_notifications.0002_auto_20171003_2006... OK
>> Applying services.0031_auto_20180301_1947... OK
>> Applying services.0032_auto_20180302_0430... OK
>> Applying services.0031_service_proxy_base... OK
>> Applying services.0033_merge... OK
>> Applying services.0034_auto_20180309_0917... OK
>> Applying services.0035_auto_20180327_0846... OK
>> Applying services.0036_auto_20180331_1039... OK
>> Applying services.0037_auto_20180409_1238... OK
>> Applying services.0038_auto_20180412_0822... OK
>> Applying services.0039_auto_20180414_2120... OK
>> Applying sessions.0001_initial... OK
>> Applying socialaccount.0001_initial... OK
>> Applying socialaccount.0002_token_max_lengths... OK
>> Applying socialaccount.0003_extra_data_default_dict... OK
>> Applying tastypie.0001_initial... OK
>> Applying upload.24_initial... OK
>> Applying user_messages.0001_initial... OK
>> Applying user_messages.0002_auto_20171107_1128... OK
>> Applying user_messages.0003_auto_20171108_1037... OK
>> Applying user_messages.0004_auto_20171108_1101... OK
>> actstream: Converting data to use native TEXT field
>>
>>
>> However I ran ./manage.py migrate sites --settings=geonode.local_settings one more time and didm't show anything weird:
>>
>> Operations to perform:
>> Apply all migrations: sites
>> Running migrations:
>> No migrations to apply.
>>
>>
>> I ran sudo WORKON_HOME=/home/geoportal/Envs/geonode DJANGO_SETTINGS_MODULE=geonode.local_settings GEONODE_ETC=/home/geoportal/geonode/geonode GEOSERVER_DATA_DIR=/var/lib/tomcat8/webapps/geoserver/data geonode_updateip -p 10.8.11.66 and got different error this time:
>>
>> PUBLIC_IP http://10.8.11.66 <http://10.8.11.66/>
>> LOCAL_IP http://localhost <http://localhost/>
>> Replacing SITEURL value with 'http://10.8.11.66 <http://10.8.11.66/>' in /home/geoportal/geonode/geonode/local_settings.py ... done.
>> Adding entry for '10.8.11.66' in /var/lib/tomcat8/webapps/geoserver/data/printing/config.yaml ... '10.8.11.66' already found to the printing whitelist.
>> Setting up oauth
>> Waiting Tomcat Service to Restart...
>> Waiting Apache HTTPD Service to Restart...
>> Traceback (most recent call last):
>> File "/home/geoportal/Envs/geonode/bin/django-admin", line 11, in <module>
>> sys.exit(execute_from_command_line())
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
>> utility.execute()
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
>> self.execute(*args, **cmd_options)
>> File "/home/geoportal/Envs/geonode/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
>> output = self.handle(*args, **options)
>> File "/home/geoportal/geonode/geonode/geoserver/management/commands/updatelayers.py", line 98, in handle
>> owner = get_valid_user(user)
>> File "/home/geoportal/geonode/geonode/people/utils.py", line 44, in get_valid_user
>> theuser = get_default_user()
>> File "/home/geoportal/geonode/geonode/people/utils.py", line 35, in get_default_user
>> raise GeoNodeException('You must have an admin account configured '
>> geonode.GeoNodeException: You must have an admin account configured before importing data. Try: django-admin.py createsuperuser
>>
>> Yes, /home/geoportal/ is the root of my geonode.
>>
>> less /etc/apache2/sites-available/geonode.conf looks like this:
>>
>> WSGIDaemonProcess geonode python-path=/home/geoportal/geonode:/home/geoportal/Envs/geonode/lib/python2.7/site-packages user=www-data threads=15 processes
>> =2
>>
>> <VirtualHost *:80>
>> ServerName http://localhost <http://localhost/>
>> ServerAdmin webmaster at localhost
>> DocumentRoot /home/geoportal/geonode/geonode
>>
>> LimitRequestFieldSize 32760
>> LimitRequestLine 32760
>>
>> ErrorLog /var/log/apache2/error.log
>> LogLevel info
>> CustomLog /var/log/apache2/access.log combined
>>
>> WSGIProcessGroup geonode
>> WSGIPassAuthorization On
>> WSGIScriptAlias / /home/geoportal/geonode/geonode/wsgi.py
>>
>> Alias /static/ /home/geoportal/geonode/geonode/static_root/
>> Alias /uploaded/ /home/geoportal/geonode/geonode/uploaded/
>>
>> <Directory "/home/geoportal/geonode/geonode/">
>> <Files wsgi.py>
>> Order deny,allow
>> Allow from all
>> Require all granted
>> </Files>
>>
>> Order allow,deny
>> Options Indexes FollowSymLinks
>> Allow from all
>> IndexOptions FancyIndexing
>> </Directory>
>>
>> <Directory "/home/geoportal/geonode/geonode/static_root/">
>> Order allow,deny
>> Options Indexes FollowSymLinks
>> Allow from all
>> Require all granted
>> IndexOptions FancyIndexing
>> </Directory>
>>
>> <Directory "/home/geoportal/geonode/geonode/uploaded/thumbs/">
>> Order allow,deny
>> Options Indexes FollowSymLinks
>> Allow from all
>> Require all granted
>> IndexOptions FancyIndexing
>> </Directory>
>>
>> <Directory "/home/geoportal/geonode/geonode/uploaded/avatars/">
>> Order allow,deny
>> Options Indexes FollowSymLinks
>> Allow from all
>> Require all granted
>> IndexOptions FancyIndexing
>> </Directory>
>>
>> <Directory "/home/geoportal/geonode/geonode/uploaded/people_group/">
>> Order allow,deny
>> Options Indexes FollowSymLinks
>> Allow from all
>> Require all granted
>> IndexOptions FancyIndexing
>> </Directory>
>>
>> <Directory "/home/geoportal/geonode/geonode/uploaded/group/">
>> Order allow,deny
>> Options Indexes FollowSymLinks
>> Allow from all
>> Require all granted
>> IndexOptions FancyIndexing
>> </Directory>
>>
>> <Directory "/home/geoportal/geonode/geonode/uploaded/documents/">
>> Order allow,deny
>> Options Indexes FollowSymLinks
>> Allow from all
>> Require all granted
>> IndexOptions FancyIndexing
>> </Directory>
>>
>> <Directory "/home/geoportal/geonode/geonode/uploaded/layers/">
>> Order allow,deny
>> Options Indexes FollowSymLinks
>> Allow from all
>> Require all granted
>> IndexOptions FancyIndexing
>> </Directory>
>>
>> <Directory "/home/geoportal/geonode/geonode/uploaded/img/">
>> Order allow,deny
>> Options Indexes FollowSymLinks
>> Allow from all
>> Require all granted
>> IndexOptions FancyIndexing
>> </Directory>
>>
>> <Proxy *>
>> Order allow,deny
>> Allow from all
>> </Proxy>
>>
>> ProxyPreserveHost On
>> ProxyPass /geoserver http://localhost:8080/geoserver <http://localhost:8080/geoserver>
>> ProxyPassReverse /geoserver http://localhost:8080/geoserver <http://localhost:8080/geoserver>
>>
>> </VirtualHost>
>>
>>
>> apachectl configtest shows this:
>>
>> AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.8.11.66. Set the 'ServerName' directive globally to suppress this message
>> Syntax OK
>>
>>
>> Many thanks for all your help.
>>
>> Kind Regards,
>>
>> José
>>
>>
>>
>> <https://mailtrack.io/?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&> Remitente notificado con
>> Mailtrack <https://mailtrack.io/?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&> 02/12/18 09:12:00
>>
>> On Sun, Dec 2, 2018 at 2:45 AM Toni Schönbuchner <toni.schoenbuchner at csgis.de <mailto:toni.schoenbuchner at csgis.de>> wrote:
>> Hi Jose,
>>
>>> I'm not sure if the last part, when it says that found another file, is because I have already runing this command, although the error that I send in my first email happen the first time I run the command.
>>
>> This could be as you already run it before.
>> Coming back to you error before:
>>
>>> django.db.utils.ProgrammingError: relation "django_site" does not exist
>>
>>
>> My guess, geonode.settings is using the local sqlite development.db database:
>> https://github.com/GeoNode/geonode/blob/master/geonode/settings.py#L104 <https://github.com/GeoNode/geonode/blob/master/geonode/settings.py#L104>
>>
>> Here migration have been applied and site is correctly setup. local_settings is using
>> postgresql and the migration are missing there .
>>
>> Can you check
>> ./manage.py migrate sites --settings=geonode.local_settings
>> ./manage.py migrate --settings=geonode.local_settings
>>
>>
>>> I can access http://my_ip/geoserver <http://my_ip/geoserver> site just fine, but I cannot access http://my_ip <http://my_ip/> as it shows a "500 Internal Server Error"
>>
>> The error 500 looks like ALLOWED_HOSTS setting is missing your IP.
>> https://github.com/GeoNode/geonode/blob/master/geonode/local_settings.py.geoserver.sample#L52 <https://github.com/GeoNode/geonode/blob/master/geonode/local_settings.py.geoserver.sample#L52>
>>
>> My guess it´s geonode.settings which is still in use. This because of either wsgi.py pointing to settings or a missconfigured vhost (see below).
>>
>>> I do have a doubt with this line:
>>>
>>> GEONODE_SRC_PATH="\/my\/opt_path"; sudo sed -i -e "s/\/home\/geo/$GEONODE_SRC_PATH/g" /etc/apache2/sites-available/geonode.conf
>>>
>>> I know my/opth_path is where I deploy my geonode but the /home/geo will alway be the same? Or that directory also depends on my local installation?
>>
>> the sed is /OLD-TEXT/NEW-TEXT/
>> means it´s using the var GEONODE_SRC_PATH as replacement for /home/geo.
>> In other words after that /home/geo should be repaced everywhere with /my/opt/
>> in /etc/apache2/sites/available/geonode.conf
>>
>> If /home/geoportal is in your case the root for your geonode (?) the correct command should be
>>
>> $ GEONODE_SRC_PATH="\/home\/geoportal/"; sudo sed -i -e "s/\/home\/geo/$GEONODE_SRC_PATH/g" /etc/apache2/sites-available/geonode.conf
>>
>> # should not find anything
>> $ grep "home/geo" /etc/apache2/sites-available/geonode.conf
>>
>> # check your config
>> $ less /etc/apache2/sites-available/geonode.conf
>> $ apachectl configtest
>> $ sudo service apache2 restart
>>
>>
>> Let me know if this works for you.
>>
>> Cheers,
>>
>> Toni
>>
>>
>>
>>
>>
>>
>>
>> --
>> José David Cáceres
>> Ingeniero Ambiental
>> Máster en Tecnologías de la Información Geográfica
>> e-mail: jose.atyus at gmail.com <mailto:jose.atyus at gmail.com>
>>
>> --
>> José David Cáceres
>> Ingeniero Ambiental
>> Máster en Tecnologías de la Información Geográfica
>> e-mail: jose.atyus at gmail.com <mailto:jose.atyus at gmail.com>
>
>
> --
> José David Cáceres
> Ingeniero Ambiental
> Máster en Tecnologías de la Información Geográfica
> e-mail: jose.atyus at gmail.com <mailto:jose.atyus at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20181206/c4e32a17/attachment-0001.html>
More information about the geonode-users
mailing list