Open Marki-dev opened 2 years ago
Does restarting the docker container help at all? I realize it’s random and hard to reproduce, but when this happened to me and I got completely locked out, restarting the container always fixed it.
On Sep 29, 2021, at 2:24 PM, Thyke Adams @.***> wrote:
Checklist
Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image? Yes Are you sure you're not using someone else's docker image? Yes Have you searched for similar issues (both open and closed)? Yes Describe the bug
This is the second time it has happened to me, but i try to log into NPM ant it takes forever then (if) it lets me in, none of my proxies load, If I check the console i get this [9/29/2021] [7:17:17 PM] [Express ] › ⚠ warning Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
Nginx Proxy Manager Version
2.9.4
To Reproduce Steps to reproduce the behavior: Unable to show steps for reproduction as It happens randomly
Expected behavior
I should be allowed to login and see my stuff
Screenshots
https://thykeis.gay/i/aB8QcLlKQf https://thykeis.gay/i/aB8QcLlKQf Operating System
Docker on Debian 10
Additional context
— 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/1442, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGI5CYSE4GITT2CKHB2KMEDUENRYXANCNFSM5FAUHOZA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
ill try that rn, last time it happened, I restarted and then the docker container refused to start at all
+1 docker restart helps but it's less than ideal. I really only see this impacting folks that are first configuring/triaging so it becomes more apparent? either way - if I can provide you with anything to investigate. Let me know. Thanks!
I just updated to the latest version and re-added all streams/proxies, I’ll update this if it happens again with the latest version
Maybe it has to do with the database not being available yet or still being set up? We'll have to wait for more detailed reports
its my first time installing this image and its happenig to me too but restarting the container isnt fixing it even temporarily
is this only a problem when installing the image in portainer? if so, whats the proper portainer configuration? maybe im missing a setting?
if i stop the container, i can still see the login page when i refresh.
another thing is if i start the container and open an incognito window in chrome i can not get the login page to be displayed
here are my logs
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01_perms.sh: executing...
Changing ownership of /data/logs to 0:0
[cont-init.d] 01_perms.sh: exited 0.
[cont-init.d] 01_s6-secret-init.sh: executing...
[cont-init.d] 01_s6-secret-init.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
❯ Enabling IPV6 in hosts: /etc/nginx/conf.d
❯ /etc/nginx/conf.d/production.conf
❯ /etc/nginx/conf.d/default.conf
❯ /etc/nginx/conf.d/include/ip_ranges.conf
❯ /etc/nginx/conf.d/include/proxy.conf
❯ /etc/nginx/conf.d/include/block-exploits.conf
❯ /etc/nginx/conf.d/include/ssl-ciphers.conf
❯ /etc/nginx/conf.d/include/assets.conf
❯ /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf
❯ /etc/nginx/conf.d/include/force-ssl.conf
❯ /etc/nginx/conf.d/include/resolvers.conf
❯ Enabling IPV6 in hosts: /data/nginx
❯ /data/nginx/proxy_host/2.conf
❯ /data/nginx/ip_ranges.conf
❯ /data/nginx/resolvers.conf
WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
[10/17/2021] [7:06:10 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:06:21 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:06:32 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:06:43 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:06:54 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:07:05 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:07:16 AM] [Global ] › ✖ error getaddrinfo ENOTFOUND db
[10/17/2021] [7:07:27 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:07:38 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:07:49 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:08:00 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:08:11 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:08:22 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:08:33 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:08:44 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:08:55 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:09:06 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:09:17 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:09:28 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:09:39 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:09:50 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:10:01 AM] [Global ] › ✖ error connect ETIMEDOUT
[10/17/2021] [7:10:12 AM] [Global ] › ✖ error connect ETIMEDOUT
something about the environment variable "production". i have not even set that env variable.
also related, if i create the container in portainer then refresh the page, my ip and ports disappear from the container list.
@merrychrishna You probably just don't have the database and npm in the same docker network. At least npm is not able to connect to the database container. Or maybe you gave your database container a different name and it is not resolvable under the name db
?
@chaptergy i think youre right about it being a problem with npm. im a noob. is there a guide on setting everything up starting from installing npm on ubuntu then docker then portainer then nginx?
NginxProxyManager (NPM) requires docker, so docker is the first thing you have to install. There is no official documentation going that much into detail, but you should be able to find some articles when searching the web. If you want to deploy NPM via portainer, you'll need to install docker and portainer first, and could then use the app templates > custom templates to paste the docker-compose file into portainer and deploy it. Nginx is already bundled in NPM, so you shouldn't have to explicitly install it.
@chaptergy i managed to find some help in the portainer discord. i will post my note at the end of this message. i just havent been able to check the letsencrypt certificates out yet because they are cooling down due to too many failed attempts at issueing renewing the certs. i dont know how long the cool down takes but i think i read it will take less than a week but thats not very much info that i could find about letsencrypt cooldowns.
heres my notes that got me all setup that might help someone else
delete any and all nginx containers
docker ps -a
docker stop 1d2687ed0a90
docker rm 1d2687ed0a90
create directories with mkdir ~/projects/npm/
cd ~/projects/npm/
nano -c docker-compose.yml
add this to nano
version: "3"
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
container_name: npm2021
restart: always
ports:
# HTTP port
- '8080:80'
# HTTPS Port:
- '8443:443'
# Admin UI
- '8181:81'
environment:
DB_SQLITE_FILE: "/data/npm.sqlite"
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
run this command
docker-compose up -d
login to nginx manager on port 8181
I am having the same issue when deploying the container through portainer in a docker swarm. I can see the log in screen but when I attempt to login with default credentials I get bad gateway error.
From monitoring the portainer logs it looks like NPM is unable to write to db.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01_perms.sh: executing...
Changing ownership of /data/logs to 0:0
[cont-init.d] 01_perms.sh: exited 0.
[cont-init.d] 01_s6-secret-init.sh: executing...
[cont-init.d] 01_s6-secret-init.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
❯ Enabling IPV6 in hosts: /etc/nginx/conf.d
❯ /etc/nginx/conf.d/include/proxy.conf
❯ /etc/nginx/conf.d/include/block-exploits.conf
❯ /etc/nginx/conf.d/include/ip_ranges.conf
❯ /etc/nginx/conf.d/include/ssl-ciphers.conf
❯ /etc/nginx/conf.d/include/assets.conf
❯ /etc/nginx/conf.d/include/force-ssl.conf
❯ /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf
❯ /etc/nginx/conf.d/include/resolvers.conf
❯ /etc/nginx/conf.d/default.conf
❯ /etc/nginx/conf.d/production.conf
❯ Enabling IPV6 in hosts: /data/nginx
[1/13/2022] [4:54:25 AM] [Global ] › ℹ info No valid environment variables for database provided, using default SQLite file '/data/database.sqlite'
[1/13/2022] [4:54:25 AM] [Global ] › ℹ info Generating SQLite knex configuration
[1/13/2022] [4:54:25 AM] [Global ] › ⬤ debug Wrote db configuration to config file: ./config/production.json
[1/13/2022] [4:54:29 AM] [Global ] › ✖ error create table `knex_migrations` (`id` integer not null primary key autoincrement, `name` varchar(255), `batch` integer, `migration_time` datetime) - SQLITE_BUSY: database is locked
[1/13/2022] [4:54:30 AM] [Global ] › ℹ info No valid environment variables for database provided, using default SQLite file '/data/database.sqlite'
[1/13/2022] [4:54:31 AM] [Global ] › ✖ error create table `knex_migrations` (`id` integer not null primary key autoincrement, `name` varchar(255), `batch` integer, `migration_time` datetime) - SQLITE_BUSY: database is locked
[1/13/2022] [4:54:32 AM] [Global ] › ℹ info No valid environment variables for database provided, using default SQLite file '/data/database.sqlite'
[1/13/2022] [4:54:33 AM] [Global ] › ✖ error create table `knex_migrations` (`id` integer not null primary key autoincrement, `name` varchar(255), `batch` integer, `migration_time` datetime) - SQLITE_BUSY: database is locked
[1/13/2022] [4:54:34 AM] [Global ] › ℹ info No valid environment variables for database provided, using default SQLite file '/data/database.sqlite'
[1/13/2022] [4:54:35 AM] [Global ] › ✖ error create table `knex_migrations` (`id` integer not null primary key autoincrement, `name` varchar(255), `batch` integer, `migration_time` datetime) - SQLITE_BUSY: database is locked
[1/13/2022] [4:54:36 AM] [Global ] › ℹ info No valid environment variables for database provided, using default SQLite file '/data/database.sqlite'
[1/13/2022] [4:54:37 AM] [Global ] › ✖ error create table `knex_migrations` (`id` integer not null primary key autoincrement, `name` varchar(255), `batch` integer, `migration_time` datetime) - SQLITE_BUSY: database is locked
[1/13/2022] [4:54:38 AM] [Global ] › ℹ info No valid environment variables for database provided, using default SQLite file '/data/database.sqlite'
[1/13/2022] [4:54:39 AM] [Global ] › ✖ error create table `knex_migrations` (`id` integer not null primary key autoincrement, `name` varchar(255), `batch` integer, `migration_time` datetime) - SQLITE_BUSY: database is locked
[1/13/2022] [4:54:40 AM] [Global ] › ℹ info No valid environment variables for database provided, using default SQLite file '/data/database.sqlite'
@sharkaccident Have a look at https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1678, maybe that helps. I'm not familiar with docker swarm, could it also be that multiple instances of the same docker container try to access the database file and somehow block each other?
@chaptergy . Changing fstab to in include nolock:
//myserver /mymount cifs username=*,password=*,nolock,uid=1000,gid=1000
worked!
For me it worked to have this db-image instead of the latest:
jc21/mariadb-aria:10.4.15-innodb
Issue is now considered stale. If you want to keep it open, please comment :+1:
Checklist
jc21/nginx-proxy-manager:latest
docker image?Describe the bug
This is the second time it has happened to me, but i try to log into NPM ant it takes forever then (if) it lets me in, none of my proxies load, If I check the console i get this
[9/29/2021] [7:17:17 PM] [Express ] › ⚠ warning Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
Nginx Proxy Manager Version
2.9.4
To Reproduce Steps to reproduce the behavior: Unable to show steps for reproduction as It happens randomly
Expected behavior
I should be allowed to login and see my stuff
Screenshots
https://thykeis.gay/i/aB8QcLlKQf
Operating System
Docker on Debian 10
Additional context