Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error module encodings not found with manual install ubuntu 22.04 when try to activate uwsgi #12078

Open
imperialbeachca opened this issue Mar 22, 2024 · 1 comment

Comments

@imperialbeachca
Copy link

imperialbeachca commented Mar 22, 2024

Expected Behavior

I have installed Geoserver successfully and went through the steps to install and initialize geonode. I think that it went correctly, though I'm not completely sure. The next step is to install uwsgi and nginx and have them be able to properly serve Geonode on my domain.

Actual Behavior

I have Geoserver installed and working properly. I install Geonode and initialize apparently successfully. When I then install UWSGI and try to start it up, I receive an error related to python that it is not able to find the module 'encodings'. The searching I have done shows this error appears to be related to where django is looking for python in the virtual environment. I just don't know how to fix the problem successfully. I've tried multiple installations of this and at this point, am getting stopped at the same place each time.

Steps to Reproduce the Problem

  1. Geonode Advanced Install and Geosolutions Training Steps. Install Dependencies
  2. Install Postgresl
  3. Install Geoserver
  4. Install Geonode and initialize
  5. Install UWSGI
  6. Attempt to start UWSGI and view log files. Log show that UWSGI had fatal error because python module encodings was not found.

Specifications

  • GeoNode version: 4.2.x
  • Installation type (vanilla, geonode-project): vanilla
  • Installation method (manual, docker): manual
  • Platform: AWS EC2 - Ubuntu 22.04
  • Additional details: Python 3.10.12, GDAL 3.6.4, Java - Openjdk 11.0.22, UWSGI - 2.0.20-debian
  • I have added a text file of the install process I've used up to this point.

I don't know if this is the proper place to put this issue, but I haven't received responses on the mailing list or Gitter page, so this seems to be my last option. I've attempted this install 7 or 8 times now with no luck.

20240229_IB_AWS_GeoNode_Install_MattiaGiupponi_Instructions.txt

@singhdonald
Copy link

Folks I have a similar issue with GeoNode UWSGI Service.
I have managed to replicate steps 1 to 4 when using https://docs.geonode.org/en/4.2.x/install/advanced/index.html. However I cannot get past "Serving {“geonode”, “geoserver”} via NGINX".
Your help would be greatly appreciated!

Please see my geonode log here;

*** Starting uWSGI 2.0.20-debian (64bit) on [Thu Mar 28 18:26:10 2024] ***
compiled with version: 11.2.0 on 21 March 2022 11:00:44
os: Linux-5.15.0-101-generic #111-Ubuntu SMP Tue Mar 5 20:16:58 UTC 2024
nodename: geoportal
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /
detected binary path: /usr/bin/uwsgi-core
uWSGI running as root, you can use --uid/--gid/--chroot options
setgid() to 33
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
chdir() to /opt/geonode
your processes number limit is 63412
your memory page size is 4096 bytes
*** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers ***
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
probably another instance of uWSGI is running on the same address (0.0.0.0:8000).
bind(): Address already in use [core/socket.c line 769]
Traceback (most recent call last):
File "/home/donald/.virtualenvs/geonode/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedTable: relation "monitoring_host" does not exist
LINE 1: ...oring_host"."ip", "monitoring_host"."active" FROM "monitorin...

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/geonode/./geonode/wsgi.py", line 29, in
application = get_wsgi_application()
File "/home/donald/.virtualenvs/geonode/lib/python3.10/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
return WSGIHandler()
File "/home/donald/.virtualenvs/geonode/lib/python3.10/site-packages/django/core/handlers/wsgi.py", line 127, in init
self.load_middleware()
File "/home/donald/.virtualenvs/geonode/lib/python3.10/site-packages/django/core/handlers/base.py", line 58, in load_middleware
mw_instance = middleware(adapted_handler)
File "/opt/geonode/./geonode/monitoring/middleware.py", line 48, in init
self.setup_logging()
File "/opt/geonode/./geonode/monitoring/middleware.py", line 55, in setup_logging
self.service = self.get_service()
File "/opt/geonode/./geonode/monitoring/middleware.py", line 64, in get_service
host = Host.objects.get(name=hname)
File "/home/donald/.virtualenvs/geonode/lib/python3.10/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/donald/.virtualenvs/geonode/lib/python3.10/site-packages/django/db/models/query.py", line 431, in get
num = len(clone)
File "/home/donald/.virtualenvs/geonode/lib/python3.10/site-packages/django/db/models/query.py", line 262, in len
self._fetch_all()
File "/home/donald/.virtualenvs/geonode/lib/python3.10/site-packages/django/db/models/query.py", line 1324, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/home/donald/.virtualenvs/geonode/lib/python3.10/site-packages/django/db/models/query.py", line 51, in iter
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
File "/home/donald/.virtualenvs/geonode/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/home/donald/.virtualenvs/geonode/lib/python3.10/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/home/donald/.virtualenvs/geonode/lib/python3.10/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/donald/.virtualenvs/geonode/lib/python3.10/site-packages/django/db/backends/utils.py", line 79, in _execute
with self.db.wrap_database_errors:
File "/home/donald/.virtualenvs/geonode/lib/python3.10/site-packages/django/db/utils.py", line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/donald/.virtualenvs/geonode/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: relation "monitoring_host" does not exist
LINE 1: ...oring_host"."ip", "monitoring_host"."active" FROM "monitorin...
^

unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. GAME OVER ***

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants