NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
22.89k stars 2.66k forks source link

Upgrade | Missing Proxy Host #1694

Open sdh91 opened 2 years ago

sdh91 commented 2 years ago

I recently upgrade from 2.8.x to the latest version. I utilized a docker pull then docker compose up -d. After performing this I first had to login with the default creds again. Which was strange for me. Now my proxy host are gone. However, the previous host setups I had are working just fine even though they don't appear in my proxy host list. How can I fix this so I can delete a host if need be?

chaptergy commented 2 years ago

It seems unfortunately then somehow the database was cleared. Not sure how this could happen during the upgrade process. Do you remember the exact version you were on and which version you are on now?
But unfortunately there is no other fix than to restore a database backup or to create new proxy hosts.

boostedgti916 commented 2 years ago

I am having the same issue. Nothing shows but everything still works.. Went from 2.9.9 to 2.9.13

I tried sudo docker-compose down && sudo docker-compose up -d with no luck. Help?

chaptergy commented 2 years ago

Do you still have the logs from your first boot after the upgrade? Maybe they contain useful information.
But as I said, unfortunately there is no undo for that, If you do not have a database backup, you'll need to recreate the hosts.

boostedgti916 commented 2 years ago

Which log would you like? I can grab the log before I restore my VM

Also how can I upgrade without this happening again? This is the second time

chaptergy commented 2 years ago

In this case mainly the docker logs. But since I have now idea how the database got cleared I don't know how to not have it do that, you'll have to try whether that was a one time thing or is reproducible.

boostedgti916 commented 2 years ago

Its reproducible I try to update with this.

docker-compose pull
docker-compose up -d
chaptergy commented 2 years ago

I am not able to reproduce this using the following steps:

  1. Create a docker-compose file using jc21/nginx-proxy-manager:2.9.9 image and a mysql db
  2. docker-compose up
  3. Change email, password and create a few proxy hosts
  4. Stop the containers
  5. Change the docker-compose from jc21/nginx-proxy-manager:2.9.9 to jc21/nginx-proxy-manager:2.9.13
  6. docker-compose pull
  7. docker-compose up

After booting the user is still changed and the proxy hosts are still there. So it has to be something specific to your configuration. Have you used the then suggested yaml file and made sure the mysql data is persisted in a volume or on disk?

mjg36710 commented 2 years ago

I am having the same issue. Nothing shows but everything still works.. Went from 2.9.9 to 2.9.13

I tried sudo docker-compose down && sudo docker-compose up -d with no luck. Help?

Having a similar issue just wondering if anyone was able to figure this out?

github-actions[bot] commented 8 months ago

Issue is now considered stale. If you want to keep it open, please comment :+1:

noisymime commented 6 months ago

Just had the same thing when upgrading from 2.3.1 to 2.11.2. Looking at the logs it appeared to started the migration but then a bunch of the tables are recreated rather than existing ones being altered.


[5/7/2024] [1:08:25 AM] [Global   ] › ℹ  info      Using Sqlite: /data/database.sqlite
[5/7/2024] [1:08:25 AM] [Global   ] › ℹ  info      Creating a new JWT key pair...
[5/7/2024] [1:09:26 AM] [Global   ] › ℹ  info      Wrote JWT key pair to config file: /data/keys.json
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [initial-schema] Migrating Up...
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [initial-schema] auth Table created
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [initial-schema] user Table created
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [initial-schema] user_permission Table created
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [initial-schema] proxy_host Table created
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [initial-schema] redirection_host Table created
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [initial-schema] dead_host Table created
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [initial-schema] stream Table created
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [initial-schema] access_list Table created
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [initial-schema] certificate Table created
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [initial-schema] access_list_auth Table created
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [initial-schema] audit_log Table created
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [websockets] Migrating Up...
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [websockets] proxy_host Table altered
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [forward_host] Migrating Up...
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [forward_host] proxy_host Table altered
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [http2_support] Migrating Up...
[5/7/2024] [1:09:34 AM] [Migrate  ] › ℹ  info      [http2_support] proxy_host Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [http2_support] redirection_host Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [http2_support] dead_host Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [forward_scheme] Migrating Up...
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [forward_scheme] proxy_host Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [disabled] Migrating Up...
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [disabled] proxy_host Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [disabled] redirection_host Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [disabled] dead_host Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [disabled] stream Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [custom_locations] Migrating Up...
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [custom_locations] proxy_host Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [hsts] Migrating Up...
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [hsts] proxy_host Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [hsts] redirection_host Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [hsts] dead_host Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [settings] Migrating Up...
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [settings] setting Table created
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [access_list_client] Migrating Up...
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [access_list_client] access_list_client Table created
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [access_list_client] access_list Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [access_list_client_fix] Migrating Up...
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [access_list_client_fix] access_list Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [pass_auth] Migrating Up...
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [pass_auth] access_list Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [redirection_scheme] Migrating Up...
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [redirection_scheme] redirection_host Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [redirection_status_code] Migrating Up...
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [redirection_status_code] redirection_host Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [stream_domain] Migrating Up...
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [stream_domain] stream Table altered
[5/7/2024] [1:09:35 AM] [Migrate  ] › ℹ  info      [stream_domain] Migrating Up...
[5/7/2024] [1:09:35 AM] [Setup    ] › ℹ  info      Creating a new user: admin@example.com with password: changeme
[5/7/2024] [1:09:38 AM] [Setup    ] › ℹ  info      Default settings added
[5/7/2024] [1:09:38 AM] [Setup    ] › ℹ  info      Logrotate Timer initialized
[5/7/2024] [1:09:38 AM] [Global   ] › ⬤  debug     CMD: logrotate /etc/logrotate.d/nginx-proxy-manager
[5/7/2024] [1:09:38 AM] [Setup    ] › ℹ  info      Logrotate completed.
[5/7/2024] [1:09:38 AM] [IP Ranges] › ℹ  info      Fetching IP Ranges from online services...
[5/7/2024] [1:09:38 AM] [IP Ranges] › ℹ  info      Fetching https://ip-ranges.amazonaws.com/ip-ranges.json
[5/7/2024] [1:09:39 AM] [IP Ranges] › ℹ  info      Fetching https://www.cloudflare.com/ips-v4
[5/7/2024] [1:09:40 AM] [IP Ranges] › ℹ  info      Fetching https://www.cloudflare.com/ips-v6
[5/7/2024] [1:09:40 AM] [SSL      ] › ℹ  info      Let's Encrypt Renewal Timer initialized
[5/7/2024] [1:09:40 AM] [SSL      ] › ℹ  info      Renewing SSL certs expiring within 30 days ...
[5/7/2024] [1:09:40 AM] [IP Ranges] › ℹ  info      IP Ranges Renewal Timer initialized
[5/7/2024] [1:09:40 AM] [Global   ] › ℹ  info      Backend PID 158 listening on port 3000 ...
[5/7/2024] [1:09:40 AM] [SSL      ] › ℹ  info      Completed SSL cert renew process