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

Problème pour run l'incubateur en local #199

Closed
altf4arnold opened this issue Nov 5, 2020 · 2 comments
Closed

Problème pour run l'incubateur en local #199

altf4arnold opened this issue Nov 5, 2020 · 2 comments

Comments

@altf4arnold
Copy link
Member

Hello,

J'ai suivi la doc du README pour faire fonctionner l'incubateur. ./manage.py migrate run normalement, tout OK. Je runserver, il se lance et quand je l'ouvre dans un browser, il me dit : a server error occured.

Les logs sur mon terminal me disent ça :

Traceback (most recent call last):
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/utils/deprecation.py", line 93, in __call__
    response = self.process_request(request)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/middleware/common.py", line 48, in process_request
    host = request.get_host()
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/http/request.py", line 122, in get_host
    raise DisallowedHost(msg)
django.core.exceptions.DisallowedHost: Invalid HTTP_HOST header: 'localhost:8000'. You may need to add 'localhost' to ALLOWED_HOSTS.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/connection.py", line 539, in connect
    sock = self._connect()
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/connection.py", line 565, in _connect
    for res in socket.getaddrinfo(self.host, self.port, self.socket_type,
  File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/core/handlers/exception.py", line 108, in get_exception_response
    response = callback(request, **{**param_dict, 'exception': exception})
  File "/home/arnold/incubator/incubator/views.py", line 15, in view
    response = render(request, "error.html", {'code': code, 'message': msg})
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/shortcuts.py", line 19, in render
    content = loader.render_to_string(template_name, context, request, using=using)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/template/loader.py", line 62, in render_to_string
    return template.render(context, request)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/template/backends/django.py", line 61, in render
    return self.template.render(context)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/template/base.py", line 169, in render
    with context.bind_template(self):
  File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/template/context.py", line 246, in bind_template
    updates.update(processor(self.request))
  File "/home/arnold/incubator/space/context_processors.py", line 7, in state
    "space_open": space_is_open(client),
  File "/home/arnold/incubator/space/djredis.py", line 53, in space_is_open
    return int(client.get('incubator_status')) == 1
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/client.py", line 1332, in get
    return self.execute_command('GET', name)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/client.py", line 836, in execute_command
    conn = self.connection or pool.get_connection(command_name, **options)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/connection.py", line 1073, in get_connection
    connection.connect()
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/connection.py", line 544, in connect
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error -2 connecting to rainbowdash.lan:6379. Name or service not known.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/connection.py", line 539, in connect
    sock = self._connect()
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/connection.py", line 565, in _connect
    for res in socket.getaddrinfo(self.host, self.port, self.socket_type,
  File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/utils/deprecation.py", line 94, in __call__
    response = response or self.get_response(request)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/core/handlers/exception.py", line 36, in inner
    response = response_for_exception(request, exc)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/core/handlers/exception.py", line 82, in response_for_exception
    response = get_exception_response(request, get_resolver(get_urlconf()), 400, exc)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/core/handlers/exception.py", line 111, in get_exception_response
    response = handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/core/handlers/exception.py", line 129, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/home/arnold/incubator/incubator/views.py", line 15, in view
    response = render(request, "error.html", {'code': code, 'message': msg})
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/shortcuts.py", line 19, in render
    content = loader.render_to_string(template_name, context, request, using=using)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/template/loader.py", line 62, in render_to_string
    return template.render(context, request)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/template/backends/django.py", line 61, in render
    return self.template.render(context)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/template/base.py", line 169, in render
    with context.bind_template(self):
  File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/template/context.py", line 246, in bind_template
    updates.update(processor(self.request))
  File "/home/arnold/incubator/space/context_processors.py", line 7, in state
    "space_open": space_is_open(client),
  File "/home/arnold/incubator/space/djredis.py", line 53, in space_is_open
    return int(client.get('incubator_status')) == 1
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/client.py", line 1332, in get
    return self.execute_command('GET', name)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/client.py", line 836, in execute_command
    conn = self.connection or pool.get_connection(command_name, **options)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/connection.py", line 1073, in get_connection
    connection.connect()
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/connection.py", line 544, in connect
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error -2 connecting to rainbowdash.lan:6379. Name or service not known.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/connection.py", line 539, in connect
    sock = self._connect()
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/connection.py", line 565, in _connect
    for res in socket.getaddrinfo(self.host, self.port, self.socket_type,
  File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/wsgiref/handlers.py", line 137, in run
    self.result = application(self.environ, self.start_response)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 133, in __call__
    response = self.get_response(request)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/core/handlers/base.py", line 75, in get_response
    response = self._middleware_chain(request)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/core/handlers/exception.py", line 36, in inner
    response = response_for_exception(request, exc)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/core/handlers/exception.py", line 129, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/home/arnold/incubator/incubator/views.py", line 15, in view
    response = render(request, "error.html", {'code': code, 'message': msg})
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/shortcuts.py", line 19, in render
    content = loader.render_to_string(template_name, context, request, using=using)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/template/loader.py", line 62, in render_to_string
    return template.render(context, request)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/template/backends/django.py", line 61, in render
    return self.template.render(context)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/template/base.py", line 169, in render
    with context.bind_template(self):
  File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/django/template/context.py", line 246, in bind_template
    updates.update(processor(self.request))
  File "/home/arnold/incubator/space/context_processors.py", line 7, in state
    "space_open": space_is_open(client),
  File "/home/arnold/incubator/space/djredis.py", line 53, in space_is_open
    return int(client.get('incubator_status')) == 1
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/client.py", line 1332, in get
    return self.execute_command('GET', name)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/client.py", line 836, in execute_command
    conn = self.connection or pool.get_connection(command_name, **options)
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/connection.py", line 1073, in get_connection
    connection.connect()
  File "/home/arnold/incubator/ve3/lib/python3.8/site-packages/redis/connection.py", line 544, in connect
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error -2 connecting to rainbowdash.lan:6379. Name or service not known.
[05/Nov/2020 21:23:52] "GET / HTTP/1.1" 500 59

J'ai une idée de ce qui peut le provoquer mais pas ce qui peut résoudre le problème. Une idée?

@Mortinat
Copy link
Contributor

Mortinat commented Nov 5, 2020

tu peux me donner ce que contient ta variable local FAKE_REDIS

@altf4arnold
Copy link
Member Author

C'était ça. C'était les variables locales qui étaient pétées

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