Raspberry Pi 2/3 docker installation "exec format error"
Running Raspbian (latest) on Raspberry Pi 3 (i've also tested this on Pi 2).
Every time I try to bring this container up on Pi3, the container starts, then immediately stops and I run into the following error...
standard_init_linux.go:211: exec user process caused "exec format error"
I've tried changing the docker-compose.yml file so that it pulls the arm64 tag, but it still fails.
I've also tried modifying it so it uses the mariadb/latest image instead of mariadb-aria image.
What am I missing? I'd like to get this running alongside PiHole on my Pi 3 if possible. That was DNS and Proxy Hosts (for internal servers, not external use) would be on the same machine.
Definitely looks like an architecture mismatch. The latest tag is multi arch and the arm64 image is compiled on a rpi3. Afaik raspbian is not arm64 yet and you have to use the armhf image though.
On Fri, 3 Jan 2020 at 7:58 am, Jeff [email protected] wrote:
Running Raspbian (latest) on Raspberry Pi 3 (i've also tested this on Pi 2).
Every time I try to bring this container up on Pi3, the container starts, then immediately stops and I run into the following error...
standard_init_linux.go:211: exec user process caused "exec format error"
I've tried changing the docker-compose.yml file so that it pulls the arm64 tag, but it still fails.
I've also tried modifying it so it uses the mariadb/latest image instead of mariadb-aria image.
What am I missing? I'd like to get this running alongside PiHole on my Pi 3 if possible. That was DNS and Proxy Hosts (for internal servers, not external use) would be on the same machine.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jc21/nginx-proxy-manager/issues/269?email_source=notifications&email_token=AALSVMMCSPK3AVHVHYVCB6LQ3ZPO5A5CNFSM4KCHDQDKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IDYOL7Q, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALSVMKXVJDGAAHHTHEE4PLQ3ZPO5ANCNFSM4KCHDQDA .
Thanks for the prompt reply!
Ok, I was just using the wrong arm architecture. I used dpkg --print-architecture to verify it's armhf
I've changed the dockerfile to use the following images...
jc21/nginx-proxy-manager:latest-armhf linuxserver/mariadb (seems to work so far - it has an armhf image)
I've gotten further with the app container - but now I get this error...
Uncaught Error: Cannot find module '/app/node_modules/nodemon/bin/nodemon.js' FROM Function.Module._resolveFilename (internal/modules/cjs/loader.js:1:1) Function.Module._load (internal/modules/cjs/loader.js:1:1) Function.Module.runMain (internal/modules/cjs/loader.js:1:1) startup (internal/bootstrap/node.js:1:1) bootstrapNodeJSCore (internal/bootstrap/node.js:1:1)
Also, using jc21/nginx-proxy-manager-base:latest resulted in those architecture issues in the first place.
Jeff Kleinhenz
On Thu, Jan 2, 2020 at 4:19 PM Jeff Kleinhenz [email protected] wrote:
Thanks for the prompt reply!
Ok, I was just using the wrong arm architecture. I used dpkg --print-architecture to verify it's armhf
I've changed the dockerfile to use the following images...
jc21/nginx-proxy-manager:latest-armhf linuxserver/mariadb (seems to work so far - it has an armhf image)
I've gotten further with the app container - but now I get this error...
Uncaught Error: Cannot find module '/app/node_modules/nodemon/bin/nodemon.js'
FROM
Function.Module._resolveFilename (internal/modules/cjs/loader.js:1:1)
Function.Module._load (internal/modules/cjs/loader.js:1:1)
Function.Module.runMain (internal/modules/cjs/loader.js:1:1)
startup (internal/bootstrap/node.js:1:1)
bootstrapNodeJSCore (internal/bootstrap/node.js:1:1)
Jeff Kleinhenz
On Thu, Jan 2, 2020 at 4:05 PM jc21 [email protected] wrote:
Definitely looks like an architecture mismatch. The latest tag is multi arch and the arm64 image is compiled on a rpi3. Afaik raspbian is not arm64 yet and you have to use the armhf image though.
On Fri, 3 Jan 2020 at 7:58 am, Jeff [email protected] wrote:
Running Raspbian (latest) on Raspberry Pi 3 (i've also tested this on Pi 2).
Every time I try to bring this container up on Pi3, the container starts, then immediately stops and I run into the following error...
standard_init_linux.go:211: exec user process caused "exec format error"
I've tried changing the docker-compose.yml file so that it pulls the arm64 tag, but it still fails.
I've also tried modifying it so it uses the mariadb/latest image instead of mariadb-aria image.
What am I missing? I'd like to get this running alongside PiHole on my Pi 3 if possible. That was DNS and Proxy Hosts (for internal servers, not external use) would be on the same machine.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/jc21/nginx-proxy-manager/issues/269?email_source=notifications&email_token=AALSVMMCSPK3AVHVHYVCB6LQ3ZPO5A5CNFSM4KCHDQDKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IDYOL7Q , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AALSVMKXVJDGAAHHTHEE4PLQ3ZPO5ANCNFSM4KCHDQDA
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jc21/nginx-proxy-manager/issues/269?email_source=notifications&email_token=AFAGAW5QVWWC2TWWM5M3IN3Q3ZQJHA5CNFSM4KCHDQDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH7SRRQ#issuecomment-570370246, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAGAW4CWGGUT6XASRL2HLLQ3ZQJHANCNFSM4KCHDQDA .
Sounds like you're using the wrong docker-compose file. Nodemon is a development only tool. See this production example: https://github.com/jc21/nginx-proxy-manager/blob/master/doc/example/docker-compose.yml
Ok, I created a new docker-compose.yml with that example. Changed the mariadb image again since the one in that file still does not work on Pi 3.
root@docker-pihole-nginx:/container-data/nginx-proxy-manager# docker-compose up -d Pulling db (mariadb:latest)... latest: Pulling from library/mariadb ERROR: no matching manifest for linux/arm/v7 in the manifest list entries
I had also missed the config.json file. I added that. Now, i'm running into this... If you think this is because of linuxserver/mariadb, please let me know if there is another mariadb image for Pi 3 that you would recommend.
[1/2/2020] [10:56:48 PM] [Global ] › ✖ error Cannot find module
'./dialects/mariadb/index.js' { Error: Cannot find module
'./dialects/mariadb/index.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Knex (/app/node_modules/knex/lib/index.js:49:15)
at Object.
Yep so that is because your config file is specifying "mariadb" for the db engine instead of "mysql". The App uses the Mysql client for the MariaDB connection.
Ok. I switched it back to mariadb. But i'm still having issues. At the moment, i've resigned to installing mariadb on the raspberry pi host instead of a container. However, now i'm unsure of how to make the app connect to that instead. I've created tables, set Aria as the default (trying to match what you did with docker-mariadb-aria by adding that config to /etc/mysql/mariadb.cnf), added the npm user and granted all permissions. I just keep getting connection refused
[1/3/2020] [4:12:19 AM] [Global ] › ✖ error connect ECONNREFUSED [pi-LAN-IP]:3306
Going back to having the app connect to the db container instead, setting Aria as default, creating user, etc...
rate ] › ℹ info Current database version: none
[1/3/2020] [4:17:42 AM] [Migrate ] › ℹ info [initial-schema] Migrating Up...
migration file "20190227065017_settings.js" failed
migration failed with error: create table auth (id int unsigned not null auto_increment primary key, created_on datetime not null, modified_on datetime not null, user_id int unsigned not null, type varchar(30) not null, secret varchar(255) not null, meta json not null, is_deleted int unsigned not null default '0') - ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json not null, is_deleted int unsigned not null default '0')' at line 1
[1/3/2020] [4:17:42 AM] [Global ] › ✖ error create table auth (id int unsigned not null auto_increment primary key, created_on datetime not null, modified_on datetime not null, user_id int unsigned not null, type varchar(30) not null, secret varchar(255) not null, meta json not null, is_deleted int unsigned not null default '0') - ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json not null, is_deleted int unsigned not null default '0')' at line 1
So 2 things:
- Your maria db install is old. It doesn't support the
jsonfield type. Apparently it was added in 10.2 - Your PI either has some firewall or your Maria db install isn't listening on your public LAN IP. You can test that by telnet'ing to 3306 on your Pi LAN IP from another machine on the network. You may want to consider using this docker stack in Host Network mode which means that port 80,81 and 443 will be open on the LAN IP and directly accessing the NPM container. It also means you should be able to use
127.0.0.1:3306to connect to your DB, assuming it's still running natively.
To enable host network for the service, just add network_mode: host to the docker-compose file.
Yep. Running 10.1.38. Doesn't look like they're developing for ARM at the moment so I may be out of luck there...
root@docker-pihole-nginx:~# mysql --version mysql Ver 15.1 Distrib 10.1.38-MariaDB, for debian-linux-gnueabihf (armv7l) using readline 5.2
Running a port scan doesn't show 3306 as being open, but it wouldn't matter anyway seeing as mariadb 10.1 doesn't support JSON fields. If that's the case, it wouldn't really be worth it to try the host network either.
While I can compile a newer version of this, i'm wondering if it's even worth it considering there may be unforeseen issues with it.
Also, it looks like the version of Raspbian I have installed is based on Debian Stretch - which may explain why mariadb-10.1.x got installed. https://www.raspberrypi.org/forums/viewtopic.php?t=250655 Looks like Buster may be able to provide 10.3.x. I'll try that next then.
Ok. I've got the following...
- Raspbian Buster
- mysql Ver 15.1 Distrib 10.3.17-MariaDB, for debian-linux-gnueabihf (armv7l) using readline 5.2
- Aria set as default storage engine in my.cnf
- my.cnf contents
[mysqld] skip-innodb default-storage-engine=Aria default-tmp-storage-engine=Aria innodb=OFF symbolic-links=0 log-output=file bind-address=127.0.0.1
- set the MYSQL_HOST to 127.0.0.1 in config.json
- db lines in docker-compose commented out, the app starts, but remains in unhealthy state.
I'm now getting these errors on the setting table
[1/3/2020] [6:01:12 PM] [Global ] › ✖ error create table
setting(idvarchar(255) not null,namevarchar(100) not null,descriptionvarchar(255) not null,valuevarchar(255) not null,metajson not null) - ER_TABLE_EXISTS_ERROR: Table 'setting' already exists, migration file "20190227065017_settings.js" failed, [1/3/2020] [6:01:12 PM] [Migrate ] › ℹ info [settings] Migrating Up..., [1/3/2020] [6:01:11 PM] [Migrate ] › ℹ info Current database version: 20190218060101, migration failed with error: create tablesetting(idvarchar(255) not null,namevarchar(100) not null,descriptionvarchar(255) not null,valuevarchar(255) not null,metajson not null) - ER_TABLE_EXISTS_ERROR: Table 'setting' already exists
I got it working. However, I just used the solution for the Pi 3B referenced in Issue #146 . Thank you for all your help @jc21. Thanks @talondmb for the solution. I had gone through a couple mariadb containers before, but hadn't reached that one.
I should also note that I was still having access denied errors and had to add the [email protected] user to mariadb to get it working.
Just wanted to post this as I managed to get it running on a RPI 3B:
version: "3" services: app: image: jc21/nginx-proxy-manager:latest restart: always ports: # Public HTTP Port: - 80:80 # Public HTTPS Port: - 443:443 # Admin Web Port: - 81:81 volumes: # Make sure this config.json file exists as per instructions above: - ./config.json:/app/config/production.json - ./data:/data - ./letsencrypt:/etc/letsencrypt depends_on: - db db: image: yobasystems/alpine-mariadb:latest restart: always environment: MYSQL_ROOT_PASSWORD: "npm" MYSQL_DATABASE: "npm" MYSQL_USER: "npm" MYSQL_PASSWORD: "password" volumes: - ./data/mysql:/var/lib/mysql
@jeff89179 You save me.......
thanks........
If anyone is having issues with getting the db to work on a raspberry pi, I've regularly had luck with this DB: https://hub.docker.com/r/webhippie/mariadb/
I followed the instructions in https://nginxproxymanager.com/#quick-setup page, but I am getting the error: [6/13/2020] [10:01:36 PM] [Global ] › ✖ error getaddrinfo ENOTFOUND db I am running docker on RaspberryPi 4, 4 GB Any thoughts?