Closed egeldenhuys closed 6 years ago
Problem: $ sudo dnf update
Solution: $ reboot
Nope, after the reboot it worked once. But trying the same Curl request some time later results in:
HTTP/1.1 500 Internal Server Error
X-Powered-By: Express
Access-Control-Allow-Origin: *
Content-Type: text/html; charset=utf-8
Content-Length: 69
ETag: W/"45-HZWxL3WnTJnv535ni9/w58zo2to"
Date: Wed, 19 Sep 2018 16:45:45 GMT
Connection: keep-alive
Creating network DASTACK_default
Creating service DASTACK_mahService
After sudo systemctl restart docker
stacks can be deployed using the Curl command with no problem. As soon as the stack is deployed from the UI, an error occurs and stacks can no longer be deployed using Curl.
Error deploying docker stack: Error: Command failed: docker stack deploy -c /tmp/1537375971079-64.yml STACK_FROM_UI
Preparing to deploy stack with name STACK_FROM_CURL
Error deploying docker stack: Error: Command failed: docker stack deploy -c /tmp/1537376071830-96.yml STACK_FROM_CURL
@devosray do you have any idea why the command is failing?
$ curl --no-buffer -XGET --unix-socket /var/run/docker.sock http:/v1.37/events
{"Type":"network","Action":"create","Actor":{"ID":"la9jj3u8kbfg9bsmhc0c7fq7l","Attributes":{"name":"THIS_STACK_HAS_FAILED_default"}},"scope":"swarm","time":1537378385,"timeNano":1537378385662707004}
{"Type":"network","Action":"update","Actor":{"ID":"la9jj3u8kbfg9bsmhc0c7fq7l","Attributes":{"name":"THIS_STACK_HAS_FAILED_default"}},"scope":"swarm","time":1537378385,"timeNano":1537378385694971893}
{"Type":"node","Action":"update","Actor":{"ID":"g6rd26vz1xc2p45ac9ruyq333","Attributes":{"name":"leonidas"}},"scope":"swarm","time":1537378385,"timeNano":1537378385731181868}
$ curl --no-buffer -XGET --unix-socket /var/run/docker.sock http:/v1.37/events
{"Type":"network","Action":"create","Actor":{"ID":"oabgbyx7z1saoptzneete7qke","Attributes":{"name":"STACK_GOOD_0_default"}},"scope":"swarm","time":1537378515,"timeNano":1537378515696081172}
{"Type":"network","Action":"update","Actor":{"ID":"oabgbyx7z1saoptzneete7qke","Attributes":{"name":"STACK_GOOD_0_default"}},"scope":"swarm","time":1537378515,"timeNano":1537378515713881539}
{"Type":"node","Action":"update","Actor":{"ID":"g6rd26vz1xc2p45ac9ruyq333","Attributes":{"name":"leonidas"}},"scope":"swarm","time":1537378515,"timeNano":1537378515724484413}
{"Type":"service","Action":"create","Actor":{"ID":"uy8spxiprgi3uihwkmowfhuuh","Attributes":{"name":"STACK_GOOD_0_mahService"}},"scope":"swarm","time":1537378520,"timeNano":1537378520385442386}
{"Type":"service","Action":"update","Actor":{"ID":"uy8spxiprgi3uihwkmowfhuuh","Attributes":{"name":"STACK_GOOD_0_mahService"}},"scope":"swarm","time":1537378520,"timeNano":1537378520412473780}
{"Type":"network","Action":"create","Actor":{"ID":"oabgbyx7z1saoptzneete7qke","Attributes":{"name":"STACK_GOOD_0_default","type":"overlay"}},"scope":"local","time":1537378521,"timeNano":1537378521619338138}
{"status":"create","id":"4f950a25fa80d448339a1b4d244e662f990b77fc34b089f46c886b61328ebf09","from":"nginx:latest@sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d3","Type":"container","Action":"create","Actor":{"ID":"4f950a25fa80d448339a1b4d244e662f990b77fc34b089f46c886b61328ebf09","Attributes":{"com.docker.stack.namespace":"STACK_GOOD_0","com.docker.swarm.node.id":"g6rd26vz1xc2p45ac9ruyq333","com.docker.swarm.service.id":"uy8spxiprgi3uihwkmowfhuuh","com.docker.swarm.service.name":"STACK_GOOD_0_mahService","com.docker.swarm.task":"","com.docker.swarm.task.id":"91fib0bbg01uv08rg1eicv3pg","com.docker.swarm.task.name":"STACK_GOOD_0_mahService.1.91fib0bbg01uv08rg1eicv3pg","image":"nginx:latest@sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d3","maintainer":"NGINX Docker Maintainers \u003cdocker-maint@nginx.com\u003e","name":"STACK_GOOD_0_mahService.1.91fib0bbg01uv08rg1eicv3pg"}},"scope":"local","time":1537378522,"timeNano":1537378522892833625}
{"Type":"network","Action":"connect","Actor":{"ID":"oabgbyx7z1saoptzneete7qke","Attributes":{"container":"4f950a25fa80d448339a1b4d244e662f990b77fc34b089f46c886b61328ebf09","name":"STACK_GOOD_0_default","type":"overlay"}},"scope":"local","time":1537378523,"timeNano":1537378523310455744}
{"status":"start","id":"4f950a25fa80d448339a1b4d244e662f990b77fc34b089f46c886b61328ebf09","from":"nginx:latest@sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d3","Type":"container","Action":"start","Actor":{"ID":"4f950a25fa80d448339a1b4d244e662f990b77fc34b089f46c886b61328ebf09","Attributes":{"com.docker.stack.namespace":"STACK_GOOD_0","com.docker.swarm.node.id":"g6rd26vz1xc2p45ac9ruyq333","com.docker.swarm.service.id":"uy8spxiprgi3uihwkmowfhuuh","com.docker.swarm.service.name":"STACK_GOOD_0_mahService","com.docker.swarm.task":"","com.docker.swarm.task.id":"91fib0bbg01uv08rg1eicv3pg","com.docker.swarm.task.name":"STACK_GOOD_0_mahService.1.91fib0bbg01uv08rg1eicv3pg","image":"nginx:latest@sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d3","maintainer":"NGINX Docker Maintainers \u003cdocker-maint@nginx.com\u003e","name":"STACK_GOOD_0_mahService.1.91fib0bbg01uv08rg1eicv3pg"}},"scope":"local","time":1537378524,"timeNano":1537378524097072146}
Temporary solution: Retry until it works
Curl request to localhost
Curl response from localhost
Curl response (Changed url and tokens) from docks.evert.io
Decoded stack file
Docker version on localhost
Docker version in container on localhost
Stack file for deploying Docks API
Docks API stack file on production