Open francucchi opened 5 years ago
Hi @francucchi!
It seems a problem on the KeyRock configuration/deployment. The stack trace is telling you that WireCloud received a 500 error (an internal server error) response from KeyRock when making the request to http://192.168.5.205:3005/oauth2/token.
Please, check the logs of keyrock for more details.
Hi @aarranz ! thanks for your reply. Sorry for the delay in getting back to you but it took me some time to replace the keyrock docker image with a more updated revision available on github which has now solved the 500 Internal Server Error. Unfortunately a new error is appearing after the authentication through keyrock:
Environment:
Request Method: GET Request URL: http://192.168.5.205/complete/fiware/?code=cd89222715de84ab3495025a1d49127015f87568&state=PymRXOcThJfteE3Gbvowc1BM2BJFuG6b
Django Version: 1.11.18 Python Version: 3.6.8 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'wirecloud.commons', 'compressor', 'wirecloud.catalogue', 'wirecloud.platform', 'wirecloud.fiware', 'social_django', 'haystack', 'wirecloud_pubsub') Installed Middleware: ('wirecloud.commons.middleware.URLMiddleware',)
Traceback:
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
File "/usr/local/lib/python3.6/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
File "/usr/local/lib/python3.6/site-packages/social_django/utils.py" in wrapper
File "/usr/local/lib/python3.6/site-packages/social_django/views.py" in complete
File "/usr/local/lib/python3.6/site-packages/social_core/actions.py" in do_complete
File "/usr/local/lib/python3.6/site-packages/social_core/backends/base.py" in complete
File "/usr/local/lib/python3.6/site-packages/social_core/utils.py" in wrapper
File "/usr/local/lib/python3.6/site-packages/social_core/backends/oauth.py" in auth_complete
File "/usr/local/lib/python3.6/site-packages/social_core/backends/oauth.py" in validate_state
Exception Type: AuthStateMissing at /complete/fiware/ Exception Value: Session value state missing.
I have already implemented the workaround for:
SESSION_COOKIE_NAME = "wcsessionid" CSRF_COOKIE_NAME = "wccsrftoken"
but problem still appears.
Any idea?
Thanks again
Hello, I'm running dockerized images of wirecloud+nginx and keyrock (with OAuth2) and I'm having some issues probably related to gunicorn running in the wirecloud image. Here's below the stack trace:
Environment:
Request Method: GET Request URL: http://192.168.5.205/complete/fiware/?code=787979c8344a72a03386f1a4863e8c1a82f2851f&state=AIx9Oo103l7biQT8XOzCqNg0A0XkUrH0
Django Version: 1.11.18 Python Version: 3.6.8 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'wirecloud.commons', 'compressor', 'wirecloud.catalogue', 'wirecloud.platform', 'wirecloud.fiware', 'social_django', 'haystack', 'wirecloud_pubsub') Installed Middleware: ('wirecloud.commons.middleware.URLMiddleware',)
Traceback:
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
File "/usr/local/lib/python3.6/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
File "/usr/local/lib/python3.6/site-packages/social_django/utils.py" in wrapper
File "/usr/local/lib/python3.6/site-packages/social_django/views.py" in complete
File "/usr/local/lib/python3.6/site-packages/social_core/actions.py" in do_complete
File "/usr/local/lib/python3.6/site-packages/social_core/backends/base.py" in complete
File "/usr/local/lib/python3.6/site-packages/social_core/utils.py" in wrapper
File "/usr/local/lib/python3.6/site-packages/social_core/backends/oauth.py" in auth_complete
File "/usr/local/lib/python3.6/site-packages/social_core/backends/oauth.py" in request_access_token
File "/usr/local/lib/python3.6/site-packages/social_core/backends/base.py" in get_json
File "/usr/local/lib/python3.6/site-packages/social_core/backends/base.py" in request
File "/usr/local/lib/python3.6/site-packages/requests/models.py" in raise_for_status
Exception Type: HTTPError at /complete/fiware/ Exception Value: 500 Server Error: Internal Server Error for url: http://192.168.5.205:3005/oauth2/token
I have all the cookies:
The only clear error appearing in the info is below:
where 172.18.1.11 is internal IP address of wirecloud and 172.18.1.15 is internal IP address of nginx.
Any idea?
Thanks