Closed shyonae closed 1 year ago
Hi, I will test your setup and come back to you soon...
I think both containers should be in one network. You only add the piglet container to your shyDockerServer Network. And the piglet db container will get an ip of the default docker network. So they cannot communicate to each other :)
I think both containers should be in one network. You only add the piglet container to your shyDockerServer Network. And the piglet db container will get an ip of the default docker network. So they cannot communicate to each other :)
Ah you're right! I don't know how that escaped my sights, I'll try when I get home and update the issue, thanks
It worked, but now I'm having another kind of problem, this happens when I try to create a new user:
################################# DEBUG ############################## 4
INFO: 127.0.0.1:55782 - "POST /user/register_user HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/webapp/api/routes/sendmail.py", line 61, in mail
s = SMTP(host, int(port))
ValueError: invalid literal for int() with base 10: ''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
return await self.app(scope, receive, send)
File "/usr/lib/python3.10/site-packages/fastapi/applications.py", line 289, in __call__
await super().__call__(scope, receive, send)
File "/usr/lib/python3.10/site-packages/starlette/applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in __call__
raise exc
File "/usr/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "/usr/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
raise exc
File "/usr/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "/usr/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
raise e
File "/usr/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
await self.app(scope, receive, send)
File "/usr/lib/python3.10/site-packages/starlette/routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "/usr/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/usr/lib/python3.10/site-packages/fastapi/routing.py", line 273, in app
raw_response = await run_endpoint_function(
File "/usr/lib/python3.10/site-packages/fastapi/routing.py", line 190, in run_endpoint_function
return await dependant.call(**values)
File "/webapp/api/routes/user.py", line 72, in register_user
mail(payload)
File "/webapp/api/routes/sendmail.py", line 69, in mail
except SMTPResponseException as e:
NameError: name 'SMTPResponseException' is not defined
And these are the logs for the DB:
2023-08-22 12:31:24 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'unauthenticated' host:
'172.22.0.3' (This connection closed normally without authentication)
2023-08-22 12:31:35 9 [Warning] Aborted connection 9 to db: 'piglet' user: 'piglet' host: '' (Got an error reading communication packets)
2023-08-22 12:32:31 10 [Warning] Aborted connection 10 to db: 'piglet' user: 'piglet' host: '' (Got an error reading communication packets)
2023-08-22 12:34:09 16 [Warning] Aborted connection 16 to db: 'piglet' user: 'piglet' host: '' (Got an error reading communication packets)
Any ideas on what I might be doing wrong? The passwords are the same. If this is for another issue, I'll open it and close this :)
Ou yes this is another issue. Please create a new one. The app is trying to send a "Email-Verify-Mail" but it can't without config. I have to update the code. But the user was created right?
Hi everyone, here's my compose:
And here are the container logs:
piglet:
piglet-db:
Why doesn't the Piglet main container connect? I've basically used the default compose + some networking stuff.