Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portainer 2.0 with RPI 4 and Raspberry Pi OS (64 bit) problem #4663

Closed
paolonervi opened this issue Dec 26, 2020 · 31 comments
Closed

Portainer 2.0 with RPI 4 and Raspberry Pi OS (64 bit) problem #4663

paolonervi opened this issue Dec 26, 2020 · 31 comments

Comments

@paolonervi
Copy link

I try to install Portainer 2.0 on a RaspBerry PI4 with a Raspberry PI OS 64 bit OS, but i get this error:

**pi@raspberrypi:~ $ docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
Unable to find image 'portainer/portainer-ce:latest' locally
latest: Pulling from portainer/portainer-ce
b890dbc4eb27: Pull complete
f90a4cb1da73: Pull complete
Digest: sha256:83551df73d724a2ea489400d90f7652deb5fcf4d620add018c1923f27d522bac
Status: Downloaded newer image for portainer/portainer-ce:latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
fe0028bb19e080d0152f69beaa00b028934cb0bc801faef806ce0eb606681ca8**

Here is the output of the lscpu command:

**pi@raspberrypi:~ $ lscpu
Architecture:        aarch64
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  4
Socket(s):           1
Vendor ID:           ARM
Model:               3
Model name:          Cortex-A72
Stepping:            r0p3
CPU max MHz:         1500,0000
CPU min MHz:         600,0000
BogoMIPS:            108.00
Flags:               fp asimd evtstrm crc32 cpuid**

And here is the version of Docker:

**pi@raspberrypi:~ $ docker version

Client: Docker Engine - Community
 Version:           20.10.1
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        831ebea
 Built:             Tue Dec 15 04:35:39 2020
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.1
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       f001486
  Built:            Tue Dec 15 04:33:40 2020
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0**

If I check it seems working:

pi@raspberrypi:~ $ docker ps
CONTAINER ID   IMAGE                           COMMAND                  CREATED          STATUS          PORTS                              NAMES
fe0028bb19e0   portainer/portainer-ce:latest   "/portainer"             19 seconds ago   Up 16 seconds   8000/tcp, 0.0.0.0:9000->9000/tcp   nifty_brattain

But if i go to a browser and i connect to the port 9000 i get this error message:

 **This feature is not available with Docker on Windows yet.
On Linux / Mac, ensure that you have started Portainer container with the following Docker flag -v "/var/run/docker.sock:/var/run/docker.sock"
 Unable to create endpoint**

Where am i wrong?
thank you for te time you dedicate in helping me.
Greetings from Italy.

@sinesiobittencourt
Copy link

Hello!

Remove the flag.

@paolonervi
Copy link
Author

@sinesiobittencourt
Hi,
thank you for the hint.
Just a doubt...what flag do you refer to when you say: "Remove te Flag"?
this one: -v /var/run/docker.sock:/var/run/docker.sock
or this one: -v portainer_data:/data ?

Today I have tried again the command with both the two "v" flags as you can see here:

docker run -d -p 9082:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data --name pluto9083 --restart unless-stopped portainer/portainer-ce:linux-arm

Now when I open the browser to http://ip_raspberry:9082 although I receive the same message as yesterday:

On Linux / Mac, ensure that you have started Portainer container with the following Docker flag -v "/var/run/docker.sock:/var/run/docker.sock"
I could connect and the Portainer service is working....

@sinesiobittencourt
Copy link

Sorry for the delay!

Try to follow the steps in my tutorial at https://www.letscloud.io/community/how-to-install-portainer

@paolonervi
Copy link
Author

I have resolved.
I write down the commands i have used so that may be it could be useful also for other people:
First i have downloaded the image with:
docker pull portainer/portainer-ce:linux-arm

the system confirmed that it has been downloaded the 2.0.1 version (the latest available today).

pi@raspberrypi:~ $ docker pull portainer/portainer-ce:linux-arm
linux-arm: Pulling from portainer/portainer-ce
b890dbc4eb27: Already exists 
d39f4eb29d9f: Pull complete 
Digest: sha256:ffd59292a3253137569609fba72ad2e572b050ba9deb1a7b9a94d388693f236a
Status: Downloaded newer image for portainer/portainer-ce:linux-arm
docker.io/portainer/portainer-ce:linux-arm

Now i have started a new istance of this new image of portainer exposing the port 7000 (since the 9000 it was already occupied by the old 2.0.0 version):

pi@raspberrypi:~ $ docker run --name portainer_2_0_1 -d -p 7000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data_201:/data portainer/portainer-ce:linux-arm
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
6f431a95bb40d4e1bd3f4cc915a3d1c23ecec778a3f46900239629a8770ee040

I countinued receiving a message informing me that the requested platform requested (amd64) does not match the host platform (arm64/v8) ....buti now it works fine..



@gruijter
Copy link

gruijter commented Jan 8, 2021

I strongly suspect this is caused by the same bug as mentioned in #4690

The Portainer image was analyzed by the Docker team, and they found that the arm image is actually using a linux/amd64 base image. See also docker/for-linux#1170 (comment)

@gruijter
Copy link

@deviantony OK to close duplicate issues.

But I cannot find in this thread what is going to be done about it. The base image used for arm is still faulty.

Will this be corrected in the next image release?

@deviantony
Copy link
Member

We're currently investigating a solution for that problem and we'll try to solve it ASAP, we do not any solution for this yet as we're still discussing it but it seems that we'll need to review our build pipeline and potentially review the portainer/base image.

@asage-me
Copy link

I'm also seeing this issue. I'm using a 32bit raspbian and although I can start the container I get an error WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested and I cannot set the initial password. I have wiped the Pi and am in the process of trying the suggested version of Docker from this issue #4585 (comment)

@asage-me
Copy link

I'm also seeing this issue. I'm using a 32bit raspbian and although I can start the container I get an error WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested and I cannot set the initial password. I have wiped the Pi and am in the process of trying the suggested version of Docker from this issue #4585 (comment)

This version does not work for me either. I cannot proceed through the web interface setup. In the logs I see an error:

2021/01/11 21:01:32 Migrating database from version 0 to 24.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x4 pc=0x41038c]

goroutine 1 [running]:
github.com/boltdb/bolt.(*Bucket).Cursor(...)
        /tmp/go/pkg/mod/github.com/boltdb/[email protected]/bucket.go:91
github.com/portainer/portainer/api/bolt/migrator.(*Migrator).retrieveLegacyResourceControls.func1(0x3315c00, 0x0, 0x3315c00)
        /home/vsts/work/1/s/api/bolt/migrator/migrate_dbversion1.go:66 +0x6c
github.com/boltdb/bolt.(*DB).View(0x3302360, 0x314bce0, 0x0, 0x0)
        /tmp/go/pkg/mod/github.com/boltdb/[email protected]/db.go:629 +0x90
github.com/portainer/portainer/api/bolt/migrator.(*Migrator).retrieveLegacyResourceControls(0x314bdb8, 0x3a27c4, 0x0, 0x0, 0x314bfc0, 0x3315b80)
        /home/vsts/work/1/s/api/bolt/migrator/migrate_dbversion1.go:64 +0x74
github.com/portainer/portainer/api/bolt/migrator.(*Migrator).updateResourceControlsToDBVersion2(0x314bdb8, 0x0, 0x0)
        /home/vsts/work/1/s/api/bolt/migrator/migrate_dbversion1.go:10 +0x1c
github.com/portainer/portainer/api/bolt/migrator.(*Migrator).Migrate(0x314bdb8, 0x2a, 0x314bda8)
        /home/vsts/work/1/s/api/bolt/migrator/migrator.go:106 +0x684
github.com/portainer/portainer/api/bolt.(*Store).MigrateData(0x333c540, 0x0, 0x0)
        /home/vsts/work/1/s/api/bolt/datastore.go:148 +0x240
main.initStore(0x9f505b, 0x5, 0xb75eb8, 0x330c270, 0x93cbd8)
        /home/vsts/work/1/s/api/cmd/portainer/main.go:66 +0x138
main.main()
        /home/vsts/work/1/s/api/cmd/portainer/main.go:524 +0x68

@deviantony
Copy link
Member

We've been working on this, could anyone give a try to portainerci/portainer:develop and report any finding?

@gruijter
Copy link

gruijter commented Jan 12, 2021

@deviantony Thx for your effort, but alas, still same issue on mi pi4 (32bit)

The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested

when trying to run with --platform=linux/arm/v7 I get
Error response from daemon: image with reference portainerci/portainer:develop was found but does not match the specified platform: wanted linux/arm/v7, actual: linux/amd64.

Are you building from a amd64 machine in stead of an arm machine?

@deviantony
Copy link
Member

deviantony commented Jan 12, 2021

Thanks for the quick feedback!

cc @ssbkang

@whozur
Copy link

whozur commented Jan 12, 2021

Just did a test and it appears to be successful on my rpi4 8GB running Ubuntu Server 20.04 LTS 64-bit.

I ran the following: docker run -d -p 8000:8000 -p 9000:9000 --name=portainertest --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainertest_data:/data portainerci/portainer:develop

It came back with
Unable to find image 'portainerci/portainer:develop' locally develop: Pulling from portainerci/portainer b890dbc4eb27: Pull complete c8fa7836fb5f: Pull complete Digest: sha256:49b5e4ec7414df20ab8c524f6dddd0bf14208c373b619010d2e4641c7adacdf9 Status: Downloaded newer image for portainerci/portainer:develop

Just did a cursory check of the UI and basic stuff works. Progress! Thanks

@deviantony
Copy link
Member

@gruijter we just updated that image with arm v7 support, keen to give it a try?

@pau1200
Copy link

pau1200 commented Jan 12, 2021

Installing portainer on my rp3 running raspberry pi os lite 64bit and this worked for me.

Thanks

@gruijter
Copy link

@gruijter we just updated that image with arm v7 support, keen to give it a try?

Just tried via my phone, and no errors this time 🥳

Will test some more later, but looking good so far. Many thx!

@stevensbkang
Copy link
Member

Awesome. Thanks @pau1200, @gruijter and @whozur for testing!

@paolonervi
Copy link
Author

I tried now and no more message about the wrong OS...
image
Tks!
Have a nice day!
Paolo

@paul-hammant
Copy link

Works here Odroid w/ DietPi --> armv7l. Thanks everyone.

@paolonervi
Copy link
Author

@deviantony

If i try with portainer-ce i'm still receiving the message about the OS platform (amd and not ARM64).
image
i'm sorry to make this silly question but i'm new in this field...
May you please explain to me the reason. Are portainerci and portainer-ce repository not "linked"..?
Thank you very much for your support.
Paolo.

@paul-hammant
Copy link

portainerci is LIKELY a preview version of what will be placed in the main release. Meaning - we're "beta testing" something that's forthcoming :)

@paolonervi
Copy link
Author

portainerci is LIKELY a preview version of what will be placed in the main release. Meaning - we're "beta testing" something that's forthcoming :)

Hi Paul,
thank you very much for you reply.
Now it's clear.
Thank you for the time you dedicate in answering to me!.
Greetings from Italy.
Paolo.

@kiwichrish
Copy link

Hi-ho,

Working here as well.

Clean build, Raspberry Pi 4..
Ubuntu 20.04.1 64bit patched up to date
docker-ce 20.10.2
/portainerci/portainer:develop ID 7585d1cbda07
Swarm mode using compose file.

Works pulling directly and with the image mirrored to my local registry. (That was variable before as well)

@asage-me
Copy link

I'm not getting the warning when starting the container any more (I actually wasn't with docker version 19.03.13 either) but still cannot proceed through the first time setup. I get the errors below in the logs and in my browser I get a HTTP/1.1 500 Internal Server Error response when trying to save the password. I've tried with both docker version 19.03.13 and 20.10.2. Is this related or should I start a new issue?

2021/01/13 13:22:12 server: Reverse tunnelling enabled
2021/01/13 13:22:12 server: Fingerprint 26:2b:07:94:c1:0e:54:17:4a:7c:40:58:f3:da:c1:bb
2021/01/13 13:22:12 server: Listening on 0.0.0.0:8000...
2021/01/13 13:22:12 Starting Portainer 2.0.1 on :9000
2021/01/13 13:22:12 [DEBUG] [chisel, monitoring] [check_interval_seconds: 10.000000] [message: starting tunnel management process]
2021/01/13 13:27:12 No administrator account was created after 5 min. Shutting down the Portainer instance for security reasons.
2021/01/13 13:27:20 server: Reverse tunnelling enabled
2021/01/13 13:27:20 server: Fingerprint 26:2b:07:94:c1:0e:54:17:4a:7c:40:58:f3:da:c1:bb
2021/01/13 13:27:20 server: Listening on 0.0.0.0:8000...
2021/01/13 13:27:20 Starting Portainer 2.0.1 on :9000
2021/01/13 13:27:20 [DEBUG] [chisel, monitoring] [check_interval_seconds: 10.000000] [message: starting tunnel management process]
2021/01/13 13:32:20 No administrator account was created after 5 min. Shutting down the Portainer instance for security reasons.
2021/01/13 13:32:34 server: Reverse tunnelling enabled
2021/01/13 13:32:34 server: Fingerprint 26:2b:07:94:c1:0e:54:17:4a:7c:40:58:f3:da:c1:bb
2021/01/13 13:32:34 server: Listening on 0.0.0.0:8000...
2021/01/13 13:32:34 Starting Portainer 2.0.1 on :9000
2021/01/13 13:32:34 [DEBUG] [chisel, monitoring] [check_interval_seconds: 10.000000] [message: starting tunnel management process]
2021/01/13 13:33:30 http error: No administrator account found inside the database (err=Object not found inside the database) (code=404)
2021/01/13 13:33:31 http error: No administrator account found inside the database (err=Object not found inside the database) (code=404)
2021/01/13 13:33:32 http error: No administrator account found inside the database (err=Object not found inside the database) (code=404)
2021/01/13 13:33:48 http error: Unable to persist user inside the database (err=input/output error) (code=500)

@gruijter
Copy link

@atsage doesn't look related to me. I had a similar thing happening but was able to correct it.

Remove the container. And also remove the volume. By removing the volume you will delete any old settings that could cause issues. Then run from scratch again and set a new admin password after opening the webpage (localhost:9000)

@asage-me
Copy link

@gruijter thanks, but doesn't work for me. It's odd that I get a message "Total reclaimed space: 0B". I'm used to seeing at least something there... It's also not redownloading the images when starting again which I would have expected it to do.

pi@raspberrypi:/mnt/Containers/Pi4/portainer $ sudo docker stop portainer
portainer
pi@raspberrypi:/mnt/Containers/Pi4/portainer $ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
pi@raspberrypi:/mnt/Containers/Pi4/portainer $ sudo docker system prune
WARNING! This will remove:

  • all stopped containers
  • all networks not used by at least one container
  • all dangling images
  • all dangling build cache

Are you sure you want to continue? [y/N] y
Deleted Containers:
316c8ca5b574e1c3fe194d6a6b62dc9c8caeec97b4ad7c744d922267d4d0cd81

Total reclaimed space: 0B
pi@raspberrypi:/mnt/Containers/Pi4/portainer $ sudo docker volume prune
WARNING! This will remove all local volumes not used by at least one container.
Are you sure you want to continue? [y/N] y
Deleted Volumes:
portainer_data

Total reclaimed space: 0B
pi@raspberrypi:/mnt/Containers/Pi4/portainer $ sudo docker builder prune
WARNING! This will remove all dangling build cache. Are you sure you want to continue? [y/N] y
Total reclaimed space: 0B
pi@raspberrypi:/mnt/Containers/Pi4/portainer $ sudo docker image prune
WARNING! This will remove all dangling images.
Are you sure you want to continue? [y/N] y
Total reclaimed space: 0B
pi@raspberrypi:/mnt/Containers/Pi4/portainer $ ls
data
pi@raspberrypi:/mnt/Containers/Pi4/portainer $ sudo rm -rf data
pi@raspberrypi:/mnt/Containers/Pi4/portainer $ ls
pi@raspberrypi:/mnt/Containers/Pi4/portainer $ sudo docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /mnt/Containers/Pi4/portainer/data:/data portainerci/portainer:develop
68b6889628dc22c97a188033422f59d1819e3bfff172da84458864a1bb2ddec1
pi@raspberrypi:/mnt/Containers/Pi4/portainer $ sudo docker logs portainer
2021/01/13 13:47:14 server: Reverse tunnelling enabled
2021/01/13 13:47:14 server: Fingerprint 26:fe:01:24:03:f2:61:fd:6e:c6:c6:0a:a2:0a:b2:f3
2021/01/13 13:47:14 server: Listening on 0.0.0.0:8000...
2021/01/13 13:47:14 Starting Portainer 2.0.1 on :9000
2021/01/13 13:47:14 [DEBUG] [chisel, monitoring] [check_interval_seconds: 10.000000] [message: starting tunnel management process]
2021/01/13 13:47:45 http error: No administrator account found inside the database (err=Object not found inside the database) (code=404)
2021/01/13 13:47:45 http error: No administrator account found inside the database (err=Object not found inside the database) (code=404)
2021/01/13 13:47:49 http error: No administrator account found inside the database (err=Object not found inside the database) (code=404)
2021/01/13 13:47:59 http error: Unable to persist user inside the database (err=input/output error) (code=500)
pi@raspberrypi:/mnt/Containers/Pi4/portainer $

@asage-me
Copy link

asage-me commented Jan 13, 2021

Ok, I'm an idiot. Forgot the -a flag on docker system prune. All is good now, thanks! This also means the docker version 19.03.13 probably works as I was having the same issue there.

@asage-me
Copy link

Sorry, appears I still have some issues... Again, may not specifically be Pi build related so let me know if I should open a new issue. I am able to set the password and log in now but as soon as I click on "local" to load up the containers I get a HTTP/1.1 500 Internal Server Error in my browser and Unable to persist endpoint changes inside the database (err=input/output error) (code=500) in the docker logs

pi@raspberrypi:/mnt/Containers/Pi4/portainer $ sudo docker logs portainer
2021/01/13 13:59:19 server: Reverse tunnelling enabled
2021/01/13 13:59:19 server: Fingerprint 26:fe:01:24:03:f2:61:fd:6e:c6:c6:0a:a2:0a:b2:f3
2021/01/13 13:59:19 server: Listening on 0.0.0.0:8000...
2021/01/13 13:59:19 Starting Portainer 2.0.1 on :9000
2021/01/13 13:59:19 [DEBUG] [chisel, monitoring] [check_interval_seconds: 10.000000] [message: starting tunnel management process]
2021/01/13 13:59:36 http error: No administrator account found inside the database (err=Object not found inside the database) (code=404)
2021/01/13 13:59:36 http error: No administrator account found inside the database (err=Object not found inside the database) (code=404)
2021/01/13 14:02:03 http error: Unable to persist endpoint changes inside the database (err=input/output error) (code=500)
2021/01/13 14:02:14 http error: Unable to persist endpoint changes inside the database (err=input/output error) (code=500)
2021/01/13 14:04:20 background schedule error (endpoint snapshot). Unable to update endpoint (endpoint=local, URL=unix:///var/run/docker.sock) (err=input/output error)
2021/01/13 14:06:01 server: Reverse tunnelling enabled
2021/01/13 14:06:01 server: Fingerprint 26:fe:01:24:03:f2:61:fd:6e:c6:c6:0a:a2:0a:b2:f3
2021/01/13 14:06:01 server: Listening on 0.0.0.0:8000...
2021/01/13 14:06:01 Starting Portainer 2.0.1 on :9000
2021/01/13 14:06:01 [DEBUG] [chisel, monitoring] [check_interval_seconds: 10.000000] [message: starting tunnel management process]
2021/01/13 14:06:30 http error: Invalid JWT token (err=Invalid JWT token) (code=401)
2021/01/13 14:06:30 http error: Invalid JWT token (err=Invalid JWT token) (code=401)
2021/01/13 14:06:30 http error: Invalid JWT token (err=Invalid JWT token) (code=401)
2021/01/13 14:06:30 http error: Invalid JWT token (err=Invalid JWT token) (code=401)
2021/01/13 14:06:58 http error: Unable to persist endpoint changes inside the database (err=input/output error) (code=500)

@asage-me
Copy link

I believe I have tracked down the issues but it's definitely not related to this issue. I have created a new issue here #4705

@deviantony
Copy link
Member

Thank you for the quick feedback everyone!

This fix will be included in the next release (2.1, ETA end of January 2021). In the meantime, you can use our development build (portainerci/portainer:develop) but be aware that we do not recommend running this one in any production environment as it has not been tested yet.

@ghost
Copy link

ghost commented Jan 13, 2021

Changes LGTM! Closing as the fix was done to the CI and will be part of the 2.1 release

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants