{"action":"created","issue":{"url":"https://api.github.com/repos/portainer/portainer/issues/2102","repository_url":"https://api.github.com/repos/portainer/portainer","labels_url":"https://api.github.com/repos/portainer/portainer/issues/2102/labels{/name}","comments_url":"https://api.github.com/repos/portainer/portainer/issues/2102/comments","events_url":"https://api.github.com/repos/portainer/portainer/issues/2102/events","html_url":"https://github.com/portainer/portainer/issues/2102","id":346082812,"node_id":"MDU6SXNzdWUzNDYwODI4MTI=","number":2102,"title":"portainer-agent panic: runtime error: index out of range(main.retrieveAdvertiseAddress)","user":{"login":"opera443399","id":13327561,"node_id":"MDQ6VXNlcjEzMzI3NTYx","avatar_url":"https://avatars0.githubusercontent.com/u/13327561?v=4","gravatar_id":"","url":"https://api.github.com/users/opera443399","html_url":"https://github.com/opera443399","followers_url":"https://api.github.com/users/opera443399/followers","following_url":"https://api.github.com/users/opera443399/following{/other_user}","gists_url":"https://api.github.com/users/opera443399/gists{/gist_id}","starred_url":"https://api.github.com/users/opera443399/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opera443399/subscriptions","organizations_url":"https://api.github.com/users/opera443399/orgs","repos_url":"https://api.github.com/users/opera443399/repos","events_url":"https://api.github.com/users/opera443399/events{/privacy}","received_events_url":"https://api.github.com/users/opera443399/received_events","type":"User","site_admin":false},"labels":[{"id":909917117,"node_id":"MDU6TGFiZWw5MDk5MTcxMTc=","url":"https://api.github.com/repos/portainer/portainer/labels/area/agent","name":"area/agent","color":"fbca04","default":false},{"id":379305037,"node_id":"MDU6TGFiZWwzNzkzMDUwMzc=","url":"https://api.github.com/repos/portainer/portainer/labels/kind/bug","name":"kind/bug","color":"ee0701","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-07-31T08:19:28Z","updated_at":"2018-07-31T08:36:01Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"<!--\r\n\r\nThanks for reporting a bug for Portainer !\r\n\r\nDo you need help or have a question? Come chat with us on Slack http://portainer.io/slack/ or gitter https://gitter.im/portainer/Lobby.\r\n\r\nBefore opening a new issue, make sure that we do not have any duplicates\r\nalready open. You can ensure this by searching the issue list for this\r\nrepository. If there is a duplicate, please close your issue and add a comment\r\nto the existing issue instead.\r\n\r\nAlso, be sure to check our FAQ and documentation first: https://portainer.readthedocs.io\r\n-->\r\n\r\n**Bug description**\r\n\r\nwhen update agent from `v1.0.0` to `v1.1.1` (tried `v1.1.0` also) today:\r\n```bash\r\n# docker service ls |grep portainer-agent\r\nmphbzaqggbwx        portainer-agent           global              3/5                 portainer/agent:1.1.1\r\n\r\n# docker service logs -f portainer-agent\r\nportainer-agent.0.xygaf4h8klec@node-03    | panic: runtime error: index out of range\r\nportainer-agent.0.xygaf4h8klec@node-03    | \r\nportainer-agent.0.xygaf4h8klec@node-03    | goroutine 1 [running]:\r\nportainer-agent.0.xygaf4h8klec@node-03    | main.retrieveAdvertiseAddress(0xa49bc2, 0x1c, 0xc4201d7f10, 0x1)\r\nportainer-agent.0.xygaf4h8klec@node-03    |      /src/cmd/agent/main.go:92 +0x314\r\nportainer-agent.0.xygaf4h8klec@node-03    | main.main()\r\nportainer-agent.0.xygaf4h8klec@node-03    |      /src/cmd/agent/main.go:133 +0x25b\r\nportainer-agent.0.ssr43heib0hq@node-04    | panic: runtime error: index out of range\r\nportainer-agent.0.ssr43heib0hq@node-04    | \r\nportainer-agent.0.ssr43heib0hq@node-04    | goroutine 1 [running]:\r\nportainer-agent.0.ssr43heib0hq@node-04    | main.retrieveAdvertiseAddress(0xa49bc2, 0x1c, 0xc4201bdf10, 0x1)\r\nportainer-agent.0.ssr43heib0hq@node-04    |      /src/cmd/agent/main.go:92 +0x314\r\nportainer-agent.0.ssr43heib0hq@node-04    | main.main()\r\nportainer-agent.0.ssr43heib0hq@node-04    |      /src/cmd/agent/main.go:133 +0x25b\r\n\r\n```\r\n\r\ndowngrade to v1.0.0\r\n```bash\r\n# docker service ls |grep portainer-agent\r\np71id0brrvhn        portainer-agent           global              5/5                 portainer/agent:1.0.0  \r\n```\r\n\r\n**Expected behavior**\r\nall agent is running.\r\n\r\n**Steps to reproduce the issue:**\r\n\r\nSteps to reproduce the behavior:\r\n```bash\r\ndocker service rm portainer_agent\r\ndocker service create \\\r\n    --name portainer-agent \\\r\n    --detach=true \\\r\n    --network net-portainer \\\r\n    -e AGENT_CLUSTER_ADDR=tasks.portainer-agent \\\r\n    --mode global \\\r\n    --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \\\r\n    --mount type=bind,src=/data/docker/volumes,dst=/var/lib/docker/volumes \\\r\n    portainer/agent:1.1.1\r\n```\r\n\r\n**Technical details:**\r\n\r\n* Portainer version: \r\n1.17.1\r\n* Docker version (managed by Portainer): \r\n18.03.1-ce\r\n* Platform (windows/linux): \r\nlinux/amd64\r\n* Command used to start Portainer (`docker run -p 9000:9000 portainer/portainer`):\r\n```bash\r\nmkdir /data/server/portainer/data -p\r\ndocker network create --driver overlay net-portainer\r\ndocker service create \\\r\n    --name portainer \\\r\n    --detach=true \\\r\n    --network net-portainer \\\r\n    --publish 9000:9000 \\\r\n    --replicas=1 \\\r\n    --constraint 'node.role == manager' \\\r\n    --mount type=bind,src=/data/server/portainer/data,dst=/data \\\r\n    portainer/portainer -H \"tcp://tasks.portainer-agent:9001\" --tlsskipverify\r\n\r\n```\r\n* Browser:\r\n\r\n**Additional context**\r\nAdd any other context about the problem here.\r\n"},"comment":{"url":"https://api.github.com/repos/portainer/portainer/issues/comments/409141682","html_url":"https://github.com/portainer/portainer/issues/2102#issuecomment-409141682","issue_url":"https://api.github.com/repos/portainer/portainer/issues/2102","id":409141682,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTE0MTY4Mg==","user":{"login":"deviantony","id":5485061,"node_id":"MDQ6VXNlcjU0ODUwNjE=","avatar_url":"https://avatars2.githubusercontent.com/u/5485061?v=4","gravatar_id":"","url":"https://api.github.com/users/deviantony","html_url":"https://github.com/deviantony","followers_url":"https://api.github.com/users/deviantony/followers","following_url":"https://api.github.com/users/deviantony/following{/other_user}","gists_url":"https://api.github.com/users/deviantony/gists{/gist_id}","starred_url":"https://api.github.com/users/deviantony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deviantony/subscriptions","organizations_url":"https://api.github.com/users/deviantony/orgs","repos_url":"https://api.github.com/users/deviantony/repos","events_url":"https://api.github.com/users/deviantony/events{/privacy}","received_events_url":"https://api.github.com/users/deviantony/received_events","type":"User","site_admin":false},"created_at":"2018-07-31T08:36:01Z","updated_at":"2018-07-31T08:36:01Z","author_association":"MEMBER","body":"@olljanat I believe this was introduced by the changes to the way the agent retrieves the IP address where it can advertise to other agents (Swarm only)."}}
{"actor":{"display_login":"deviantony"}}