Error creating the Docker image on MacOS— WSO2 Enterprise Integrator Tooling

Dakshika Jayathilaka
2 min readMay 6, 2019

--

With the latest WSO2 EI tooling you can generate the docker image on the fly. you can find the developer article on generating the docker for wso2 Enterprise Integrator(WSO2 EI) on Generate and deploy Docker images using WSO2 EI Tooling in four easy steps

Sometimes you may face to generic error notification saying “Error creating the Docker image”. If you select Window -> Show View -> Errors, you can see the error pane like below.

Enable Error pane on wso2 EI tooling

Click on the error message to see the details.

org.wso2.developerstudio.eclipse.esb.docker.exceptions.DockerImageGenerationException: Could not create the Docker image bundle file.
at org.wso2.developerstudio.eclipse.esb.docker.util.DockerImageGenerator.buildImage(DockerImageGenerator.java:273)
at org.wso2.developerstudio.eclipse.esb.docker.util.DockerImageGenerator.generateDockerImage(DockerImageGenerator.java:202)
at org.wso2.developerstudio.eclipse.esb.docker.job.GenerateDockerImageJob.run(GenerateDockerImageJob.java:141)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: com.spotify.docker.client.exceptions.DockerException: java.io.IOException: Cannot run program “docker-credential-osxkeychain”: error=2, No such file or directory
at com.spotify.docker.client.auth.ConfigFileRegistryAuthSupplier.authForBuild(ConfigFileRegistryAuthSupplier.java:108)
at com.spotify.docker.client.DefaultDockerClient.build(DefaultDockerClient.java:1483)
at com.spotify.docker.client.DefaultDockerClient.build(DefaultDockerClient.java:1460)
at org.wso2.developerstudio.eclipse.esb.docker.util.DockerImageGenerator.buildImage(DockerImageGenerator.java:249)
… 3 more
Caused by: java.io.IOException: Cannot run program “docker-credential-osxkeychain”: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:450)
at java.lang.Runtime.exec(Runtime.java:347)
at com.spotify.docker.client.SystemCredentialHelperDelegate.exec(SystemCredentialHelperDelegate.java:140)
at com.spotify.docker.client.SystemCredentialHelperDelegate.get(SystemCredentialHelperDelegate.java:88)
at com.spotify.docker.client.DockerCredentialHelper.get(DockerCredentialHelper.java:119)
at com.spotify.docker.client.DockerConfigReader.authWithCredentialHelper(DockerConfigReader.java:282)
at com.spotify.docker.client.DockerConfigReader.authForAllRegistries(DockerConfigReader.java:166)
at com.spotify.docker.client.auth.ConfigFileRegistryAuthSupplier.authForBuild(ConfigFileRegistryAuthSupplier.java:106)
… 6 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
… 15 more

Seems root cause is java.io.IOException: Cannot run program “docker-credential-osxkeychain”

How to Fix the issue

This will occur due to normal docker UI installation in MacOs has a feature to store Docker credentials on Mac Keychain. So in order to fix this, we need to remove this option. Also, this will automatically be saved in your ~/.docker/config.json file

Uncheck the “Securely store Docker logins in MacOS keychain” option

~/.docker/config.json on this remove “credSstore” : “osxkeychain” part.

{
“credSstore” : “osxkeychain”,
“HttpHeaders” : {
“User-Agent” : “Docker-Client/18.09.1 (darwin)”
….

Now you can generate the Docker image on MacOS Using WSO2 Enterprise Integrator Tooling. Happy Integration….!

--

--