Git Product home page Git Product logo

Comments (5)

Nico640 avatar Nico640 commented on September 18, 2024

Take a look at both your unms log (/home/pi/unms/unms/logs/unms.log) and your container log (docker logs unms) and check if there's any obvious error or repeating pattern. Please post the last few lines of these logs.

from docker-unms.

NEITG avatar NEITG commented on September 18, 2024

Interesting, docker logs is repeating over and over and over:

23123:M 04 Jul 19:43:43.663 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
23123:M 04 Jul 19:43:43.663 # Server started, Redis version 3.2.6
23123:M 04 Jul 19:43:43.664 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
{"message":"Creating database extensions.","channel":"database_create_extensions.sh","datetime":"2020-07-04T19:43:43+01:00","severity":"INFO","level":200}
{"message":"Extension \"citext\" exists.","channel":"database_create_extensions.sh","datetime":"2020-07-04T19:43:44+01:00","severity":"INFO","level":200}
{"message":"Extension \"unaccent\" exists.","channel":"database_create_extensions.sh","datetime":"2020-07-04T19:43:44+01:00","severity":"INFO","level":200}
23123:M 04 Jul 19:43:44.677 # Bad file format reading the append only file: make a backup of your AOF file, then use ./redis-check-aof --fix <filename>
Starting redis...
23181:M 04 Jul 19:43:44.694 # Warning: 32 bit instance detected but no memory limit set. Setting 3 GB maxmemory limit with 'noeviction' policy now.

Otherwise UNMS.log seems normal, mentions running migrations, setting db schema and starting the app:

[email protected] start /home/app/unms
node --max_old_space_size=2048 index.js

{"name":"UNMS","hostname":"d415c1cac295","pid":7707,"level":30,"msg":"Master 7707 is running","time":"2020-07-05T16:45:47.976Z","v":0}
{"name":"UNMS","hostname":"d415c1cac295","pid":7707,"level":30,"msg":"Connected to SiriDB server version: 2.0.34","time":"2020-07-05T16:45:50.731Z","v":0}
{"name":"UNMS","hostname":"d415c1cac295","pid":7707,"level":30,"msg":"Connected to PostgreSQL server version: PostgreSQL 9.6.17 on armv7l-unknown-linux-gnueabihf, $
{"name":"UNMS","hostname":"d415c1cac295","pid":7707,"level":30,"msg":"Registering plugins","time":"2020-07-05T16:45:53.356Z","v":0}_

from docker-unms.

NEITG avatar NEITG commented on September 18, 2024

Bit more useful maybe from docker logs:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node --max_old_space_size=2048 index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/app/.npm/_logs/2020-07-05T16_59_49_370Z-debug.log
FATAL:  role "root" does not exist
/var/run/postgresql:5432 - accepting connections
2020/07/05 17:59:49 [error] 5042#5042: *201 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.2, server: , request: "GET // HTTP/1.1", upstream: "http://127.0.0.1:8082//", host: "(ipaddress)"

and

2020/07/05 18:02:15 [error] 5042#5042: *166 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.2, server: , request: "GET /nms/api/v2.1/nms/heartbeat HTTP/1.1", upstream: "http://127.0.0.1:8081/nms/api/v2.1/nms/heartbeat", host: "(ipaddress)", referrer: "https://(ipaddress)/nms/dashboard"

and

2020/07/05 18:05:55 [error] 5046#5046: *420 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.2, server: , request: "GET /nms/api/v2.1/nms/heartbeat HTTP/1.1", upstream: "http://127.0.0.1:8081/nms/api/v2.1/nms/heartbeat", host: "(ipaddress)", referrer: "https://(ipaddress)/nms/dashboard"
{"name":"UNMS","hostname":"c8d89381d133","pid":12484,"level":60,"err":{"message":"Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379","name":"Error","stack":"Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379\n    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)","code":"ECONNREFUSED"},"msg":"Redis connection failed, terminating...","time":"2020-07-05T17:05:55.725Z","v":0}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node --max_old_space_size=2048 index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

from docker-unms.

Nico640 avatar Nico640 commented on September 18, 2024

Your redis appendonly file is corrupted. This often happens after a sudden power loss or non-graceful shutdown of the device (Raspberry Pi in this case). Not sure if that's what happened here as it happened after an upgrade.
You can probably fix this issue by opening a bash in the container, executing the redis check aof command and restarting the container.

docker exec -it unms /bin/bash
redis-check-aof --fix /config/redis/appendonly.aof

from docker-unms.

NEITG avatar NEITG commented on September 18, 2024

That fixed it, ran the check aof rm'd the container and service and redeployed. All up and running.

Interesting we did have a power outage recently but we're on UPS and I issued a shutdown to the pi. Maybe it never completed the process before the UPS drained for some reason.

Thank you for the assist! Will close the issue.

from docker-unms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.