This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Disable SignalK plugins when webpage not accessble
#1
Question 
Running into a problem with SignalK service. I installed a couple of plugins to the server and now I cannot access the SignalK page, just goes into waiting to connect on the browser and the page never loads.

In var/log/messages I get the following

Oct  2 18:49:09 openplotter node[7997]: *** WARNING *** Please fix your application to use the native API of Avahi!
Oct  2 18:49:09 openplotter node[7997]: *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
Oct  2 18:49:28 openplotter node[8066]: *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
Oct  2 18:49:28 openplotter node[8066]: *** WARNING *** Please fix your application to use the native API of Avahi!
Oct  2 18:49:28 openplotter node[8066]: *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
Oct  2 18:49:28 openplotter node[8066]: *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.

In var/log/syslog I get the following, showing SignalK service constantly restarting.

Oct  2 18:50:06 openplotter signalk-server[8196]: Building fine polar
Oct  2 18:50:06 openplotter signalk-server[8196]: Starting fine polar build
Oct  2 18:50:07 openplotter signalk-server[8196]: Finished fine polar build, in SI units
Oct  2 18:50:07 openplotter signalk-server[8196]: error starting plugin: TypeError: Cannot read property 'map' of undefined
Oct  2 18:50:09 openplotter signalk-server[8196]: signalk-marinetraffic-api failed to start: Cannot find module '@signalk/signalk-schema'
Oct  2 18:50:09 openplotter signalk-server[8196]: { Error: Cannot find module '@signalk/signalk-schema'
Oct  2 18:50:09 openplotter signalk-server[8196]:     at Function.Module._resolveFilename (module.js:548:15)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at Function.Module._load (module.js:475:25)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at Module.require (module.js:597:17)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at require (internal/module.js:11:18)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at Object.<anonymous> (/home/pi/.signalk/node_modules/signalk-marinetraffic-api/index.js:29:16)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at Module._compile (module.js:653:30)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at Object.Module._extensions..js (module.js:664:10)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at Module.load (module.js:566:32)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at tryModuleLoad (module.js:506:12)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at Function.Module._load (module.js:498:3)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at Module.require (module.js:597:17)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at require (internal/module.js:11:18)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at doRegisterPlugin (/usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:261:16)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at registerPlugin (/usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:191:7)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at modulesWithKeyword.forEach.moduleData (/usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:142:9)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at Array.forEach (<anonymous>)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at startPlugins (/usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:140:59)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at Object.start (/usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:38:7)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at /usr/lib/node_modules/signalk-server/lib/index.js:324:60
Oct  2 18:50:09 openplotter signalk-server[8196]:     at /usr/lib/node_modules/signalk-server/node_modules/lodash/lodash.js:4911:15
Oct  2 18:50:09 openplotter signalk-server[8196]:     at Function.forIn (/usr/lib/node_modules/signalk-server/node_modules/lodash/lodash.js:12951:11)
Oct  2 18:50:09 openplotter signalk-server[8196]:     at startInterfaces (/usr/lib/node_modules/signalk-server/lib/index.js:310:5) code: 'MODULE_NOT_FOUND' }
Oct  2 18:50:12 openplotter signalk-server[8196]: signalk-websocket-provider failed to start: undefined
Oct  2 18:50:12 openplotter signalk-server[8196]: WebsocketProvider requires a url or a host and port.
Oct  2 18:50:13 openplotter signalk-server[8196]: WARNING: found multiple copies of plugin with id derived-data at /home/pi/.signalk/node_modules/ and /home/pi/.signalk/node_modules/
Oct  2 18:50:13 openplotter signalk-server[8196]: signalk-instrument-light-plugin failed to start: Cannot find module '@signalk/signalk-schema'
Oct  2 18:50:13 openplotter signalk-server[8196]: { Error: Cannot find module '@signalk/signalk-schema'
Oct  2 18:50:13 openplotter signalk-server[8196]:     at Function.Module._resolveFilename (module.js:548:15)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at Function.Module._load (module.js:475:25)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at Module.require (module.js:597:17)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at require (internal/module.js:11:18)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at Object.<anonymous> (/home/pi/.signalk/node_modules/signalk-instrument-light-plugin/index.js:6:23)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at Module._compile (module.js:653:30)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at Object.Module._extensions..js (module.js:664:10)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at Module.load (module.js:566:32)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at tryModuleLoad (module.js:506:12)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at Function.Module._load (module.js:498:3)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at Module.require (module.js:597:17)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at require (internal/module.js:11:18)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at doRegisterPlugin (/usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:261:16)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at registerPlugin (/usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:191:7)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at modulesWithKeyword.forEach.moduleData (/usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:142:9)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at Array.forEach (<anonymous>)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at startPlugins (/usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:140:59)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at Object.start (/usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:38:7)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at /usr/lib/node_modules/signalk-server/lib/index.js:324:60
Oct  2 18:50:13 openplotter signalk-server[8196]:     at /usr/lib/node_modules/signalk-server/node_modules/lodash/lodash.js:4911:15
Oct  2 18:50:13 openplotter signalk-server[8196]:     at Function.forIn (/usr/lib/node_modules/signalk-server/node_modules/lodash/lodash.js:12951:11)
Oct  2 18:50:13 openplotter signalk-server[8196]:     at startInterfaces (/usr/lib/node_modules/signalk-server/lib/index.js:310:5) code: 'MODULE_NOT_FOUND' }
Oct  2 18:50:14 openplotter signalk-server[8196]: signalk-server running at 0.0.0.0:[object Object]
Oct  2 18:50:14 openplotter signalk-server[8196]: /home/pi/.signalk/node_modules/signalk-mqtt-gw/index.js:196
Oct  2 18:50:14 openplotter signalk-server[8196]:         server.publish({
Oct  2 18:50:14 openplotter signalk-server[8196]:         ^
Oct  2 18:50:14 openplotter signalk-server[8196]: ReferenceError: server is not defined
Oct  2 18:50:14 openplotter signalk-server[8196]:     at update.values.forEach.pathValue (/home/pi/.signalk/node_modules/signalk-mqtt-gw/index.js:196:9)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at Array.forEach (<anonymous>)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at delta.updates.forEach.update (/home/pi/.signalk/node_modules/signalk-mqtt-gw/index.js:195:21)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at Array.forEach (<anonymous>)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at FullSignalK.publishLocalDelta (/home/pi/.signalk/node_modules/signalk-mqtt-gw/index.js:194:19)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at emitOne (events.js:121:20)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at FullSignalK.emit (events.js:211:7)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at FullSignalK.addDelta (/usr/lib/node_modules/signalk-server/node_modules/@signalk/signalk-schema/dist/fullsignalk.js:52:8)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at doProcess (/usr/lib/node_modules/signalk-server/lib/deltachain.js:11:7)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at DeltaChain.process (/usr/lib/node_modules/signalk-server/lib/deltachain.js:6:12)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at Function.Server.app.handleMessage (/usr/lib/node_modules/signalk-server/lib/index.js:160:18)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at Object.handleMessage (/usr/lib/node_modules/signalk-server/lib/interfaces/plugins.js:168:11)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at Socket.gputemp.stdout.on (/home/pi/.signalk/node_modules/signalk-raspberry-pi-monitoring/index.js:93:13)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at emitOne (events.js:116:13)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at Socket.emit (events.js:211:7)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at addChunk (_stream_readable.js:263:12)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at readableAddChunk (_stream_readable.js:250:11)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at Socket.Readable.push (_stream_readable.js:208:10)
Oct  2 18:50:14 openplotter signalk-server[8196]:     at Pipe.onread (net.js:601:20)
Oct  2 18:50:14 openplotter systemd[1]: signalk.service: Main process exited, code=exited, status=1/FAILURE
Oct  2 18:50:14 openplotter systemd[1]: signalk.service: Unit entered failed state.
Oct  2 18:50:14 openplotter systemd[1]: signalk.service: Failed with result 'exit-code'.
Oct  2 18:50:14 openplotter systemd[1]: signalk.service: Service hold-off time over, scheduling restart.
Oct  2 18:50:14 openplotter systemd[1]: Stopped signalk.service.
Oct  2 18:50:14 openplotter systemd[1]: Started signalk.service.


How do I disable all plugins via command line, so I can get access to the webpage again to begin troubleshooting which module is causing the problem?

Any help appreciated, I'd prefer to avoid to have to wipe the installation and start over.

Thanks

Craig
  Reply
#2
in openplotter
the only thing i found for plugins & webapps is here.. /home/pi/.signalk/package.json
i don't know if editing that will help or make it worse..
here are some commands, you can try restarting..

sudo systemctl status signalk*   
////////ctrl + c to exit//////////
sudo systemctl restart signalk

sudo systemctl stop signalk.service
sudo systemctl stop signalk.socket

sudo systemctl start signalk.socket
sudo systemctl start signalk.service

not related to openplotter......
i lose the webpage after adding a data provider.wont restart, web page gone no websocket. just kplex and signalk on"opi zero".I've probably screwed something up and am going to start from scratch..
mare liberum
  Reply
#3
(10-03-2018, 04:20 AM)jim321 Wrote: in openplotter
the only thing i found for plugins & webapps is here.. /home/pi/.signalk/package.json
i don't know if editing that will help or make it worse..
here are some commands, you can try restarting..

sudo systemctl status signalk*   
////////ctrl + c to exit//////////

sudo systemctl stop signalk.service
sudo systemctl stop signalk.socket

sudo systemctl start signalk.socket
sudo systemctl start signalk.service

not related to openplotter......
i lose the webpage after adding a data provider.wont restart, web page gone no websocket. just kplex and signalk on"opi zero".I've probably screwed something up and am going to start from scratch..

Thanks for replying, I'll give this a try and see if they are listed in the json file. Ideally, want to stop the webapps loading into the SignalK server via cli and then try and remove them from the installed list.
  Reply
#4
did you get this fixed?
my problem was related to kplex config now the SignalK page works.plugin's installed Smile
mare liberum
  Reply
#5
(10-03-2018, 04:20 AM)jim321 Wrote: in openplotter
the only thing i found for plugins & webapps is here.. /home/pi/.signalk/package.json
i don't know if editing that will help or make it worse..

There should also be a directory /home/pi/.signalk/plugin-config-data. There you will find the configuration files for each plugin. 

Each configuration file there has a line that you can use to disable individual plugins:

"enabled": true,

Change true to false.

Alternatively you can just remove the config file for the offending plugin - without a config file a plugin starts in disabled state.
  Reply
#6
(10-09-2018, 12:28 PM)tkurki Wrote:
(10-03-2018, 04:20 AM)jim321 Wrote: in openplotter
the only thing i found for plugins & webapps is here.. /home/pi/.signalk/package.json
i don't know if editing that will help or make it worse..

There should also be a directory /home/pi/.signalk/plugin-config-data. There you will find the configuration files for each plugin. 

Each configuration file there has a line that you can use to disable individual plugins:

"enabled": true,

Change true to false.

Alternatively you can just remove the config file for the offending plugin - without a config file a plugin starts in disabled state.

Thank you, that worked.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)