Error when updating service: {"message":"invalid service version '': strconv.ParseUint: parsing \"\": invalid syntax"}
See original GitHub issueHi,
I’m trying to update existing service using following code:
protected static void restartProxy(){
var config = buildConfig();
DockerClient dockerClient = DockerClientImpl.getInstance(config, buildClient(config));
var bupsvc = dockerClient.listServicesCmd().withNameFilter(Arrays.asList("bupx_proxy")).exec().get(0);
log.info(version.toString());
dockerClient.updateServiceCmd(bupsvc.getId(), bupsvc.getSpec()).exec();
}
However, I’m always getting back the aforementioned error:
Exception in thread "main" com.github.dockerjava.api.exception.BadRequestException: Status 400: {"message":"invalid service version '': strconv.ParseUint: parsing \"\": invalid syntax"}
Output of the line log.info(version.toString())
is: INFO: 2504654
docker-java version: 3.2.7
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
"panic: strconv.ParseInt: parsing " ": invalid syntax" --> when ...
1. The error shows the string representation of what you're parsing, which obviously isn't a number. · @JimB how to convert int64 into...
Read more >Docker Swarm Scale Service using update API
Response: < HTTP/1.1 500 Internal Server Error {“message”:“Invalid service version '': strconv.ParseUint: parsing “”: invalid syntax”}.
Read more >Custom Vault plugin exiting on windows with strconv.ParseInt
ParseInt : parsing "": invalid syntax error ... This plugin have windows version, but when I'm trying to enable it on windows I'm...
Read more >Telegraf 1.16 and higher - error when starting
Hi, starting with version 1.16, the telegraf service crash with this ... ParseInt: parsing “Add”: invalid syntax goroutine 1 [running]: ...
Read more >strconv.ParseInt: parsing "": invalid syntax - Discuss Dgraph
Hi, I am running into a strange issue, version 1.0.6 (I know there are other issues with this release). I am querying a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@tduverge - thank you, this workaround helped!
Still feels like an issue though as the version info is already passed along in the service specs so this step is redundant and counter-intuitive.
Hi,
Same issue for me,
I did this to fix it :