markdegrootnl / unifi-protect-x86

Run UniFi Protect in Docker on x86 hardware
49 stars 7 forks source link

Container keeps exiting #4

Closed tannercollin closed 3 years ago

tannercollin commented 3 years ago

I'm unable to keep the container running on a fresh Ubuntu 18.04 VM. This is what's happening:

test@test:~$ sudo docker run --privileged   --tmpfs /srv/unifi-protect/temp     -p 7080:7080     -p 7443:7443     -p 7444:7444     -p 7447:7447     -p 7550:7550     -p 7442:7442     -m 2048m     -v unifi-protect-db:/var/lib/postgresql/10/main     -v unifi-protect:/srv/unifi-protect     markdegroot/unifi-protect-x86:latest
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
database exists
Removed stale pid file.
createuser: creation of new role failed: ERROR:  role "unifi-protect" already exists
Database exists, checking ownership
Database is already owned by unifi-protect
CONFIG LOADED : /usr/share/unifi-protect/app/config/config.json
workers pool `Read` is set to 4 concurrent workers
workers pool `Write` is set to 8 concurrent workers
workers pool `Transcode` is set to 8 concurrent workers
workers pool `DnsResolve` is set to 16 concurrent workers
workers pool `Misc` is set to 1 concurrent workers
workers pool `Global` is set to 1 concurrent workers
workers pool `Serve` is set to 106 concurrent workers
Cannot find module 'pg-native'
CONFIG LOADED : /usr/share/unifi-protect/app/config/config.json
Wed, 06 Oct 2021 21:08:17 GMT sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators at usr/share/unifi-protect/app/node_modules/sequelize/lib/sequelize.js:245:13
test@test:~$ 

Does anyone have any idea why? Thanks!

tannercollin commented 3 years ago

After pruning everything, I get a different output:

test@test:~$ sudo docker run --privileged   --tmpfs /srv/unifi-protect/temp     -p 7080:7080     -p 7443:7443     -p 7444:7444     -p 7447:7447     -p 7550:7550     -p 7442:7442     -m 2048m     -v unifi-protect-db:/var/lib/postgresql/10/main     -v unifi-protect:/srv/unifi-protect     markdegroot/unifi-protect-x86:latest
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
database exists
Database does not exist
CONFIG LOADED : /usr/share/unifi-protect/app/config/config.json
2021-10-08T23:02:15.195Z - error: Watchdog fails to open log file Error: ENOENT: no such file or directory, open '/srv/unifi-protect/logs/watchdog.log'
2021-10-08T23:02:15.195Z - info: Initializing rollbar
workers pool `Read` is set to 4 concurrent workers
workers pool `Write` is set to 8 concurrent workers
workers pool `Transcode` is set to 8 concurrent workers
workers pool `DnsResolve` is set to 16 concurrent workers
workers pool `Misc` is set to 1 concurrent workers
workers pool `Global` is set to 1 concurrent workers
workers pool `Serve` is set to 106 concurrent workers
Cannot find module 'pg-native'
CONFIG LOADED : /usr/share/unifi-protect/app/config/config.json
Certificate /srv/unifi-protect/data/unifi-protect.crt not found.... generating
Device certificate /srv/unifi-protect/data/devices.crt not found.... generating
2021-10-08T23:02:16.128Z - info: Parent receives startup-init
Fri, 08 Oct 2021 23:02:19 GMT sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators at usr/share/unifi-protect/app/node_modules/sequelize/lib/sequelize.js:245:13
2021-10-08T23:02:20.744Z - info: Parent process received startup-complete.
2021-10-08T23:02:24.104Z - info: Child process exited with exitCode 0 and signal null.
2021-10-08T23:02:24.105Z - info: Parent process exits with exitCode 0
tannercollin commented 3 years ago

Solved the issue by just buying a Cloud Key Gen2 Plus.