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

Bug: DRC enkelvoudigobject create met localhost domein. #537

Closed
JostCrow opened this issue Nov 7, 2018 · 6 comments

Comments

3 participants
@JostCrow
Copy link

commented Nov 7, 2018

Ik ben lokaal een enkelvoudigobject aan het creeeren. Nu krijg ik een 500 terug vanuit het drc. Dit komt omdat er een localhost domein wordt gebruikt. Dit wordt zo te zien niet afgevangen.

2018-11-07 14:17:36,550 ERROR django.request exception 19 139926493969288  Internal Server Error: /api/v1/enkelvoudiginformatieobjecten
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 171, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 79, in create_connection
    raise err
  File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 69, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 354, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.6/http/client.py", line 1239, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1285, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1234, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1026, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.6/http/client.py", line 964, in send
    self.connect()
  File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 196, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 180, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f4323dcc550>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 445, in send
    timeout=timeout
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 398, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8004): Max retries exceeded with url: /api/v1/catalogussen/7d7d3ac9-a08b-427a-b4e1-1dc406790285/informatieobjecttypen/cde28728-5519-4077-b529-1b4f09f41bf9 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f4323dcc550>: Failed to establish a new connection: [Errno 111] Connection refused',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 128, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/viewsets.py", line 103, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 483, in dispatch
    response = self.handle_exception(exc)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 443, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 480, in dispatch
    response = handler(request, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/mixins.py", line 20, in create
    serializer.is_valid(raise_exception=True)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/serializers.py", line 236, in is_valid
    self._validated_data = self.run_validation(self.initial_data)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/serializers.py", line 434, in run_validation
    value = self.to_internal_value(data)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/serializers.py", line 488, in to_internal_value
    validated_value = field.run_validation(primitive_value)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/fields.py", line 776, in run_validation
    return super(CharField, self).run_validation(data)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/fields.py", line 524, in run_validation
    self.run_validators(value)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/fields.py", line 538, in run_validators
    validator(value)
  File "/usr/local/lib/python3.6/site-packages/zds_schema/validators.py", line 105, in __call__
    response = link_fetcher(value, **self.extra)
  File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 512, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 622, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 513, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8004): Max retries exceeded with url: /api/v1/catalogussen/7d7d3ac9-a08b-427a-b4e1-1dc406790285/informatieobjecttypen/cde28728-5519-4077-b529-1b4f09f41bf9 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f4323dcc550>: Failed to establish a new connection: [Errno 111] Connection refused',))
@sergei-maertens

This comment has been minimized.

Copy link
Collaborator

commented Nov 7, 2018

Dit is een bekende Docker-limitatie, helaas. Op mac kan je dingen als host.docker.internal doen, maar op Linux is hier geen support voor.

Waarschijnlijk moeten we dit beter gaan documenteren, maar dat is de reden waarom VNG-Realisatie/gemma-zaken-test-integratie@5ceba23 moest gebeuren.

@JostCrow

This comment has been minimized.

Copy link
Author

commented Nov 7, 2018

Het probleem ging hier niet om dat localhost niet werkte. Meer dat het endpoint een 500 teruggaf. Dus daadwerkelijk crashten.

@sergei-maertens

This comment has been minimized.

Copy link
Collaborator

commented Nov 12, 2018

Ga ik normaal vandaag patchen dat er iig een niet 5xx uit komt

@ehotting

This comment has been minimized.

Copy link
Member

commented Nov 23, 2018

Bugs krijgen prio H ivm voorkomen tech debt. Wat is hiervan status @sergei-maertens ?

@ehotting ehotting added this to Backlog in 2. Scrum ZGW Voorbereiding via automation Nov 23, 2018

@sergei-maertens

This comment has been minimized.

Copy link
Collaborator

commented Nov 23, 2018

Nog niet aan toegekomen

@TCIMEddy TCIMEddy added this to Sprint 7 - demo 20 december 2018 in 1. Scrum ZGW Realisatie Huidige Sprint via automation Nov 24, 2018

@TCIMEddy TCIMEddy removed this from Backlog in 2. Scrum ZGW Voorbereiding Nov 24, 2018

@sergei-maertens sergei-maertens moved this from Sprint 7 - demo 20 december 2018 to In progress in 1. Scrum ZGW Realisatie Huidige Sprint Nov 26, 2018

@sergei-maertens

This comment has been minimized.

Copy link
Collaborator

commented Nov 27, 2018

#577 lost dit probleem structureel op

1. Scrum ZGW Realisatie Huidige Sprint automation moved this from In progress to Done - Sprint 7 Nov 28, 2018

@TCIMEddy TCIMEddy removed this from Done - Sprint 7 in 1. Scrum ZGW Realisatie Huidige Sprint Jan 2, 2019

@TCIMEddy TCIMEddy added this to Done - Sprint 7 in 3. Gereed en Archief Jan 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.