{"action":"created","issue":{"url":"https://api.github.com/repos/portainer/portainer/issues/1867","repository_url":"https://api.github.com/repos/portainer/portainer","labels_url":"https://api.github.com/repos/portainer/portainer/issues/1867/labels{/name}","comments_url":"https://api.github.com/repos/portainer/portainer/issues/1867/comments","events_url":"https://api.github.com/repos/portainer/portainer/issues/1867/events","html_url":"https://github.com/portainer/portainer/issues/1867","id":320595295,"number":1867,"title":"Duplicate containers with agent endpoint","user":{"login":"mrmachine","id":51939,"avatar_url":"https://avatars3.githubusercontent.com/u/51939?v=4","gravatar_id":"","url":"https://api.github.com/users/mrmachine","html_url":"https://github.com/mrmachine","followers_url":"https://api.github.com/users/mrmachine/followers","following_url":"https://api.github.com/users/mrmachine/following{/other_user}","gists_url":"https://api.github.com/users/mrmachine/gists{/gist_id}","starred_url":"https://api.github.com/users/mrmachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrmachine/subscriptions","organizations_url":"https://api.github.com/users/mrmachine/orgs","repos_url":"https://api.github.com/users/mrmachine/repos","events_url":"https://api.github.com/users/mrmachine/events{/privacy}","received_events_url":"https://api.github.com/users/mrmachine/received_events","type":"User","site_admin":false},"labels":[{"id":909917117,"url":"https://api.github.com/repos/portainer/portainer/labels/area/agent","name":"area/agent","color":"fbca04","default":false},{"id":379305037,"url":"https://api.github.com/repos/portainer/portainer/labels/kind/bug","name":"kind/bug","color":"ee0701","default":false},{"id":806139229,"url":"https://api.github.com/repos/portainer/portainer/labels/status/need-confirmation","name":"status/need-confirmation","color":"f9d0c4","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":32,"created_at":"2018-05-06T14:02:25Z","updated_at":"2018-05-20T08:00:48Z","closed_at":null,"author_association":"NONE","body":"**Bug description**\r\n\r\nSometimes (not always) the Containers page has duplicate entries for many containers. Not every container is duplicated. If I reload the page several times, the problem occurs for some page reloads only.\r\n\r\nThe links are also identical *except* for `?nodeName=...` in the querystring. So Portainer thinks the same container (with the same task-id/slot) has been deployed to multiple nodes in the swarm.\r\n\r\nWhen I click on one, I get the expected container detail page. When I click on another (with a different `?nodeName=...` in the querystring, I get an error about being unable to retrieve the container.\r\n\r\n**Expected behavior**\r\nOne entry in the list per container.\r\n\r\n**Steps to reproduce the issue:**\r\nHappens intermittently. When it happens, page refresh might or might not fix it. Even if it does, a few more reloads will show the problem again.\r\n\r\n**Technical details:**\r\n\r\n* Portainer version: `agent-support`\r\n* Docker version (managed by Portainer): Docker for AWS 18.03.0-ce\r\n* Platform (windows/linux): AWS/Linux\r\n* Command used to start Portainer (`docker run -p 9000:9000 portainer/portainer`):\r\n\r\n```shell\r\n# Create networks for Docker services.\r\ndocker network create --driver overlay portainer-agent\r\n\r\n# Create Portainer Agent service.\r\ndocker service create \\\r\n    --env AGENT_CLUSTER_ADDR='tasks.portainer-agent' \\\r\n    --limit-cpu 0.05 \\\r\n    --limit-memory 10M \\\r\n    --mode global \\\r\n    --mount type='bind',src='/var/run/docker.sock',dst='/var/run/docker.sock' \\\r\n    --name portainer-agent \\\r\n    --network portainer-agent \\\r\n    --reserve-cpu 0.01 \\\r\n    --reserve-memory 10M \\\r\n    portainer/agent:develop\r\n\r\n# Create Portainer service.\r\ndocker service create \\\r\n    --env SERVICE_PORTS=9000 \\\r\n    --env VIRTUAL_HOST='https://portainer.*' \\\r\n    --limit-cpu 0.05 \\\r\n    --limit-memory 10M \\\r\n    --mount type='volume',volume-driver='cloudstor:aws',src='portainer-data',dst='/data'  \\\r\n    --name portainer \\\r\n    --network haproxy \\\r\n    --network portainer-agent \\\r\n    --reserve-cpu 0.01 \\\r\n    --reserve-memory 10M \\\r\n    portainer/portainer:agent-support -H 'tcp://tasks.portainer-agent:9001' --tlsskipverify\r\n```\r\n\r\n* Browser: Firefox\r\n"},"comment":{"url":"https://api.github.com/repos/portainer/portainer/issues/comments/390464613","html_url":"https://github.com/portainer/portainer/issues/1867#issuecomment-390464613","issue_url":"https://api.github.com/repos/portainer/portainer/issues/1867","id":390464613,"user":{"login":"Duvel","id":1958057,"avatar_url":"https://avatars0.githubusercontent.com/u/1958057?v=4","gravatar_id":"","url":"https://api.github.com/users/Duvel","html_url":"https://github.com/Duvel","followers_url":"https://api.github.com/users/Duvel/followers","following_url":"https://api.github.com/users/Duvel/following{/other_user}","gists_url":"https://api.github.com/users/Duvel/gists{/gist_id}","starred_url":"https://api.github.com/users/Duvel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Duvel/subscriptions","organizations_url":"https://api.github.com/users/Duvel/orgs","repos_url":"https://api.github.com/users/Duvel/repos","events_url":"https://api.github.com/users/Duvel/events{/privacy}","received_events_url":"https://api.github.com/users/Duvel/received_events","type":"User","site_admin":false},"created_at":"2018-05-20T08:00:48Z","updated_at":"2018-05-20T08:00:48Z","author_association":"CONTRIBUTOR","body":"pi\r\n\r\n```\r\n2018/05/20 07:57:05 [DEBUG] - Using agent port: 9001,\r\n2018/05/20 07:57:05 [DEBUG] - Using cluster address: tasks.portainer_agent,\r\n2018/05/20 07:57:05 [DEBUG] - Using advertiseAddr: 10.0.8.202,\r\n2018/05/20 07:57:05 [DEBUG] - Generating TLS files...,\r\n2018/05/20 07:57:23 [DEBUG] - Agent details: map[NodeName:pi NodeRole:manager AgentPort:9001],\r\n2018/05/20 07:57:26 [DEBUG] - Serf configured with AdvertiseAddr: 10.0.8.202,\r\n2018/05/20 07:57:26 [INFO] serf: EventMemberJoin: 8a8ea756b55b 10.0.8.202,\r\n2018/05/20 07:57:26 [DEBUG] - Will join cluster via: tasks.portainer_agent,\r\n2018/05/20 07:57:26 [INFO] serf: EventMemberJoin: db9cb4feb12a 10.0.8.203,\r\n2018/05/20 07:57:26 [INFO] - Starting Portainer agent version 1.0.0-dev on 0.0.0.0:9001,\r\n2018/05/20 07:57:27 [DEBUG] - Redirecting request to pi,\r\n2018/05/20 07:57:27 [DEBUG] - Redirecting request to pi,\r\n2018/05/20 07:57:27 [DEBUG] - Proxy response body length: 28710,\r\n2018/05/20 07:57:27 [DEBUG] - Proxy response body length: 5507,\r\n2018/05/20 07:57:32 [DEBUG] - Redirecting request to pi,\r\n2018/05/20 07:57:33 [DEBUG] - Proxy response body length: 28710,\r\n2018/05/20 08:00:09 [DEBUG] - Proxy response body length: 5065,\r\n2018/05/20 08:00:09 [DEBUG] - Proxy response body length: 1284,\r\n2018/05/20 08:00:13 [DEBUG] - Proxy response body length: 1355,\r\n2018/05/20 08:00:16 [DEBUG] - Proxy response body length: 1426,\r\n2018/05/20 08:00:18 [DEBUG] - Proxy response body length: 1497,\r\n2018/05/20 08:00:21 [DEBUG] - Proxy response body length: 1568,\r\n2018/05/20 08:00:24 [DEBUG] - Proxy response body length: 1639,\r\n2018/05/20 08:00:28 [DEBUG] - Proxy response body length: 1710,\r\n2018/05/20 08:00:31 [DEBUG] - Proxy response body length: 1781,\r\n```"}}
{"actor":{"display_login":"Duvel"}}