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

Starting services locally with docker-compose failed on Windows 10 #183

Closed
valsaraj opened this issue Jul 13, 2021 · 11 comments
Closed

Starting services locally with docker-compose failed on Windows 10 #183

valsaraj opened this issue Jul 13, 2021 · 11 comments
Labels

Comments

@valsaraj
Copy link

When executed the below command error comes:
mvnw clean install -P buildDocker

[INFO] Reactor Summary:
[INFO]
[INFO] spring-petclinic-microservices 2.4.5 ............... SUCCESS [ 0.364 s]
[INFO] spring-petclinic-admin-server ...................... FAILURE [ 29.504 s]
[INFO] spring-petclinic-customers-service ................. SKIPPED
[INFO] spring-petclinic-vets-service ...................... SKIPPED
[INFO] spring-petclinic-visits-service .................... SKIPPED
[INFO] spring-petclinic-config-server ..................... SKIPPED
[INFO] spring-petclinic-discovery-server .................. SKIPPED
[INFO] spring-petclinic-api-gateway 2.4.5 ................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30.629 s
[INFO] Finished at: 2021-07-13T09:26:28+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:1.2.0:build (default) on project spring-petclinic-admin-server: Exception caught: Head https://registry-1.docker.io/v2/library/openjdk/manifests/11-jre: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fopenjdk%3Apull&service=registry.docker.io: net/http: request canceled (Client.Timeout exceeded while awaiting headers) -> [Help 1]

Docker for Windows is used (Expose daemon on tcp://localhost:2375 without TLS)
image

@arey
Copy link
Member

arey commented Jul 14, 2021

Hi @valsaraj Did you solve your issue?
Maybe may we migrate to a more recent plugin or to Buildpacks. Spofity recommends to switch to the dockerfile-maven

@timwildberger
Copy link

I have the same issue. @arey, do you have any recommendations on how to solve this problem?

My error is similar:
discovery-server | Error: Could not find or load main class org.springframework.boot.loader.JarLauncher
discovery-server | Caused by: java.lang.ClassNotFoundException: org.springframework.boot.loader.JarLauncher
discovery-server | 2021/07/27 11:30:57 Command exited with error: exit status 1
discovery-server exited with code 1

@arey
Copy link
Member

arey commented Sep 12, 2021

I'm sorry. I'm developing on MacOS and thus I cannot reproduce your issue.
Which version of Docker are you using?
And does the command docker pull hello-world is working?

@ramazansakin
Copy link
Contributor

Hi @valsaraj ,

I had the same issue first but after some research I found that just you need to do is:
On Docker-Desktop/Setings/General

Tick this value : Expose daemon on tcp://localhost:2375 without TLS

@ramazansakin
Copy link
Contributor

Hi @arey ,

Like these general problem for all OSs, can you make a like Frequently Occurred Problems section on Readme.
Because if this works for @valsaraj , this issue may be closed soon after that and this disappeared and if another one still
occurs this issue , he/she create a new ticket again and again :)
Thanks

@arey
Copy link
Member

arey commented Sep 29, 2021

Hi @ramazansakin thank you for having found a solution to this issue.
I'm OK to add a FAQ to the readme.md. Could you please take it in charge and submit a PR?

@ramazansakin
Copy link
Contributor

Ok, sure but lets see if it works for @valsaraj and maybe also for Mac :)

@valsaraj
Copy link
Author

valsaraj commented Sep 29, 2021

@ramazansakin
I ticked it already as per the screenshot in the ticket description. Unfortunately that didn't worked.
It worked for me when I switched to another faster network connection. So there is something related to that with Docker in my Windows 10 machine. I took latest Docker update but still have problem on that network connection but works fine on another faster network.
@arey FYI
Thank you all for checking on this.

@ramazansakin
Copy link
Contributor

Hi again after a long time :) ,

I think @valsaraj has another problem as I understand and what about you @timwildberger , could you solve the problem ?
Again I checked the "mvn clean install -P buildDocker" command and gets error without the tick of "Expose daemon on tcp://localhost:2375 without TLS" after ticking that it run again and produced all the images.

@arey
Copy link
Member

arey commented Jun 19, 2022

Hi @valsaraj Do you find a solution?

@arey arey added the question label Jun 19, 2022
@valsaraj
Copy link
Author

Hi @valsaraj Do you find a solution?

@arey #183 (comment)
As I mentioned here, it resolved when I switched to faster network. The error I faced was due to timeout. After changing network, docker run worked fine.

@arey arey closed this as completed Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants