-
Notifications
You must be signed in to change notification settings - Fork 213
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
"network error" cant login / register #1734
Comments
Same happens with this compose file:
|
The original docker configuration is correct. Your Client is running in your browser, not your Docker network, using If your server is running on the sane machine as your client then the host is |
Hello @ajhollid , thank you very much for your support. I have changed the server string to localhost, so my full compose looks like:
My nginx configuration is the same: Unfortunately the behavior remains the same as described in my first post
Dont I need to set up SMTP configuration through environment variables? I saw on the documentation they were needed, for development. But not for docker deployment. Is a smtp server bundled within the container? Client logs:
db logs:
redis logs:
server logs:
stack: I am deploying through portainer, if that makes any difference. Thanks again! |
Hi @audricd , No problem. I have no idea how portainer works, but you do need to expose the required ports in the docker compose file. You have a purely networking issue, your Client cannot communicate with your server for whatever reason. I don't know the specifics of your network and providing network support is beyond the scope of what we can do, but I would start by pinging your various services and seeing if they are reachable. If you can't ping the server at localhost:5000 then your server either isn't running at localhost 5000 or there is something on your network blocking your request. Hope that helps you track it down! |
On another note, I would try just using vanilla docker compose with the provided docker compose file and seeing if the problem is with portainer. That will help narrow down the possibilities. |
I see, thanks! Well just sharing in case it can enlighten anyone else: Following your advice, I have used the default compose file:
They are only two modifications:
Unfortunately, the behavior is exactly the same. And the issue is not nginx: I have tried to register, and login through serverip:880, and same result. So I am very confused. Default, with ports exposed, doesnt work either. For the record, on paper, my modified compose should work:
Why? Because all containers can see each other with the hostname I have set: The other two containers do no have ping installed so I cannot troubleshoot in that direction |
@audricd there is no issue with the Docker network, as I can see from your logs the Server is reaching the MongoDB docker container and connecting correctly. The issue is between your Client, which is not in your Docker network, and the Server. The server operates on a port, default 5000. The Docker container must expose this port, or the Client will not be able to connect to it. If you change what ports/hosts your Server operates on you must update your configuration to reflect that. You do not need to ping the Server container from the Client container. All the Client container does is start an nginx instance that serves the Client application to your browser. To resolve this issue you need to find out why you cannot connect to your Server container from wherever your client is running. In your case this is almost certainly your browser running on your local machine, so you should ping from your local machine to whatever host/port you've set your Server to operate on. By default this is Hope that helps clarify what the issue is and helps you track it down. |
hmmm I am taking down every step possible and doing everything as most out of the box possible. I am ditching portainer all together.
I have ONLY set the ports for client on the host to 880 and 4443 instead of 80 and 443 because these are busy already. I still get network error. And at the initial loading of the page, I am directed to login instead of register. is there anywhere in the code anything that makes that if the port number of the container and the host do not match to not work...? if so, I dont really get the point of having a docker solution. they are still two things I fail to understand, despite sorry its obvious: I am not an expert:
|
Changing port 80 and 443 is fine, that only affects what ports you bind to 80 and 443 which is obviously working as intended as you can connect to your sever.
No, I do not believe so. As for your questions:
[Application] -----> [Docker Network containing Server exposing port 5000] The Application and the Docker Network are both on the same machine (presumably) so you need to connect to localhost:5000 which is forwarded to the Server container in your Docker network. I hope that makes sense. The reason we use container names for the the connection strings for Redis and Mongo is that the Server, Redis, and Mongo are all within the Docker network. [Application] -------> [Server, Redis, Mongo] so when the Server needs to talk to Redis or Mongo, it uses the container name as you described, which is correct for applications running in the Docker network.
My suggestion for starting to resovle this is to first figure out if your server is actually reachable at |
Describe the bug
Cannot register / use
To Reproduce
Steps to reproduce the behavior:
modifications explained:
UPTIME_APP_API_BASE_URL: "http://localhost:5000/api/v1"
toUPTIME_APP_API_BASE_URL: "http://server:5000/api/v1"
, as the container hostname (should be?) is server, as per the service name in the stackI have also tried to expose all ports and go to serverip:80, but the behavior is exactly the same
After registering (manually going to /register) , I go to login (weirdly enough, I am not redirected to it. After clicking register, the register invite appears. again), and this error show up:
Expected behavior
As per this documentation: https://docs.checkmate.so/users-guide/troubleshooting#q-i-installed-checkmate-but-i-dont-see-the-registration-page-to-sign-up-for-the-first-time I should be redirected to the registration page. However, I am redirected to the login page.
Yet, I go to /register manually, fill in the fields, and I expected to be able to login, without the "network error" message
Screenshots
see above
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: