-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
when i exec this ,
InspectContainerResponse inspectResponse = dockerClient.inspectContainerCmd(id).exec();
throws exception , like this.
java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.ValueInstantiationException: Cannot construct instance of com.github.dockerjava.api.model.Ports, problem: Error parsing ExposedPort '161/udp/tcp'
at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: com.github.dockerjava.api.command.InspectContainerResponse["HostConfig"]->com.github.dockerjava.api.model.HostConfig["PortBindings"])
Then, my container's info , 'HostConfig' likes this.
"HostConfig": {
"Binds": [
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "host",
"PortBindings": {
"161/udp/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "161"
}
]
},
......
From the error message, it can be seen that the port binding ‘161/udp/tcp’ parsing error occurred.
How to solve it?
Metadata
Metadata
Assignees
Labels
No labels