question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot create docker access object: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect

See original GitHub issue

Description

I am beginner to fabric8, trying to build an image for spring-boot app. Getting error : cannot create docker access object: trying from windows 10,

Info

[INFO] — fabric8-maven-plugin:4.3.0:build (default) @ lb-server — [WARNING] F8: Cannot access cluster for detecting mode: connect timed out [INFO] F8: Running in Kubernetes mode [INFO] F8: Building Container image with Docker in Kubernetes mode [WARNING] F8: Cannot access cluster for detecting mode: connect timed out [WARNING] F8: Cannot access cluster for detecting mode: connect timed out [ERROR] F8: Cannot create docker access object [Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 47.450 s [INFO] Finished at: 2019-10-20T01:10:05+05:30 [INFO] Final Memory: 49M/411M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal io.fabric8:fabric8-maven-plugin:4.3.0:build (default) on project lb-server: Cannot create docker access object: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging.

  • f-m-p version : 4.3.0
  • Maven version (mvn -v) :3

  • Kubernetes / OpenShift setup and version :

  • If it’s a bug, how to reproduce : <plugin> <groupId>io.fabric8</groupId> <artifactId>fabric8-maven-plugin</artifactId> <version>4.3.0</version> <configuration> <images> <image> <name>user/demo</name> <build> <dockerFileDir>.</dockerFileDir> <filter>@</filter> </build> </image> </images> <skipPush>true</skipPush> <dockerHost>${docker.host.address}</dockerHost>

                      <!--&lt;!&ndash;</createOptions>&ndash;&gt;-->
                  <!--</machine>-->
              </configuration>
              <executions>
                  <execution>
                      <goals>
                          <!--<goal>resource</goal>-->
                          <goal>help</goal>
                          <goal>build</goal>
                      </goals>
                  </execution>
              </executions>
          </plugin>
    

<docker.host.address>tcp://localhost:2375</docker.host.address>

mvn clean install

  • If it’s a feature request, what is your use case :
  • Sample project : [GitHub Clone URL]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:39 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
manusacommented, Dec 3, 2019

Hi @mohapsub I’m currently using remote docker environment(s) from my Windows 10 Home machine (where docker is not supported natively) In order to be able to use the Docker client with (for example) Minikube’s Docker daemon, you need to setup a couple of environment variables (just like @rohanKanojia mentioned).

Run the following command to check the values applicable for the Docker environment variables: minikube docker-env image

Now open your user system environment variable configuration and add those values:

image image

From now on, whenever you create a new process, you’ll be able to run any docker command successfully (docker ps, docker images, etc.)

FMP will detect these values too.

1reaction
mohapsubcommented, Dec 2, 2019

thanks my problem resolved long back, i was not very active. Thanks for posting this

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found