-
Notifications
You must be signed in to change notification settings - Fork 153
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
MinioClient: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:9000 #2
Comments
Attempting to use the browser localhost:8080 does not work, but I'm guessing that is because the microservice is not getting past the MinioClient connect operation. |
Please help. Any ideas on why this error is happening? |
@dwhitejazz sorry for the lack of response.. I was not getting notifications for this repo.. now I am.. |
@salaboy |
Where is minio configuration properties? |
@hendisantika you mean the Or the minio deployment here: https://github.com/learnk8s/knote-java/blob/04-05/kube/minio.yaml#L39 ? |
I have the same issue. Cannot connect to my local docker container running on http://localhost:9000. I always get the same error message "java.net.ConnectException: Failed to connect to localhost/127.0.0.1:9000" |
Faced the same problem and found its solution. In my case, I started 2 docker containers: one for the backend and the second for minio. When I specified the parameters for connecting minio, I also specified localhost:9000, but this is wrong! When minio starts, it outputs a log with parameters for connection, it looks something like this: minio_1 | MinIO Object Storage Server We are interested in 2 lines that I highlighted in bold, of which you should take the first host (http://172.18.0.2:9000 ) and then everything will work for you! |
@GetRhymes, Thanks!! |
I have been looking for an Microservice example that uses docker and kubernetes with minikube.
Working through this example I am stuck trying to run the microservice. The docker containers start up and run for mongodb and knote but the microservice always fails to connect with following exception:
This is probably a configuration issue on my end but I am unable to determine why this is happening and how to the resolve it. Perhaps related to localhost and a difference between 127.0.0.1 and 0.0.0.0?
My docker image is deployed:
knote-java latest ce9109e6c6df About an hour ago 393MB
Mongodb is running in a docker container:
2020-06-02T01:04:34.139+0000 I NETWORK [listener] Listening on 0.0.0.0
2020-06-02T01:04:34.139+0000 I NETWORK [listener] waiting for connections on port 27017
docker ps looks right too:
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c7b4df5e8318 knote-java "/bin/sh -c 'exec ja…" 32 seconds ago Up 30 seconds 0.0.0.0:8080->8080/tcp knote-java
23d5ed2a1fc5 mongo "docker-entrypoint.s…" 2 minutes ago Up 2 minutes 27017/tcp mongo
482ae31f5632 gcr.io/k8s-minikube/kicbase:v0.0.10 "/usr/local/bin/entr…" 6 days ago Up 4 minutes 127.0.0.1:32787->22/tcp, 127.0.0.1:32786->2376/tcp, 127.0.0.1:32785->5000/tcp, 127.0.0.1:32784->8443/tcp minikube
Any assistance is greatly appreciated. Thank you.
The text was updated successfully, but these errors were encountered: