Portainer: Windows 1809 images support

Created on 15 Dec 2018  ·  48Comments  ·  Source: portainer/portainer

Trying to run per documentation on Windows 2019 throws error below

PS C:\windows\system32> docker run -d -p 9000:9000 --name portainer --restart always -v \\.\pipe\docker_engine:\\.\pipe\docker_engine -v portainer_data:C:\data portainer/portainer
Unable to find image 'portainer/portainer:latest' locally
latest: Pulling from portainer/portainer
bce2fbc256ea: Pull complete
6f2071dcd729: Pull complete
2c7e36fa33dc: Pull complete
fb3537c2b7f8: Pull complete
f30302b64db4: Pull complete
bb555c47c5ef: Pull complete
e4979eff96b9: Pull complete
Digest: sha256:339b6486297050179418c886272f3262794b54513008a7f8e747c5e8f330338d
Status: Downloaded newer image for portainer/portainer:latest
652c57d9d5167bdb9a05bb35a87b62c507444cf8ed4fee413f4151ebae9d44e2
C:\Program Files\Docker\docker.exe: Error response from daemon: CreateComputeSystem 652c57d9d5167bdb9a05bb35a87b62c507444cf8ed4fee413f4151ebae9d44e2: The container operating system does not match the host operating system.
(extra info: {"SystemType":"Container","Name":"652c57d9d5167bdb9a05bb35a87b62c507444cf8ed4fee413f4151ebae9d44e2","Owner":"docker","VolumePath":"\\\\?\\Volume{5b2f2409-6991-416c-82c6-c762dc60686b}","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"E:\\images\\windowsfilter\\652c57d9d5167bdb9a05bb35a87b62c507444cf8ed4fee413f4151ebae9d44e2","Layers":[{"ID":"381ba353-bd62-5a9e-81f1-8027b144f726","Path":"E:\\images\\windowsfilter\\9110e15b25bba0728a80badeda1068837bcf28e34ac7e855f651973a22ab5045"},{"ID":"3cef0451-7c78-5731-a914-00231453fded","Path":"E:\\images\\windowsfilter\\ae23f040665aef3a51e246f3cf31f894074f784cb068018d0b9e18428674ad67"},{"ID":"08fa38ad-8fe9-53b3-8298-82855927bd14","Path":"E:\\images\\windowsfilter\\4f1ed45c716fb144ebabc508df74a8267c88ab4e1339f6ad5c55d61b27134ce7"},{"ID":"01c68bee-7da2-5a84-bc0f-f32ba021c59f","Path":"E:\\images\\windowsfilter\\0ee1d9e93de884f188299a0789664ab6023a429cb8a9d33040618f4ba9f93aca"},{"ID":"85f2de21-d7cd-54f3-afbc-490afec63d7a","Path":"E:\\images\\windowsfilter\\f9b6c732ce5dd2c4ed234731ee64d13afb048dc251f6acdc9d6e1071deefdc21"},{"ID":"f8e0b095-c4cb-5ecf-ae0f-970f8093b7b2","Path":"E:\\images\\windowsfilter\\2c7a14625c3c46be9259d5c8a4c4165712cc7fffe8768df824eaed463811070c"},{"ID":"e65e8a03-475f-57ca-9678-a1e67500cb5b","Path":"E:\\images\\windowsfilter\\5ec1161fe19c6d397ddca8f411ca5ac2f9197fc3697fc92c094776a7079a7250"}],"HostName":"652c57d9d516","MappedDirectories":[{"HostPath":"E:\\images\\volumes\\portainer_data\\_data","ContainerPath":"c:\\data","ReadOnly":false,"BandwidthMaximum":0,"IOPSMaximum":0,"CreateInUtilityVM":false}],"MappedPipes":[{"HostPath":"\\\\.\\pipe\\docker_engine","ContainerPipeName":"docker_engine"}],"HvPartition":false,"EndpointList":["55583333-35CD-4C0B-B1AD-9354CE9F317D"],"AllowUnqualifiedDNSQuery":true}).
areartifacts kinenhancement

Most helpful comment

Portainer 1.20.1 and Portainer agent 1.2.1 will be released this week.

All 48 comments

Hi @artisticcheese

We do not support 1809 images yet.

We have an issue when rebasing on 1809 image using @StefanScherer rebase-docker-image tool, I'll open an issue inside his repository.

In the meantime you could use the image chocolateyfest/portainer instead which I've built with this Dockerfile and started it with this run.ps1 to run it and open a browser (localhost :-) ). OK I didn't use persistent data, it was just for a 10 minute demo -> video

Is there a specific tag for chocolateyfest image?
```
PS C:\windows\system32> docker run -d -p 9000:9000 --name portainer --restart always -v \.\pipe\docker_engine:\.\pipe\docker_engine -v portainer_data:C:\data chocolateyfest/portainer
Unable to find image 'chocolateyfest/portainer:latest' locally
latest: Pulling from chocolateyfest/portainer
6a5e981230da: Verifying Checksum
6fb298d4ca0c: Download complete
83678125b15b: Download complete
76e25138f786: Download complete
6a0467cc1469: Download complete
C:\Program Files\Docker\docker.exe: filesystem layer verification failed for digest sha256:6a5e981230da7b34a25588f20c8b6b5366256ab1e0aadc0b7ecb566855bf4679.
See 'C:\Program Files\Docker\docker.exe run --help'.

No, just lastest.
Hm, that's interesting.

On my windows_2019_docker Vagrant box which was built some weeks ago I have the base image pulled and it works:

$ docker run -d -p 9000:9000 --name portainer --restart always -v \\.\pipe\docker_engine:\\.\pipe\docker_engine -v portainer_data:C:\data chocolateyfest/portainer
Unable to find image 'chocolateyfest/portainer:latest' locally
latest: Pulling from chocolateyfest/portainer
6a5e981230da: Already exists 
6fb298d4ca0c: Pull complete 
83678125b15b: Pull complete 
76e25138f786: Pull complete 
6a0467cc1469: Pull complete 
Digest: sha256:5f8f4e6f832471f19bec3f6d26ad14dcf03c5b98142d367ff01ce8e5416abdf7
Status: Downloaded newer image for chocolateyfest/portainer:latest

When I remove all the nanoserver base images and run it again

$ docker run -d -p 9000:9000 --name portainer --restart always -v '\\.\pipe\docker_engine:\\.\pipe\docker_engine' -v 'portainer_data:C:\data' chocolateyfest/portainer
Unable to find image 'chocolateyfest/portainer:latest' locally
latest: Pulling from chocolateyfest/portainer
6a5e981230da: Verifying Checksum 
6fb298d4ca0c: Download complete 
83678125b15b: Download complete 
76e25138f786: Download complete 
6a0467cc1469: Download complete 
docker: filesystem layer verification failed for digest sha256:6a5e981230da7b34a25588f20c8b6b5366256ab1e0aadc0b7ecb566855bf4679.

I ran the demo last Wednesday on some Azure VM's that also have the nanoserver image pre-pulled it also worked.

Just run this command

docker pull mcr.microsoft.com/windows/nanoserver:1809

and running the portainer should work afterwards.

Ah, I understand now. The problem with such old Windows images from chocolateyfest use the original download link of the nanoserver image.

        {
            "mediaType": "application/vnd.docker.image.rootfs.foreign.diff.tar.gzip",
            "size": 98266490,
            "digest": "sha256:6a5e981230da7b34a25588f20c8b6b5366256ab1e0aadc0b7ecb566855bf4679",
            "urls": [
                "https://go.microsoft.com/fwlink/?linkid=2027490"
            ]
        },

After Microsoft has withdrawn the ISO files and the Docker images they redeployed it later after some weeks. But it seems the download link has changed when you inspect the manifest of the current nanoserver image

                {
                    "mediaType": "application/vnd.docker.image.rootfs.foreign.diff.tar.gzip",
                    "size": 98266490,
                    "digest": "sha256:6a5e981230da7b34a25588f20c8b6b5366256ab1e0aadc0b7ecb566855bf4679",
                    "urls": [
                        "https://go.microsoft.com/fwlink/?linkid=2041341"
                    ]
                },

As you can see the checksum and size is the same, but the foreign link to the Windows base image is a different one. Probably the old one gets an 404 or something that doesn't fit the sha256 sum.

You need to rebuild your image and upload to docker hub?

No I don't have to rebuild the image. I only have to push it again, the foreign link will be updated in the manifest.

It should work now.

@deviantony as a side comment. You can use Win Srv 1809 to build images for older versions too using native Docker tools.

You can find guide and example for it from: https://github.com/olljanat/multi-win-version-aspnet

Dear Developers,
Another direction, Please use StefanScherer/chocolateyfest-talk i.e chocolatey portainer as defined in his github post [https://github.com/StefanScherer/chocolateyfest-talk/tree/master/4-portainer]

This could help till we get from portainer registry.

Note: This suggestion is for hosting portainer on Win server 2019 (ver 10.0.17763.107)

I just updated the rebase tool and tried it

rebase-docker-image portainer/portainer:windows-amd64 -t stefanscherer/portainer:1.20.0-1809 -b mcr.microsoft.com/windows/nanoserver:1809

I then can spin up the container on an Azure VM with Windows Server 2019 and Containers feature w/ Docker EE 18.09 installed:

docker run -p 80:9000 -v //./pipe/docker_engine://./pipe/docker_engine -d -it stefanscherer/portainer:1.20.0-1809

@deviantony and what about agent image ?
I was looking to find anywhere portainer\agent artifact under release of portainer or something, so i can create my docker image based on @StefanScherer, at least until the official image will support also 1809, but couldn't find it!

And how would it be in the case of the Portainer Agent in W2K19? (https://hub.docker.com/r/portainer/agent)

Afaik, next version of Portainer will provide official support for Win Srv 2019. Be patient.

Just side note. Win Srv 2019 introduced lot of new issues which why it cannot be consider to be production ready yet. Look: moby/moby#38498

@olljanat any ETA when the next portainer version will be released ?! thanks.

Portainer 1.20.1 and Portainer agent 1.2.1 will be released this week.

Portainer 1.20.1 and Portainer agent 1.2.1 will be released this week.

support win server(1809) and win10(1809)?

Yes, we will try to publish 1809 images based on the updated version of the rebase-image-tool

https://github.com/portainer/portainer/issues/2558#issuecomment-450656493

@deviantony I guess the rebase-image-tool does not transfer the manifest from mcr to docker hub for new image layers (eg. after each patch tuesday). So you may need the docker tag mcr.microsoft.com/windows/nanoserver:1809 portainer/nanoserver:1809 && docker push portainer/nanoserver:1809 from time to time and use that helper image for the rebase. I did that once in my Docker Hub namespace so that might be the reason it worked for me so easily. The push doesn't push any windows images, just the manifest for these foreign layers.

Thanks for the info @StefanScherer :+1:

hi
I have this problem in windows registry 2019(1809)

docker push ipaddress:5000/webapi:1.0.0
The push refers to repository [192.168.7.62:5000/salespluswebapi]
ff93af9127f9: Layer already exists
379d250f6177: Layer already exists
eed857420622: Layer already exists
822dd463d821: Layer already exists
f71e080cf3ef: Layer already exists
e65f9767f8cc: Layer already exists
88bcb9e1942a: Layer already exists
aa8891847df9: Layer already exists
b9fa4df06e58: Skipped foreign layer
37c182b75172: Skipped foreign layer
received unexpected HTTP status: 500 Internal Server Erro

@hasan419 sorry but this is not a Docker support channel, you'd be better asking questions related to windows/docker inside a Docker support channel.

FYI portainer agent version 1.2.1 has been released and should be compatible with Windows 1809. Portainer 1.20.1 coming soon.

@deviantony thanks :), jumping on to it ...

      FYI portainer agent version 1.2.1 has been released and should be compatible with Windows 1809. Portainer 1.20.1 coming soon.

@deviantony

I try to installer the portainer agente usgin:

docker run -d --name portainer_agent --restart always --network portainer_agent -e AGENT_CLUSTER_ADDR=tasks.portainer_agent --mount type=npipe,source=\\.\pipe\docker_engine,target=\\.\pipe\docker_engine portainer/agent:windows1809-amd64

But i receive the following error in docker logs:

`
panic: runtime error: index out of range

goroutine 1 [running]:
main.retrieveAdvertiseAddress(0xac34e3, 0x1c, 0xc0001a3ee8, 0x1)
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:103 +0x396
main.main()
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:144 +0x261
panic: runtime error: index out of range

goroutine 1 [running]:
main.retrieveAdvertiseAddress(0xac34e3, 0x1c, 0xc0001a3ee8, 0x1)
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:103 +0x396
main.main()
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:144 +0x261
panic: runtime error: index out of range

goroutine 1 [running]:
main.retrieveAdvertiseAddress(0xac34e3, 0x1c, 0xc0001a3ee8, 0x1)
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:103 +0x396
main.main()
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:144 +0x261
panic: runtime error: index out of range

goroutine 1 [running]:
main.retrieveAdvertiseAddress(0xac34e3, 0x1c, 0xc0001a3ee8, 0x1)
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:103 +0x396
main.main()
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:144 +0x261
panic: runtime error: index out of range

goroutine 1 [running]:
main.retrieveAdvertiseAddress(0xac34e3, 0x1c, 0xc0001a3ee8, 0x1)
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:103 +0x396
main.main()
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:144 +0x261
panic: runtime error: index out of range

goroutine 1 [running]:
main.retrieveAdvertiseAddress(0xac34e3, 0x1c, 0xc00017dee8, 0x1)
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:103 +0x396
main.main()
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:144 +0x261
panic: runtime error: index out of range

goroutine 1 [running]:
main.retrieveAdvertiseAddress(0xac34e3, 0x1c, 0xc00017dee8, 0x1)
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:103 +0x396
main.main()
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:144 +0x261
panic: runtime error: index out of range

goroutine 1 [running]:
main.retrieveAdvertiseAddress(0xac34e3, 0x1c, 0xc000177ee8, 0x1)
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:103 +0x396
main.main()
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:144 +0x261
panic: runtime error: index out of range

goroutine 1 [running]:
main.retrieveAdvertiseAddress(0xac34e3, 0x1c, 0xc0001a3ee8, 0x1)
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:103 +0x396
main.main()
/home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:144 +0x261
`

Did I do something wrong?

Going to investigate this one, keep you posted

@mmgil can you try to run it as a standalone container ?

docker run --rm -v \\.\pipe\docker_engine:\\.\pipe\docker_engine portainer/agent

I wonder if it's an issue on Windows 1809 and/or if it's related to Swarm.

@deviantony your command works for me, running the docker cli on my Mac I have to quote the backslashes

$ docker version
Client: Docker Engine - Community
 Version:           18.09.1
 API version:       1.39
 Go version:        go1.10.6
 Git commit:        4c52b90
 Built:             Wed Jan  9 19:33:12 2019
 OS/Arch:           darwin/amd64
 Experimental:      true

Server:
 Engine:
  Version:          18.09.1
  API version:      1.39 (minimum version 1.15)
  Go version:       go1.10.6
  Git commit:       20b67756d0
  Built:            01/09/2019 17:09:57
  OS/Arch:          windows/amd64
  Experimental:     false
$ docker run --rm -v '\\.\pipe\docker_engine:\\.\pipe\docker_engine' portainer/agent
Unable to find image 'portainer/agent:latest' locally
latest: Pulling from portainer/agent
6a5e981230da: Already exists 
f7de0eb29689: Already exists 
edca6ce5c896: Pull complete 
6a1853f4b4d5: Pull complete 
b29d9e2931ed: Pull complete 
f3afb3f58410: Pull complete 
Digest: sha256:a083305dff8afdd8c6384152022dd7d77fd19684870dd641e96127f622da4f78
Status: Downloaded newer image for portainer/agent:latest
2019/01/23 22:07:07 [INFO] - Starting Portainer agent version 1.2.1 on 0.0.0.0:9001 (cluster mode: false)

Haven't used the agent yet, I just created a single node swarm and ran this (without a custom network)

$ docker run --name portainer_agent --restart always -e AGENT_CLUSTER_ADDR=tasks.portainer_agent -v '\\.\pipe\docker_engine:\\.\pipe\docker_engine' portainer/agent
2019/01/23 22:15:29 [INFO] serf: EventMemberJoin: 081a3a7dc877 172.26.199.136
2019/01/23 22:15:30 [WARN] memberlist: Failed to resolve tasks.portainer_agent: lookup tasks.portainer_agent: no such host
2019/01/23 22:15:30 [INFO] - Starting Portainer agent version 1.2.1 on 0.0.0.0:9001 (cluster mode: true)

Yeah the agent must be part of an overlay to work in a Swarm but thanks for the input anyway ! I'll investigate the cause of the issue.

@deviantony

i receive this error using this command:

2019/01/24 08:35:28 [ERROR] - Error during agent initialization: AGENT_CLUSTER_ADDR environment variable is required

And using:

docker run --rm -e AGENT_CLUSTER_ADDR=tasks.portainer_agent -v \\.\pipe\docker_engine:\\.\pipe\docker_engine portainer/agent

return:

2019/01/24 08:38:07 [ERROR] - Unable to retrieve advertise address: Unable to retrieve the address on which the agent can advertise. Check your network settings

so, i create a overlay network:
image

and i tryed this:

docker run --rm --network portainer_agent -e AGENT_CLUSTER_ADDR=tasks.portainer_agent -v \\.\pipe\docker_engine:\\.\pipe\docker_engine portainer/agent

and:

panic: runtime error: index out of range

goroutine 1 [running]:
main.retrieveAdvertiseAddress(0xac34e3, 0x1c, 0xc00017dee8, 0x1)
        /home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:103 +0x396
main.main()
        /home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:144 +0x261

Looks like he's having trouble getting the address of the container.

@StefanScherer

Is there missing any DLL on NanoServer1809 for this method of the go get the address?

@deviantony

Would you like me execute this command on a docker node without a swarm?

@mmgil most probably that happens because code cannot find network card.
Can you share docker info output from node where you are trying to run this?

@mmgil most probably that happens because code cannot find network card.
Can you share docker info output from node where you are trying to run this?

@olljanat

This is the docker info in my environment:

PS C:\> docker info
Containers: 1
 Running: 1
 Paused: 0
 Stopped: 0
Images: 2
Server Version: 18.03.1-ee-5
Storage Driver: windowsfilter
 Windows:
Logging Driver: json-file
Plugins:
 Volume: local
 Network: ics l2bridge l2tunnel nat null overlay transparent
 Log: awslogs etwlogs fluentd gelf json-file local logentries splunk syslog
Swarm: active
 NodeID: 9bcz24ufxtr2q5xvxbk5tuwtj
 Is Manager: true
 ClusterID: zvrdvwubc4o5y91n33rf1wz73
 Managers: 4
 Nodes: 4
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot Interval: 10000
  Number of Old Snapshots to Retain: 0
  Heartbeat Tick: 1
  Election Tick: 10
 Dispatcher:
  Heartbeat Period: 5 seconds
 CA Configuration:
  Expiry Duration: 3 months
  Force Rotate: 0
 Autolock Managers: false
 Root Rotation In Progress: false
 Node Address: 10.10.0.63
 Manager Addresses:
  10.10.0.61:2377
  10.10.0.62:2377
  10.10.0.63:2377
  10.10.0.64:2377
Default Isolation: process
Kernel Version: 10.0 17763 (17763.1.amd64fre.rs5_release.180914-1434)
Operating System: Windows Server 2019 Datacenter Version 1809 (OS Build 17763.107)
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 3.999GiB
Name: Docker03
ID: 4KHT:MGGV:EAOP:MLF3:JST2:CWTH:ZPLS:NPWR:7QWM:MUF3:UGIS:JFZI
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 10.10.0.0/24
 127.0.0.0/8
Live Restore Enabled: false

@olljanat did you found on your try`s also the problem with overlay networks

Error response from daemon: attaching to network failed, make sure your network options are correct and check manager logs

It seems overlay networks created on docker manager are not being seen from windows worker nodes,

My setup:
3 Mangers
5 Linux Workers
2 Win1809 Workers

All are running on docker engine 18.09.1

@mmgil 18.03.1-ee-5 is released before Win Srv 2019 so most probably it is not tested with it. Plz upgrade to 18.09.1. I can also see that your setup misses some Windows updates as .107 is not latest.

@egzonzeneli that is most probably related to moby/moby#38484 which afaik is bug on Windows and will need update from Microsoft side. So probably is not possible to use Portainer agent inside of overlay network before that 😢 How ever it should be possible to Portainer it selves on Win Srv 2019.

@deviantony we most probably need also add some checks to code so it will give some nice error message instead of just crashing.

@olljanat

I've performed the update in the environment, this is the result of the _docker info_:

Containers: 4
 Running: 1
 Paused: 0
 Stopped: 3
Images: 2
Server Version: 18.09.1
Storage Driver: windowsfilter
 Windows:
Logging Driver: json-file
Plugins:
 Volume: local
 Network: ics l2bridge l2tunnel nat null overlay transparent
 Log: awslogs etwlogs fluentd gelf json-file local logentries splunk syslog
Swarm: active
 NodeID: xoqobpg417er8csie9wojlki8
 Is Manager: true
 ClusterID: zvrdvwubc4o5y91n33rf1wz73
 Managers: 4
 Nodes: 4
 Default Address Pool: 10.0.0.0/8
 SubnetSize: 24
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot Interval: 10000
  Number of Old Snapshots to Retain: 0
  Heartbeat Tick: 1
  Election Tick: 10
 Dispatcher:
  Heartbeat Period: 5 seconds
 CA Configuration:
  Expiry Duration: 3 months
  Force Rotate: 0
 Autolock Managers: false
 Root Rotation In Progress: false
 Node Address: 10.10.0.62
 Manager Addresses:
  10.10.0.61:2377
  10.10.0.62:2377
  10.10.0.63:2377
  10.10.0.64:2377
Default Isolation: process
Kernel Version: 10.0 17763 (17763.1.amd64fre.rs5_release.180914-1434)
Operating System: Windows Server 2019 Datacenter Version 1809 (OS Build 17763.253)
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 3.999GiB
Name: Docker02
ID: FGBN:GMVD:R6YM:4DHI:GMSP:73IY:LV4O:MIJI:5VEC:5NNC:MLMO:46EO
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 10.10.0.0/24
 127.0.0.0/8
Live Restore Enabled: false

but, occurs the same error in portainer\agent using _docker run --rm --network portainer_agent -e AGENT_CLUSTER_ADDR=tasks.portainer_agent -v \.\pipe\docker_engine:\.\pipe\docker_engine portainer/agent_:

panic: runtime error: index out of range

goroutine 1 [running]:
main.retrieveAdvertiseAddress(0xac34e3, 0x1c, 0xc0001a3ee8, 0x1)
        /home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:103 +0x396
main.main()
        /home/tony/workspaces/go/src/github.com/portainer/agent/cmd/agent/main.go:144 +0x261

i'll try run a container with the image mcr.microsoft.com/windows/nanoserver:1809 in the network overlay portainer_agent to see if network is all right.

I executed two containers, one in node Docker01 and one in node Docker04 using overlay network portainer_agent and is working normally

image

@mmgil are you using some special configuration which disables IPv6, etc? I can see that Link-local IPv6 Address is missing from those pictures. I just tested on my Win 2019 lab machine that it exists on there.

Currently Portainer agent is using second IP address from first vEthernet interface which it can find as normally first IP is link-local IPv6 and now it is failing on your env as there is only one IP.

@olljanat thanks for the help/diagnosis

FYI I'm thinking about changing the IP retrieval algorithm soon. The cause is definitely coming from here, although I'm curious about what makes @mmgil's setup "non-standard".

@mmgil are you using some special configuration which disables IPv6, etc? I can see that _Link-local IPv6 Address_ is missing from those pictures. I just tested on my Win 2019 lab machine that it exists on there.

Currently Portainer agent is using second IP address from first _vEthernet_ interface which it can find as normally first IP is link-local IPv6 and now it is failing on your env as there is only one IP.

oooooh, That must be it.

In fact I disabled the IPV6 of the template of the Virtual Machine in my environment.

I will activate IPV6 in this environment and test again.

AND... vooooia lá My Friends...

It's working. You are the sacred Monsters of the Portainer and Docker. Thank you very much for your help and congratulations.

2019/01/24 19:58:33 [INFO] - Starting Portainer agent version 1.2.1 on 0.0.0.0:9001 (cluster mode: true)

Good to know, still, we'll want to update the current IP retrieval algorithm to something that would be more stable.

Portainer 1.20.1 is out and can be deployed on Windows 1809.

Thanks to everyone for their contribution.

Thank you!

@deviantony Just a heads-up the latest manifest list looks different for linux as the previous ones.

$ mq portainer/portainer:1.20.1
Image: portainer/portainer:1.20.1
 * Manifest List: Yes
 * Supported platforms:
   - linux/amd64
   - linux/amd64
   - linux/amd64
   - linux/amd64
   - linux/amd64
   - windows/amd64:10.0.14393.2485
   - windows/amd64:10.0.16299.904
   - windows/amd64:10.0.17134.523
   - windows/amd64:10.0.17763.253

~
$ mq portainer/portainer:1.19.0
Image: portainer/portainer:1.19.0
 * Manifest List: Yes
 * Supported platforms:
   - linux/amd64
   - linux/arm
   - linux/arm64
   - linux/ppc64le
   - linux/s390x
   - windows/amd64:10.0.14393.2312
   - windows/amd64:10.0.16299.547
   - windows/amd64:10.0.17134.165

(Maybe you need a docker manifest annotate for cross-built linux images.)

@ssbkang could you have a look?

@deviantony I just pushed new manifests with the missing annotations, and also updated our release pipeline.

docker manifest inspect portainer/portainer:latest
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 739,
         "digest": "sha256:d0aac20ac34dafb354538dfe5ecbb61c9150af0d82517156330b921ebde4fce0",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 739,
         "digest": "sha256:98eac950b26754a304a04ccc2f88990f5ae9bd16f13e2ee038d264ce47dfb6ae",
         "platform": {
            "architecture": "arm",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 739,
         "digest": "sha256:65b910ab43ebe8581544a252496708bfb36ef2a25dca0219892ab7a08ee5d95f",
         "platform": {
            "architecture": "arm64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 738,
         "digest": "sha256:e09399a9713497bf37c68f1585d69c559ddd24965e2e0574529ea1ce39adbbb3",
         "platform": {
            "architecture": "ppc64le",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 738,
         "digest": "sha256:5ad046da6ed85ee44c18ee450da287661f837ebae509f20c008f9116d924a3b9",
         "platform": {
            "architecture": "s390x",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1984,
         "digest": "sha256:adc6222c9f74f2cbbff6d678c6e6b3e9f8684793697cb21c42fef964450b7a76",
         "platform": {
            "architecture": "amd64",
            "os": "windows",
            "os.version": "10.0.14393.2485"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 2105,
         "digest": "sha256:466c0bdd35fd97052df2e172971184443233a8222ecd87223e933a79e932aee5",
         "platform": {
            "architecture": "amd64",
            "os": "windows",
            "os.version": "10.0.16299.904"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 2105,
         "digest": "sha256:5d3e856cdb6eb41b0d19a4120c8abe6ba903325e563c7be8e18700adae839a58",
         "platform": {
            "architecture": "amd64",
            "os": "windows",
            "os.version": "10.0.17134.523"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 2106,
         "digest": "sha256:a653f25cc5c889295da14cb47881a8518c9bfb648c7e54f72499f4de3ed4cc43",
         "platform": {
            "architecture": "amd64",
            "os": "windows",
            "os.version": "10.0.17763.253"
         }
      }
   ]
}
docker manifest inspect portainer/portainer:1.20.1
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 739,
         "digest": "sha256:d0aac20ac34dafb354538dfe5ecbb61c9150af0d82517156330b921ebde4fce0",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 739,
         "digest": "sha256:98eac950b26754a304a04ccc2f88990f5ae9bd16f13e2ee038d264ce47dfb6ae",
         "platform": {
            "architecture": "arm",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 739,
         "digest": "sha256:65b910ab43ebe8581544a252496708bfb36ef2a25dca0219892ab7a08ee5d95f",
         "platform": {
            "architecture": "arm64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 738,
         "digest": "sha256:e09399a9713497bf37c68f1585d69c559ddd24965e2e0574529ea1ce39adbbb3",
         "platform": {
            "architecture": "ppc64le",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 738,
         "digest": "sha256:5ad046da6ed85ee44c18ee450da287661f837ebae509f20c008f9116d924a3b9",
         "platform": {
            "architecture": "s390x",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1984,
         "digest": "sha256:adc6222c9f74f2cbbff6d678c6e6b3e9f8684793697cb21c42fef964450b7a76",
         "platform": {
            "architecture": "amd64",
            "os": "windows",
            "os.version": "10.0.14393.2485"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 2105,
         "digest": "sha256:466c0bdd35fd97052df2e172971184443233a8222ecd87223e933a79e932aee5",
         "platform": {
            "architecture": "amd64",
            "os": "windows",
            "os.version": "10.0.16299.904"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 2105,
         "digest": "sha256:5d3e856cdb6eb41b0d19a4120c8abe6ba903325e563c7be8e18700adae839a58",
         "platform": {
            "architecture": "amd64",
            "os": "windows",
            "os.version": "10.0.17134.523"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 2106,
         "digest": "sha256:a653f25cc5c889295da14cb47881a8518c9bfb648c7e54f72499f4de3ed4cc43",
         "platform": {
            "architecture": "amd64",
            "os": "windows",
            "os.version": "10.0.17763.253"
         }
      }
   ]
}

Thanks so much for picking this up @StefanScherer, legend! 👍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aprcloud picture aprcloud  ·  3Comments

youlu-cn picture youlu-cn  ·  3Comments

adi90x picture adi90x  ·  4Comments

himred picture himred  ·  3Comments

WTFKr0 picture WTFKr0  ·  4Comments