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

Upload failure: saved_layer is None #4241

Closed
frafra opened this issue Feb 18, 2019 · 10 comments
Closed

Upload failure: saved_layer is None #4241

frafra opened this issue Feb 18, 2019 · 10 comments
Labels
docker Issues specific to GeoNode docker or GeoNode SPC major A high priority issue which might affect a lot of people or large parts of the codebase

Comments

@frafra
Copy link
Contributor

frafra commented Feb 18, 2019

Running SPCGeonode, GeoNode commit 287708d (Jan 15 2019).

File "./geonode/layers/views.py" in layer_upload
294. out[_k] = out[_k].decode(saved_layer.charset).encode("utf-8")
Exception Type: AttributeError at /layers/upload Exception Value: 'NoneType' object has no attribute 'charset'

I also see some errors on GeoServer:

18 Feb 13:08:19 DEBUG [geoserver.rest] - Failed to lookup template WorkspaceInfo
java.io.FileNotFoundException: Template WorkspaceInfo not found.
@afabiani afabiani added regression Issues related to regressions. major A high priority issue which might affect a lot of people or large parts of the codebase docker Issues specific to GeoNode docker or GeoNode SPC and removed regression Issues related to regressions. labels Feb 20, 2019
@frafra
Copy link
Contributor Author

frafra commented Mar 5, 2019

I see similar errors on GeoServer, like:

DEBUG [geoserver.rest] - Failed to lookup template g250_90.ftl,
java.io.FileNotFoundException: Template g250_90.ftl not found.

Before that I read:

WARN [common.sender] - Error while trying to initialize RabbitMQ Sender Connecton,
java.net.ConnectException: Connection refused (Connection refused)

RabbitMQ says:

[info] <0.589.0> connection <0.589.0> (10.0.0.16:41466 -> 10.0.0.186:5672): user 'guest' authenticated and granted access to vhost '/',
[warning] <0.565.0> closing AMQP connection <0.565.0> (10.0.0.16:41462 -> 10.0.0.186:5672, vhost: '/', user: 'guest'):,
client unexpectedly closed TCP connection

...and...

[error] <0.589.0> closing AMQP connection <0.589.0> (10.0.0.16:41466 -> 10.0.0.186:5672):,
missed heartbeats from client, timeout: 60s

@frafra
Copy link
Contributor Author

frafra commented Mar 5, 2019

I see the standard Geonode black bar on top, like I has been kicked out, with no possibility to login directly (CSRF error), so I have to refresh the page. https://screenshots.firefox.com/3GFdEpB6m6yAtxaF/nindocker02.nina.no

ASYNC_SIGNALS=False does not mitigate the issue.

@frafra
Copy link
Contributor Author

frafra commented Mar 5, 2019

It looks like the Rabbit MQ error is not critical and can be ignored (it happens even in successful tests) and even the "file not found" message seems not relevant. A bit hard to debug with all these non-relevant errors :-) It is not a network issue either.

It seems to be linked with the data volumes, because using the same configuration with a different set of volumes fixes it; maybe some incompatibilities between 2.8 and current master.

@frafra
Copy link
Contributor Author

frafra commented Mar 8, 2019

I can confirm this error happens also on fresh and working docker setups. I just tried to upload an archive:

django_1      | Internal Server Error: /layers/upload
django_1      | Traceback (most recent call last):
django_1      |   File "/usr/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
django_1      |     response = get_response(request)
django_1      |   File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
django_1      |     response = self._get_response(request)
django_1      |   File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
django_1      |     response = self.process_exception_by_middleware(e, request)
django_1      |   File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
django_1      |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
django_1      |   File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapped_view
django_1      |     return view_func(request, *args, **kwargs)
django_1      |   File "./geonode/layers/views.py", line 300, in layer_upload
django_1      |     out[_k][key] = out[_k][key].decode(saved_layer.charset).encode("utf-8")
django_1      | AttributeError: 'ErrorList' object has no attribute 'decode'

@frafra
Copy link
Contributor Author

frafra commented Mar 28, 2019

Workaround: I created a fresh instance and moved the data with the aid of some tools I developed.

@frafra
Copy link
Contributor Author

frafra commented Mar 29, 2019

It seems hard to me to understand what could be the issue because GeoNode is not able to display its error properly. See: #4321

@gannebamm
Copy link
Contributor

I get those errors, too. I used SPC with ASYNC_SIGNALS=False and can confirm it does not change the outcome: I am unable to upload files and will be logged out by doing so.

@afabiani
Copy link
Member

@gannebamm any chance to test again with these changes?

#4353

@gannebamm
Copy link
Contributor

@afabiani My error was related to SSL misconfiguration. The message:

File "./geonode/layers/views.py" in layer_upload
294. out[_k] = out[_k].decode(saved_layer.charset).encode("utf-8")
Exception Type: AttributeError at /layers/upload Exception Value: 'NoneType' object has no attribute 'charset'

was just a culminating message, which was not related to the original failure.

@afabiani
Copy link
Member

@gannebamm yeps, that PR aims to avoid hiding those errors and trying to push up the original cause to the interface (as much as possible)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Issues specific to GeoNode docker or GeoNode SPC major A high priority issue which might affect a lot of people or large parts of the codebase
Projects
None yet
Development

No branches or pull requests

3 participants