dashevo / dashmate

DEPRECATED Distribution package for Dash Masternode installation
MIT License
11 stars 12 forks source link

dashmate hangs during setup #421

Closed dashameter closed 3 years ago

dashameter commented 3 years ago

my drive container keeps restarting and show these docker logs

> @dashevo/drive@0.20.0 abci /usr/src/app
> node scripts/abci

 ____       ______      ____        __  __                 ____       ____        ______      __  __     ____      
/\  _`\    /\  _  \    /\  _`\     /\ \/\ \               /\  _`\    /\  _`\     /\__  _\    /\ \/\ \   /\  _`\    
\ \ \/\ \  \ \ \L\ \   \ \,\L\_\   \ \ \_\ \              \ \ \/\ \  \ \ \L\ \   \/_/\ \/    \ \ \ \ \  \ \ \L\_\  
 \ \ \ \ \  \ \  __ \   \/_\__ \    \ \  _  \              \ \ \ \ \  \ \ ,  /      \ \ \     \ \ \ \ \  \ \  _\L  
  \ \ \_\ \  \ \ \/\ \    /\ \L\ \   \ \ \ \ \              \ \ \_\ \  \ \ \\ \      \_\ \__   \ \ \_/ \  \ \ \L\ \
   \ \____/   \ \_\ \_\   \ `\____\   \ \_\ \_\              \ \____/   \ \_\ \_\    /\_____\   \ `\___/   \ \____/
    \/___/     \/_/\/_/    \/_____/    \/_/\/_/               \/___/     \/_/\/ /    \/_____/    `\/__/     \/___/

[2021-08-22 16:54:02.419 +0000] INFO (18 on acf8d9dbd179): Starting Drive ABCI application v0.20.0 (protocol v0)
    driveVersion: "0.20.0"

(╯°□°)╯︵ ┻━┻

[2021-08-22 16:54:02.424 +0000] FATAL (18 on acf8d9dbd179): EISDIR: illegal operation on a directory, open '/var/log/drive-pretty.log'
    driveVersion: "0.20.0"
    err: {
      "type": "Error",
      "message": "EISDIR: illegal operation on a directory, open '/var/log/drive-pretty.log'",
      "stack":
          Error: EISDIR: illegal operation on a directory, open '/var/log/drive-pretty.log'
      "errno": -21,
      "code": "EISDIR",
      "syscall": "open",
      "path": "/var/log/drive-pretty.log"
    }
[2021-08-22 16:54:02.425 +0000] WARN (18 on acf8d9dbd179): pino.final with prettyPrint does not support flushing
    driveVersion: "0.20.0"
[2021-08-22 16:54:02.426 +0000] FATAL (18 on acf8d9dbd179): EISDIR: illegal operation on a directory, open '/var/log/drive-json.log'
    driveVersion: "0.20.0"
    err: {
      "type": "Error",
      "message": "EISDIR: illegal operation on a directory, open '/var/log/drive-json.log'",
      "stack":
          Error: EISDIR: illegal operation on a directory, open '/var/log/drive-json.log'
      "errno": -21,
      "code": "EISDIR",
      "syscall": "open",
      "path": "/var/log/drive-json.log"
    }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @dashevo/drive@0.20.0 abci: `node scripts/abci`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @dashevo/drive@0.20.0 abci script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-08-22T16_54_02_521Z-debug.log

I had these folders in /tmp

drwxr-xr-x  2 root root  4096 Thg 8  21 22:00  drive_json_1.log/
drwxr-xr-x  2 root root  4096 Thg 8  21 22:00  drive_json_2.log/
drwxr-xr-x  2 root root  4096 Thg 8  21 22:00  drive_json_3.log/
drwxr-xr-x  2 root root  4096 Thg 8  21 22:00  drive_pretty_1.log/
drwxr-xr-x  2 root root  4096 Thg 8  21 22:00  drive_pretty_2.log/
drwxr-xr-x  2 root root  4096 Thg 8  21 22:00  drive_pretty_3.log/

I deleted them and ran sudo chmod 777 /tmp for good measure, now dashmate finished with success

SamKirby22 commented 3 years ago

Discussed in triage. Fix due in v21

dashameter commented 3 years ago

v.21-dev still hangs, one way to trigger it is to restart the computer while the node is running:

the log files are mounted as directories

sudo rm /tmp/drive_*
rm: cannot remove '/tmp/drive_json_1.log': Is a directory
rm: cannot remove '/tmp/drive_json_2.log': Is a directory
rm: cannot remove '/tmp/drive_json_3.log': Is a directory
rm: cannot remove '/tmp/drive_pretty_1.log': Is a directory
rm: cannot remove '/tmp/drive_pretty_2.log': Is a directory
rm: cannot remove '/tmp/drive_pretty_3.log': Is a directory

the workaround is: sudo rm -rf /tmp/drive_*

SamKirby22 commented 3 years ago

@dashameter, as per discord convo, please retest. Should be fixed due to:

https://github.com/dashevo/dashmate/pull/437

dash-maverick commented 3 years ago

@dashameter, as per discord convo, please retest. Should be fixed due to:

437

exactly - please let me know as we've been also discussing that today with the Team (should be fixed now)

dashameter commented 3 years ago

passed retest :+1: