easel-driver icon indicating copy to clipboard operation
easel-driver copied to clipboard

Service not resuming after reboot

Open jackomyers opened this issue 1 year ago • 6 comments

Firstly, I am way out of my depth here, my linux knowledge is akin to being able to order a beer in a forgeign country, so please forgive me if my ineptitude offends you.

I have installed the easel driver on several occasions and works fine once installed, however the problem lies in the fact that i cannot get the service to resume after a reboot without manually executing the "run.sh" file in the folder.

below is a copy of the output, admittedly not the complete transcript because output exceeds the limit of terminal (any other suggestions to get the full file are welcome), I have included from the beginning of some warnings that were thrown up during install:

Thank you in advance

Edit: I should also mention this is a clean install of raspbery pi Debian Bullseye released 04/04/22 from the imager software.

Now using node v12.19.0 (npm v6.14.8)
+ npm install
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: Please use the native JSON object instead of JSON 3

> @serialport/[email protected] install /home/pi/easel-driver/node_modules/@serialport/bindings
> prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.19.0 runtime=node arch=arm libc= platform=linux)
make: Entering directory '/home/pi/easel-driver/node_modules/@serialport/bindings/build'
  CXX(target) Release/obj.target/bindings/src/serialport.o
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:78:51: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
   78 |   uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_work_cb)EIO_AfterOpen);
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:135:53: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
  135 |   uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate);
      |                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:175:52: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
  175 |   uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_work_cb)EIO_AfterClose);
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:215:52: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
  215 |   uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush);
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:270:50: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
  270 |   uv_queue_work(uv_default_loop(), req, EIO_Set, (uv_after_work_cb)EIO_AfterSet);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Get(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:314:50: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
  314 |   uv_queue_work(uv_default_loop(), req, EIO_Get, (uv_after_work_cb)EIO_AfterGet);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘void EIO_AfterGet(uv_work_t*)’:
../src/serialport.cpp:329:96: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
  329 |     results->Set(Nan::New<v8::String>("cts").ToLocalChecked(), Nan::New<v8::Boolean>(data->cts));
      |                                                                                                ^
In file included from /home/pi/.cache/node-gyp/12.19.0/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.19.0/include/node/v8.h:27,
                 from /home/pi/.cache/node-gyp/12.19.0/include/node/node.h:67,
                 from ../../../nan/nan.h:60,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.19.0/include/node/v8.h:3499:22: note: declared here
 3499 |                 bool Set(Local<Value> key, Local<Value> value));
      |                      ^~~
/home/pi/.cache/node-gyp/12.19.0/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
../src/serialport.cpp:330:96: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
  330 |     results->Set(Nan::New<v8::String>("dsr").ToLocalChecked(), Nan::New<v8::Boolean>(data->dsr));
      |                                                                                                ^
In file included from /home/pi/.cache/node-gyp/12.19.0/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.19.0/include/node/v8.h:27,
                 from /home/pi/.cache/node-gyp/12.19.0/include/node/node.h:67,
                 from ../../../nan/nan.h:60,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.19.0/include/node/v8.h:3499:22: note: declared here
 3499 |                 bool Set(Local<Value> key, Local<Value> value));
      |                      ^~~
/home/pi/.cache/node-gyp/12.19.0/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
../src/serialport.cpp:331:96: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
  331 |     results->Set(Nan::New<v8::String>("dcd").ToLocalChecked(), Nan::New<v8::Boolean>(data->dcd));
      |                                                                                                ^
In file included from /home/pi/.cache/node-gyp/12.19.0/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.19.0/include/node/v8.h:27,
                 from /home/pi/.cache/node-gyp/12.19.0/include/node/node.h:67,
                 from ../../../nan/nan.h:60,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.19.0/include/node/v8.h:3499:22: note: declared here
 3499 |                 bool Set(Local<Value> key, Local<Value> value));
      |                      ^~~
/home/pi/.cache/node-gyp/12.19.0/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE GetBaudRate(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:363:58: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
  363 |   uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate);
      |                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport.cpp: In function ‘void EIO_AfterGetBaudRate(uv_work_t*)’:
../src/serialport.cpp:378:106: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
  378 |     results->Set(Nan::New<v8::String>("baudRate").ToLocalChecked(), Nan::New<v8::Integer>(data->baudRate));
      |                                                                                                          ^
In file included from /home/pi/.cache/node-gyp/12.19.0/include/node/v8-internal.h:14,
                 from /home/pi/.cache/node-gyp/12.19.0/include/node/v8.h:27,
                 from /home/pi/.cache/node-gyp/12.19.0/include/node/node.h:67,
                 from ../../../nan/nan.h:60,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.19.0/include/node/v8.h:3499:22: note: declared here
 3499 |                 bool Set(Local<Value> key, Local<Value> value));
      |                      ^~~
/home/pi/.cache/node-gyp/12.19.0/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:409:52: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
  409 |   uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain);
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport.cpp: At global scope:
../src/serialport.cpp:430:28: warning: unnecessary parentheses in declaration of ‘ToParityEnum’ [-Wparentheses]
  430 | SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local<v8::String>& v8str)) {
      |                            ^
../src/serialport.cpp:449:30: warning: unnecessary parentheses in declaration of ‘ToStopBitEnum’ [-Wparentheses]
  449 | SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
      |                              ^
In file included from ../../../nan/nan.h:60,
                 from ../src/./serialport.h:6,
                 from ../src/serialport.cpp:1:
/home/pi/.cache/node-gyp/12.19.0/include/node/node.h:727:7: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
  727 |       (node::addon_register_func) (regfunc),                          \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/12.19.0/include/node/node.h:761:3: note: in expansion of macro ‘NODE_MODULE_X’
  761 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/serialport.cpp:483:1: note: in expansion of macro ‘NODE_MODULE’
  483 | NODE_MODULE(serialport, init);
      | ^~~~~~~~~~~
  CXX(target) Release/obj.target/bindings/src/serialport_unix.o
../src/serialport_unix.cpp: In function ‘int setup(int, OpenBaton*)’:
../src/serialport_unix.cpp:176:82: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1005 [-Wformat-truncation=]
  176 |     snprintf(data->errorString, sizeof(data->errorString), "Error %s Cannot open %s", strerror(errno), data->path);
      |                                                                                  ^~
../src/serialport_unix.cpp:176:13: note: ‘snprintf’ output 20 or more bytes (assuming 1043) into a destination of size 1024
  176 |     snprintf(data->errorString, sizeof(data->errorString), "Error %s Cannot open %s", strerror(errno), data->path);
      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/serialport_unix.cpp: In function ‘void EIO_Open(uv_work_t*)’:
../src/serialport_unix.cpp:86:84: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1003 [-Wformat-truncation=]
   86 |     snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot open %s", strerror(errno), data->path);
      |                                                                                    ^~
../src/serialport_unix.cpp:86:13: note: ‘snprintf’ output 22 or more bytes (assuming 1045) into a destination of size 1024
   86 |     snprintf(data->errorString, sizeof(data->errorString), "Error: %s, cannot open %s", strerror(errno), data->path);
      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CXX(target) Release/obj.target/bindings/src/poller.o
  CXX(target) Release/obj.target/bindings/src/serialport_linux.o
  SOLINK_MODULE(target) Release/obj.target/bindings.node
  COPY Release/bindings.node
make: Leaving directory '/home/pi/easel-driver/node_modules/@serialport/bindings/build'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

added 174 packages from 856 contributors and audited 174 packages in 28.197s

5 packages are looking for funding
  run `npm fund` for details

found 14 vulnerabilities (7 low, 2 moderate, 4 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
+ echo \n\n\n




+ true
+ echo Almost done! Do you want Easel driver to run on startup (will install system service) [yn]: 
Almost done! Do you want Easel driver to run on startup (will install system service) [yn]: 
+ read yn
y
+ check_init
+ [ -d /run/systemd/system/ ]
+ SYSD=1
+ create_start_script
+ pwd
+ driverdir=/home/pi/easel-driver
+ touch /home/pi/easel-driver/run.sh
+ chmod +x /home/pi/easel-driver/run.sh
+ cat
+ install_service
+ [ 1 = 1 ]
+ touch /home/pi/easel-driver/EaselDriver.service
+ whoami
+ cat
+ sudo mv /home/pi/easel-driver/EaselDriver.service /etc/systemd/system/
+ sudo systemctl daemon-reload
+ sudo systemctl enable EaselDriver.service
+ break
+ screen -L -dmS easel node iris.js
+ sleep 3
+ echo \n\n\n




+ tail screenlog.0
+ echo \n\nDone! Easel driver running in background. Run `screen -r` to bring it to foreground.


Done! Easel driver running in background. Run `screen -r` to bring it to foreground.

jackomyers avatar Jul 08 '22 10:07 jackomyers