Comments (15)
I have just verified that build on Linux works.
If you open the docker perspective is the connection to the docker daemon working?
from org.eclipse.linuxtools.
Everything is working perfectly in the Docker perspective. I can also build images from a Local Terminal in Eclipse. It's just when I use a Run Configuration or Run As -> Build Docker Image, that the issue occurs.
from org.eclipse.linuxtools.
Could you please try using https://download.eclipse.org/linuxtools/updates-docker-nightly/ ? We have recently migrated to docker-client 5.x (for September release) so hopefully this makes a difference for you.
from org.eclipse.linuxtools.
from org.eclipse.linuxtools.
You may need https://download.eclipse.org/eclipse/downloads/drops4/I20230809-1800/ in order to get other 2023-09 content.
from org.eclipse.linuxtools.
Would you recommend to proceed with the proposed update below on my 2023-03 install (with the latest updates) or proceed with a fresh install using one of the downloads from https://download.eclipse.org/eclipse/downloads/drops4/I20230809-1800/ ? (which one?)
from org.eclipse.linuxtools.
Use a clean separate install for testing. As you're on Windows https://download.eclipse.org/eclipse/downloads/drops4/I20230809-1800/download.php?dropFile=eclipse-SDK-I20230809-1800-win32-x86_64.zip is probably best to start with.
from org.eclipse.linuxtools.
I've tried on fresh installs of
https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2023-06/R/eclipse-inst-jre-win64.exe
with https://tools.jboss.org/downloads/jbosstools/2023-06/4.28.0.Final.html
"Run As -> Docker Build Image" fails with error log:
eclipse.buildId=4.28.0.20230608-1200
java.version=17.0.8
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=nl_BE
Framework arguments: -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -data file:/C:/cegeka/workspaces/test2023-06/ -product org.eclipse.epp.package.jee.product
org.eclipse.core.jobs
Error
Thu Aug 10 15:25:22 CEST 2023
An internal error occurred during: "Building Docker Image".
java.lang.NullPointerException: configs value
at java.base/java.util.Objects.requireNonNull(Objects.java:235)
at org.mandas.docker.client.messages.ImmutableRegistryConfigs$Builder.addConfig(ImmutableRegistryConfigs.java:145)
at org.mandas.docker.client.messages.ImmutableRegistryConfigs$Builder.addConfig(ImmutableRegistryConfigs.java:116)
at org.mandas.docker.client.DockerConfigReader.authForAllRegistries(DockerConfigReader.java:140)
at org.mandas.docker.client.auth.ConfigFileRegistryAuthSupplier.authForBuild(ConfigFileRegistryAuthSupplier.java:107)
at org.mandas.docker.client.DefaultDockerClient.build(DefaultDockerClient.java:1413)
at org.eclipse.linuxtools.internal.docker.core.DockerConnection.buildImage(DockerConnection.java:1478)
at org.eclipse.linuxtools.internal.docker.ui.jobs.BuildDockerImageJob.run(BuildDockerImageJob.java:163)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
and
https://download.eclipse.org/eclipse/downloads/drops4/I20230809-1800/download.php?dropFile=eclipse-SDK-I20230809-1800-win32-x86_64.zip
with https://tools.jboss.org/downloads/jbosstools/2023-09/4.29.x.Nightly.html and https://download.eclipse.org/linuxtools/updates-docker-nightly/
"Run As -> Docker Build Image" also fails with error log:
eclipse.buildId=4.29.0.I20230809-1800
java.version=17.0.8
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=nl_BE
Command-line arguments: -os win32 -ws win32 -arch x86_64 -data file:/C:/cegeka/workspaces/test2023-09/
org.eclipse.core.jobs
Error
Thu Aug 10 15:55:18 CEST 2023
An internal error occurred during: "Building Docker Image".
java.lang.NullPointerException: configs value
at java.base/java.util.Objects.requireNonNull(Objects.java:235)
at org.mandas.docker.client.messages.ImmutableRegistryConfigs$Builder.addConfig(ImmutableRegistryConfigs.java:145)
at org.mandas.docker.client.messages.ImmutableRegistryConfigs$Builder.addConfig(ImmutableRegistryConfigs.java:116)
at org.mandas.docker.client.DockerConfigReader.authForAllRegistries(DockerConfigReader.java:141)
at org.mandas.docker.client.auth.ConfigFileRegistryAuthSupplier.authForBuild(ConfigFileRegistryAuthSupplier.java:107)
at org.mandas.docker.client.DefaultDockerClient.build(DefaultDockerClient.java:1224)
at org.eclipse.linuxtools.internal.docker.core.DockerConnection.buildImage(DockerConnection.java:1478)
at org.eclipse.linuxtools.internal.docker.ui.jobs.BuildDockerImageJob.run(BuildDockerImageJob.java:163)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
from org.eclipse.linuxtools.
So this issue is not fixed by docker-client update. Unfortunately, I don't have access to Windows machine to try it out thus would you please consider debugging the issue yourself.
I'll be happy to apply a PR or help as much as I can.
from org.eclipse.linuxtools.
Sure, here are already a few findings that may point to a solution. Could the buildParameters being empty, and dockerCredentialHelperAuth being null, somehow be related?
from org.eclipse.linuxtools.
@cegeka-jd You must have a.config.json file with "auths" entries.
Code in stack trace from: DockerConfigReader.authForAllRegistries()
// If there are any objects in "auths", they could take two forms.
// Older auths will map registry keys to objects with "auth" values, sometimes emails.
// Newer auths will map registry keys to empty objects. They expect you
// to use the credsStore to authenticate.
if (hasAuths) {
// We will use this empty RegistryAuth to check for empty auth values
final RegistryAuth empty = RegistryAuth.builder().build();
for (final Map.Entry<String, RegistryAuth> authEntry : auths.entrySet()) {
final String registry = authEntry.getKey();
if (addedRegistries.contains(registry)) {
continue;
}
addedRegistries.add(registry);
final RegistryAuth registryAuth = authEntry.getValue();
if (registryAuth == null || registryAuth.equals(empty)) {
// We have an empty object. Can we use credsStore?
if (hasCredsStore) {
registryConfigsBuilder.addConfig(registry, // <--- this line is causing a null check failure
authWithCredentialHelper(credsStore, registry));
} // no else clause. If we can't fall back to credsStore, we can't auth.
} else {
// The auth object isn't empty.
// We need to add the registry to its properties, then
// add it to the RegistryConfigs
registryConfigsBuilder.addConfig(registry,
registryAuth.toBuilder().serverAddress(registry).build());
}
}
}
The following for you is returning null for a registry in your "auths" specification.
private RegistryAuth authWithCredentialHelper(final String credsStore,
final String registry) throws IOException {
final DockerCredentialHelperAuth dockerCredentialHelperAuth =
DockerCredentialHelper.get(credsStore, registry);
return dockerCredentialHelperAuth == null ? null : dockerCredentialHelperAuth.toRegistryAuth();
}
The DockerCredentionalHelper code does an exec using the credsStore and passes the registry.
public DockerCredentialHelperAuth get(final String credsStore, final String registry)
throws IOException {
final Process process = exec("get", credsStore);
try (final Writer outStreamWriter =
new OutputStreamWriter(process.getOutputStream(), StandardCharsets.UTF_8)) {
try (final BufferedWriter writer = new BufferedWriter(outStreamWriter)) {
writer.write(registry);
writer.newLine();
writer.flush();
}
}
try (final InputStreamReader reader =
new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8)) {
try (BufferedReader input = new BufferedReader(reader)) {
return readServerAuthDetails(input);
}
}
}
It is not reading the server auth details and is returning null. Admittedly, the docker-client code could have failed more gracefully but there is something wrong with your configuration.
Please check your config.json file to ensure you have a proper credsStore specified and the "auths" specification does not have invalid registry specifications.
from org.eclipse.linuxtools.
Thanks Jeff, I noticed I was logged out in Docker Desktop, and after logging in with my pro tier account, and also storing some credentials in a different workspace to connect to a new project in Git, I can again build Docker images using Run Configurations.
I'm not sure what exactly solved it, but I'm guessing it's eighter something not being enabled in Docker Desktop when not logged in or not using a pro tier account, or the secure registry had an old incorrect credential that was replaced via the prompt when it asked for credentials to connect to Git in the new workspace. In any case, indeed, a more graceful handling of this exception may have helped to identify the cause.
from org.eclipse.linuxtools.
Is there a reason to keep this one open?
from org.eclipse.linuxtools.
I'm going to say it should be closed as the logic to handle this better is on the docker-client side so a bug should be opened there.
from org.eclipse.linuxtools.
And we are 2 major versions behind on it so it might even been improved already.
from org.eclipse.linuxtools.
Related Issues (20)
- Ask for help: Have trouble setting the target platform on Eclipse RCP IDE HOT 8
- Fail to create Source Tarballs of sub-project. HOT 7
- Any plan to support gcov or gprof tools with prefix HOT 8
- Attempt to open terminal for running container fails HOT 4
- Linuxtools docker resolution problem HOT 6
- HttpHijackWorkaround failing after switch to maven dependencies and docker-client 5.2.2
- Docker Tooling needs to be able to run a command and do a copy with seccomp=undefined
- Convert RedDeer tests to SWTbot ones or pure JUnit ones where feasible HOT 3
- Add support for syntax highlighting for Containerfile HOT 5
- Filename Dockerfile.tmLanguage in sources is interpreted as Dockerfile HOT 1
- Docker Tooliing failing on Docker 4.27 for Apple Silicon HOT 11
- What is the format of a. out file? HOT 5
- With the latest version of Docker Desktop the images cannot be retrieved (while the containers still can) HOT 1
- java.lang.NoClassDefFoundError error when running maven build HOT 1
- New warnings in stderr HOT 11
- Is it possible to draw callgraph for gprof output gmon.out using linuxtools callgraph plugin HOT 5
- When checking the program's call relationships, there is an issue. HOT 1
- I would like to compile the org.eclipse.linuxtools project myself. How should I proceed? HOT 5
- Docker Tools no longer works with the latest Eclipse version HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org.eclipse.linuxtools.