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

Can't send email #2882

Closed
GitHK opened this issue Mar 10, 2022 · 1 comment · Fixed by #2926 or #2965
Closed

Can't send email #2882

GitHK opened this issue Mar 10, 2022 · 1 comment · Fixed by #2926 or #2965
Assignees
Labels
bug buggy, it does not work as expected
Milestone

Comments

@GitHK
Copy link
Contributor

GitHK commented Mar 10, 2022

Missing "From" header in email, most likely caused by how the mapping between old and new settings occurs.

ERROR: simcore_service_webserver.login.handlers:reset_password(234) - Cannot send email
Traceback (most recent call last):
  File "/home/scu/.venv/lib/python3.8/site-packages/simcore_service_webserver/login/handlers.py", line 200, in reset_password
    raise web.HTTPUnprocessableEntity(
aiohttp.web_exceptions.HTTPUnprocessableEntity: This email is not registered
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/scu/.venv/lib/python3.8/site-packages/simcore_service_webserver/login/handlers.py", line 224, in reset_password
    await render_and_send_mail(
  File "/home/scu/.venv/lib/python3.8/site-packages/simcore_service_webserver/login/utils.py", line 104, in render_and_send_mail
    await compose_mail(request.app, to, subject.strip(), body)
  File "/home/scu/.venv/lib/python3.8/site-packages/simcore_service_webserver/login/utils.py", line 59, in compose_mail
    await send_mail(app, msg)
  File "/home/scu/.venv/lib/python3.8/site-packages/simcore_service_webserver/login/utils.py", line 151, in send_mail
    await smtp.send_message(msg)
  File "/home/scu/.venv/lib/python3.8/site-packages/aiosmtplib/smtp.py", line 255, in send_message
    raise ValueError("No From header provided in message")
ValueError: No From header provided in message
ERROR: servicelib.aiohttp.monitoring:middleware_handler(216) - Unexpected server error "<class 'aiohttp.web_exceptions.HTTPServiceUnavailable'>" from access: 10.6.38.46 "POST /v0/auth/reset-password" done in 0.62 secs. Responding with status 503
Traceback (most recent call last):
  File "/home/scu/.venv/lib/python3.8/site-packages/simcore_service_webserver/login/handlers.py", line 200, in reset_password
    raise web.HTTPUnprocessableEntity(
aiohttp.web_exceptions.HTTPUnprocessableEntity: This email is not registered
INFO: gunicorn.access:log(206) - 10.6.38.46 [10/Mar/2022:15:33:55 +0000] "POST /v0/auth/reset-password HTTP/1.1" 503 514 [623888us] "https://osparc-master.speag.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/scu/.venv/lib/python3.8/site-packages/simcore_service_webserver/login/handlers.py", line 224, in reset_password
    await render_and_send_mail(
  File "/home/scu/.venv/lib/python3.8/site-packages/simcore_service_webserver/login/utils.py", line 104, in render_and_send_mail
    await compose_mail(request.app, to, subject.strip(), body)
  File "/home/scu/.venv/lib/python3.8/site-packages/simcore_service_webserver/login/utils.py", line 59, in compose_mail
    await send_mail(app, msg)
  File "/home/scu/.venv/lib/python3.8/site-packages/simcore_service_webserver/login/utils.py", line 151, in send_mail
    await smtp.send_message(msg)
  File "/home/scu/.venv/lib/python3.8/site-packages/aiosmtplib/smtp.py", line 255, in send_message
    raise ValueError("No From header provided in message")
ValueError: No From header provided in message
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/scu/.venv/lib/python3.8/site-packages/servicelib/aiohttp/monitoring.py", line 170, in middleware_handler
    resp = await handler(request)
  File "/home/scu/.venv/lib/python3.8/site-packages/aiozipkin/aiohttp_helpers.py", line 157, in aiozipkin_middleware
    resp = await handler(request)
  File "/home/scu/.venv/lib/python3.8/site-packages/aiohttp_session/__init__.py", line 172, in factory
    raise response
  File "/home/scu/.venv/lib/python3.8/site-packages/aiohttp_session/__init__.py", line 154, in factory
    response = await handler(request)
  File "/home/scu/.venv/lib/python3.8/site-packages/servicelib/aiohttp/rest_middlewares.py", line 75, in _middleware_handler
    response = await handler(request)
  File "/home/scu/.venv/lib/python3.8/site-packages/servicelib/aiohttp/rest_middlewares.py", line 203, in _middleware_handler
    resp: _ResponseOrBodyData = await handler(request)
  File "/home/scu/.venv/lib/python3.8/site-packages/simcore_service_webserver/meta_modeling_projects.py", line 84, in projects_redirection_middleware
    response = await handler(request)
  File "/home/scu/.venv/lib/python3.8/site-packages/simcore_service_webserver/products.py", line 97, in discover_product_middleware
    response = await handler(request)
  File "/home/scu/.venv/lib/python3.8/site-packages/simcore_service_webserver/utils_rate_limiting.py", line 69, in wrapper
    return await decorated_function(*args, **kwargs)
  File "/home/scu/.venv/lib/python3.8/site-packages/simcore_service_webserver/login/handlers.py", line 235, in reset_password
    raise web.HTTPServiceUnavailable(reason=cfg.MSG_CANT_SEND_MAIL) from err
aiohttp.web_exceptions.HTTPServiceUnavailable: Can't send email, try a little later
Stack (most recent call last):
  File "/home/scu/.venv/bin/gunicorn", line 8, in <module>
    sys.exit(run())
  File "/home/scu/.venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 67, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/home/scu/.venv/lib/python3.8/site-packages/gunicorn/app/base.py", line 231, in run
    super().run()
  File "/home/scu/.venv/lib/python3.8/site-packages/gunicorn/app/base.py", line 72, in run
    Arbiter(self).run()
  File "/home/scu/.venv/lib/python3.8/site-packages/gunicorn/arbiter.py", line 202, in run
    self.manage_workers()
  File "/home/scu/.venv/lib/python3.8/site-packages/gunicorn/arbiter.py", line 551, in manage_workers
    self.spawn_workers()
  File "/home/scu/.venv/lib/python3.8/site-packages/gunicorn/arbiter.py", line 622, in spawn_workers
    self.spawn_worker()
  File "/home/scu/.venv/lib/python3.8/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
    worker.init_process()
  File "/home/scu/.venv/lib/python3.8/site-packages/aiohttp/worker.py", line 51, in init_process
    super().init_process()
  File "/home/scu/.venv/lib/python3.8/site-packages/gunicorn/workers/base.py", line 142, in init_process
    self.run()
  File "/home/scu/.venv/lib/python3.8/site-packages/aiohttp/worker.py", line 57, in run
    self.loop.run_until_complete(self._task)
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 603, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1859, in _run_once
    handle._run()
  File "/home/scu/.venv/lib/python3.8/site-packages/servicelib/aiohttp/monitor_slow_callbacks.py", line 30, in instrumented
    retval = _run(self)
  File "/home/scu/.venv/lib/python3.8/site-packages/aiodebug/log_slow_callbacks.py", line 18, in instrumented
    retval = _run(self)
  File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/home/scu/.venv/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/home/scu/.venv/lib/python3.8/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/home/scu/.venv/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/home/scu/.venv/lib/python3.8/site-packages/servicelib/aiohttp/monitoring.py", line 216, in middleware_handler
    log.error(
@GitHK GitHK added bug buggy, it does not work as expected changelog:🐛bugfix labels Mar 10, 2022
@GitHK GitHK self-assigned this Mar 10, 2022
@GitHK
Copy link
Contributor Author

GitHK commented Mar 10, 2022

FYI @mrnicegyu11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug buggy, it does not work as expected
Projects
None yet
2 participants