eamena-project / eamena-arches-dev

development repository of the EAMENA Arches-powered database platform
https://eamena.org/home
GNU Affero General Public License v3.0
5 stars 3 forks source link

Internal Server Error - error 500 #44

Open zoometh opened 9 months ago

zoometh commented 9 months ago

The URL https://database.eamena.org/search gave an Internal Server Error

Looking in the Apache2 log:

sudo tail -n 20 /var/log/apache2/error.log

Gave:

[Fri Jan 26 05:42:32.415395 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]     lookup = lookup_class(lhs, rhs)
[Fri Jan 26 05:42:32.415397 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]   File "/opt/arches/ENV/lib/python3.8/site-packages/django/db/models/lookups.py", line 25, in __init__
[Fri Jan 26 05:42:32.415400 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]     self.rhs = self.get_prep_lookup()
[Fri Jan 26 05:42:32.415402 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]   File "/opt/arches/ENV/lib/python3.8/site-packages/django/db/models/lookups.py", line 77, in get_prep_lookup
[Fri Jan 26 05:42:32.415406 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]     return self.lhs.output_field.get_prep_value(self.rhs)
[Fri Jan 26 05:42:32.415408 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]   File "/opt/arches/ENV/lib/python3.8/site-packages/django/db/models/fields/__init__.py", line 2418, in get_prep_value
[Fri Jan 26 05:42:32.415411 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]     return self.to_python(value)
[Fri Jan 26 05:42:32.415413 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]   File "/opt/arches/ENV/lib/python3.8/site-packages/django/db/models/fields/__init__.py", line 2436, in to_python
[Fri Jan 26 05:42:32.415416 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]     raise exceptions.ValidationError(
[Fri Jan 26 05:42:32.415419 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891] django.core.exceptions.ValidationError: ['\xe2\x80\x9c34cfea78-c2c0-11ea-9026-02e7594ce0a0\xe2\x80\x9d is not a valid UUID.']
ubuntu@ip-172-31-39-197:/opt/arches$ sudo tail -n 20 /var/log/apache2/error.log
[Fri Jan 26 05:42:32.415365 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]     clause, _ = self._add_q(q_object, self.used_aliases)
[Fri Jan 26 05:42:32.415368 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]   File "/opt/arches/ENV/lib/python3.8/site-packages/django/db/models/sql/query.py", line 1435, in _add_q
[Fri Jan 26 05:42:32.415371 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]     child_clause, needed_inner = self.build_filter(
[Fri Jan 26 05:42:32.415376 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]   File "/opt/arches/ENV/lib/python3.8/site-packages/django/db/models/sql/query.py", line 1288, in build_filter
[Fri Jan 26 05:42:32.415379 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]     return self._add_q(
[Fri Jan 26 05:42:32.415382 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]   File "/opt/arches/ENV/lib/python3.8/site-packages/django/db/models/sql/query.py", line 1435, in _add_q
[Fri Jan 26 05:42:32.415384 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]     child_clause, needed_inner = self.build_filter(
[Fri Jan 26 05:42:32.415387 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]   File "/opt/arches/ENV/lib/python3.8/site-packages/django/db/models/sql/query.py", line 1370, in build_filter
[Fri Jan 26 05:42:32.415390 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]     condition = self.build_lookup(lookups, col, value)
[Fri Jan 26 05:42:32.415392 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]   File "/opt/arches/ENV/lib/python3.8/site-packages/django/db/models/sql/query.py", line 1216, in build_lookup
[Fri Jan 26 05:42:32.415395 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]     lookup = lookup_class(lhs, rhs)
[Fri Jan 26 05:42:32.415397 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]   File "/opt/arches/ENV/lib/python3.8/site-packages/django/db/models/lookups.py", line 25, in __init__
[Fri Jan 26 05:42:32.415400 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]     self.rhs = self.get_prep_lookup()
[Fri Jan 26 05:42:32.415402 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]   File "/opt/arches/ENV/lib/python3.8/site-packages/django/db/models/lookups.py", line 77, in get_prep_lookup
[Fri Jan 26 05:42:32.415406 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]     return self.lhs.output_field.get_prep_value(self.rhs)
[Fri Jan 26 05:42:32.415408 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]   File "/opt/arches/ENV/lib/python3.8/site-packages/django/db/models/fields/__init__.py", line 2418, in get_prep_value
[Fri Jan 26 05:42:32.415411 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]     return self.to_python(value)
[Fri Jan 26 05:42:32.415413 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]   File "/opt/arches/ENV/lib/python3.8/site-packages/django/db/models/fields/__init__.py", line 2436, in to_python
[Fri Jan 26 05:42:32.415416 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891]     raise exceptions.ValidationError(
[Fri Jan 26 05:42:32.415419 2024] [wsgi:error] [pid 3422454:tid 281473531896208] [remote 139.47.114.203:15891] django.core.exceptions.ValidationError: ['\xe2\x80\x9c34cfea78-c2c0-11ea-9026-02e7594ce0a0\xe2\x80\x9d is not a valid UUID.']
zoometh commented 6 months ago

❗Server Error (500)

(ENV) root@ip-172-31-39-197:/opt/arches# tail -20 /var/log/apache2/error.log

Gives

[Tue Apr 30 00:00:31.412193 2024] [ssl:warn] [pid 147823:tid 281473101725712] AH01909: ip-172-31-39-197.eu-west-1.compute.internal:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 30 00:00:31.413067 2024] [mpm_event:notice] [pid 147823:tid 281473101725712] AH00489: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f mod_wsgi/4.6.8 Python/3.8 configured -- resuming normal operations
[Tue Apr 30 00:00:31.413083 2024] [core:notice] [pid 147823:tid 281473101725712] AH00094: Command line: '/usr/sbin/apache2'
[Mon Apr 29 19:17:43.751026 2024] [wsgi:error] [pid 2291450:tid 281473066750352] /opt/arches/ENV/lib/python3.8/site-packages/django/contrib/gis/shortcuts.py:10: UserWarning: NumPy was imported from a Python sub-interpreter but NumPy does not properly support sub-interpreters. This will likely work for most users but might cause hard to track down issues or subtle bugs. A common user of the rare sub-interpreter feature is wsgi which also allows single-interpreter mode.
[Mon Apr 29 19:17:43.751058 2024] [wsgi:error] [pid 2291450:tid 281473066750352] Improvements in the case of bugs are welcome, but is not on the NumPy roadmap, and full support may require significant effort to achieve.
[Mon Apr 29 19:17:43.751061 2024] [wsgi:error] [pid 2291450:tid 281473066750352]   import numpy
[Tue Apr 30 11:20:30.247155 2024] [authz_core:error] [pid 2291453:tid 281472686612880] [client 134.155.219.232:55611] AH01630: client denied by server configuration: /opt/arches/files, referer: https://database.eamena.org/search?paging-filter=1&tiles=true&format=tilecsv&reportlink=false&precision=6&total=368511&term-filter=%5B%7B%22inverted%22%3Afalse%2C%22type%22%3A%22string%22%2C%22context%22%3A%22%22%2C%22context_label%22%3A%22%22%2C%22id%22%3A%220b509735-78fa-42df-a770-d1f158916c0b%22%2C%22text%22%3A%220b509735-78fa-42df-a770-d1f158916c0b%22%2C%22value%22%3A%220b509735-78fa-42df-a770-d1f158916c0b%22%7D%5D&language=*
[Tue Apr 30 11:24:02.687014 2024] [authz_core:error] [pid 2291453:tid 281472686612880] [client 192.76.8.91:56260] AH01630: client denied by server configuration: /opt/arches/files, referer: https://database.eamena.org/search?paging-filter=1

A systemctl status apache2 shows that the Apache server was running

✔️ A service apache2 restart has fixed the error