mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #269] Raspberry Pi 2/3 docker installation "exec format error" #235
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#235
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jeffest-jeff on GitHub (Jan 2, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/269
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.
@jc21 commented on GitHub (Jan 2, 2020):
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 notifications@github.com wrote:
@jeffest-jeff commented on GitHub (Jan 2, 2020):
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)
@jeffest-jeff commented on GitHub (Jan 2, 2020):
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 jeff89179@gmail.com wrote:
@jc21 commented on GitHub (Jan 2, 2020):
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
@jeffest-jeff commented on GitHub (Jan 2, 2020):
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. (/app/src/backend/db.js:25:33)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/app/src/backend/migrate.js:1:78)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js
(internal/modules/cjs/loader.js:700:10) code: 'MODULE_NOT_FOUND' }
@jc21 commented on GitHub (Jan 2, 2020):
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.
@jeffest-jeff commented on GitHub (Jan 3, 2020):
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(idint unsigned not null auto_increment primary key,created_ondatetime not null,modified_ondatetime not null,user_idint unsigned not null,typevarchar(30) not null,secretvarchar(255) not null,metajson not null,is_deletedint 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_deletedint unsigned not null default '0')' at line 1[1/3/2020] [4:17:42 AM] [Global ] › ✖ error create table
auth(idint unsigned not null auto_increment primary key,created_ondatetime not null,modified_ondatetime not null,user_idint unsigned not null,typevarchar(30) not null,secretvarchar(255) not null,metajson not null,is_deletedint 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_deletedint unsigned not null default '0')' at line 1@jc21 commented on GitHub (Jan 3, 2020):
So 2 things:
jsonfield type. Apparently it was added in 10.2127.0.0.1:3306to connect to your DB, assuming it's still running natively.@jc21 commented on GitHub (Jan 3, 2020):
To enable host network for the service, just add
network_mode: hostto the docker-compose file.@jeffest-jeff commented on GitHub (Jan 3, 2020):
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.
@jeffest-jeff commented on GitHub (Jan 3, 2020):
Ok. I've got the following...
I'm now getting these errors on the setting table
@jeffest-jeff commented on GitHub (Jan 3, 2020):
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 npm@172.18.0.3 user to mariadb to get it working.
@joseska commented on GitHub (Mar 4, 2020):
@jeff89179 You save me.......
thanks........
@nldoty commented on GitHub (Apr 20, 2020):
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/
@shadynafie commented on GitHub (Jun 13, 2020):
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?