ioBroker does not run any more

Many people writes in forum, that ioBroker does not run any mode. But it is very unclear statement and includes so many information as: my car cannot drive any more.

Nobody thinks that it may be 1000 Reasons why a car is not running: no fuel, empty battery, flat tires, and, and, and …

ioBroker is very modular system and any part can be repaired pretty easy. The configuration files are removed from the directory with Node.js packages out there and so long that this configuration directory is still quite, so the installation ioBroker nothing serious happened.

First you notice that ioBroker is not running when “admin” is not running. But there is more or less clear algorithm, how to check what is broken.

Check if js-controller still runs:

  • linux: ps -A | grep iobroker
  • windows: Check if node.exe process is visible in process explorer (option “show all processes” must be activated)

Under Linux the output should be like this:
pi@pi:~$ ps -A | grep iobroker
1807 ? 13:59:22 iobroker.js-con

If output is empty or no lines with iobroker are visible, you should try to start ioBroker with:

cd /opt/iobroker
iobroker start

or
cd C:\ioBroker
iobroker start

for Windows.

If still does not work or it come error messages, then you can try to start controller manually.

cd /opt/iobroker
node node_modules/iobroker.js-controller/controller.js --logs

If errors occur, then you can try to update “js-controller”. See “Reinstall an adapter or js-controller

If js-controller is running, the TCP ports 9000 and 9001 must be occupied. This can be checked with the command
netstat -n -a -p TCP

Following lines should be visible:
TCP 0.0.0.0:9000 0.0.0.0:0 LISTENING
TCP 0.0.0.0:9001 0.0.0.0:0 LISTENING

If nothing can be seen (or only one), then presumably the ports are occupied by of other programs. You can change the ports in /opt/iobroker/iobroker-data/iobroker.json file. Or reconfigure other program.

Reinstall an adapter or js-controller

If an adapter or js-controller ran and no longer after the update, then presumably something goes wrong by update. But you can easily install an adapter again. To do that you only have to write in the console:

cd /opt/iobroker
iobroker stop adapterName
npm install iobroker.adapterName
iobroker upload adapterName
iobroker start adapterName

Or for js-controller:
cd /opt/iobroker
iobroker stop
npm install iobroker.js-controller
iobroker start

Check if node.js and npm are valid installed

Falls js-controller nicht läuft, dann konnte es auch sein, dass node.js gar nicht installiert ist.
Es wird empfohlen eine 4.x Version von node.js zu verwenden, aber auch ab 0.10.x müssen funktionieren.
Die Node.js Version 5.x oder 6.x sind noch nicht geprüft (stand 16.05.2016) und da gibt es keine Garantie, dass es funktionieren wird.

If js-controller is not running, then it could also be that node.js is not installed.
It is recommended to use a 4.x version of node.js, but also versions from 0.10.x must work.
The Node.js version 5.x or 6.x are not tested (stand 05.16.2016) and there is no guarantee that it will work.

The command:
node -v
npm -v

must show the version number. If it is not the case, then you should uninstall and reinstall node.j or check the search path.

If node.js needs to be reinstalled , then you have to uninstall it first:

apt-get purge nodejs
apt-get purge node
apt-get autoremove
reboot

And then install (for Raspi):
wget http://node-arm.herokuapp.com/node_archive_armhf.deb
sudo dpkg -i node_archive_armhf.deb
sudo apt-get install build-essential
reboot

Or look here for other systems.

Check whether Admin adapter runs

First check if admin is activated:

cd /opt/iobroker
iobroker list instances

You should see following output:

system.adapter.admin.0 : admin - enabled, port: 8081, bind: 0.0.0.0, run as: admin

If there is “disabled” instead of “enabled”, you can enable adapter with

iobroker start admin

If IP address is not correct , then write:

iobroker set --bind 0.0.0.0

to allow it for all IP addresses.

You can also change a port:
iobroker set --port 8081

or deactivate SSL:
iobroker set --ssl false

Then the instance must be visible on port (default 8081).
With
netstat -n -a -p TCP

you can check whether the line is visible:
TCP 0.0.0.0:8081 0.0.0.0:0 LISTENING

If still does not work, then you can manually start and check if there are any errors in outputs:
cd /opt/iobroker
node node_modules/iobroker.admin/admin.js --logs

You can check the log file too. The log file can be found in directory /opt/iobroker/log/iobroker.JJJJ-MM-TT.log.
With command
cd /opt/iobroker
cat log/iobroker.JJJJ-MM-TT.log

you can check the file for errors. Of course, YYYY-MM-DD must be replaced with current date. (“cat” is available only under Linux)

Install other Instance of Admin

If the settings are wrong and you cannot access the admin page, there is the possibility to install a second instance of Admin.

To do that call:
iobroker add admin --port 8089

Of course port 8089 must be free. After that you can access Admin page under http://ip:8089.
After the settings are normal again, you should to uninstall the new instance (on the port 8089) to save the resources.