Can not install EVOK due to dependencies



  • Hi,

    After receiving a new X40 extension that I can not connect to, I decided to create a fresh install of EVOK to get the new tools for upgrading the firmware on them. Following the instructions on the GitHub repository, I'm getting dependencies errors, and can not install. Right now, my whole system is down and I need urgent help. Can anybody change the dependencies in the repository as described in https://github.com/UniPiTechnology/evok/issues/64? Or is there any other way to solve the dependencies?

    Andreas


  • administrators

    Hello @alydersen,

    the maintainers of Raspbian have recently removed the kernel against which we compiled our drivers. We already built new drivers published it on our repository. Tested today with the latest Rasbian and worked properly...



  • Thanks! Is it so that I have to use the full strech image, or would "lite" do it?


  • administrators

    @alydersen

    The lite image should be fine, but it may install a few more packages than the full image.



  • OK, I've tried several ways of installing now and it keeps failing and the documentation is not up to speed. Any way any of you can help me get this up and running again?



  • Last results from /var/evok/evok.log:

    root@raspberrypi:/opt/unipi-bin# tail -f /var/log/evok.log
      File "/opt/evok/lib/python2.7/site-packages/evok/devices.py", line 67, in by_int
        raise Exception('Invalid device circuit number %s' % str(circuit))
    Exception: Invalid device circuit number 1_01
    2018-09-17 12:30:38,802 - evok - ERROR - Invalid device circuit number 1_02
    Traceback (most recent call last):
      File "/opt/evok/lib/python2.7/site-packages/evok/config.py", line 370, in add_aliases
        dev_obj = Devices.by_int(dev_pointer["dev_type"], dev_pointer["circuit"])
      File "/opt/evok/lib/python2.7/site-packages/evok/devices.py", line 67, in by_int
        raise Exception('Invalid device circuit number %s' % str(circuit))
    Exception: Invalid device circuit number 1_02
    2018-09-17 12:33:33,714 - evok - ERROR - Invalid device circuit number 1_01
    Traceback (most recent call last):
      File "/opt/evok/lib/python2.7/site-packages/evok/config.py", line 370, in add_aliases
        dev_obj = Devices.by_int(dev_pointer["dev_type"], dev_pointer["circuit"])
      File "/opt/evok/lib/python2.7/site-packages/evok/devices.py", line 67, in by_int
        raise Exception('Invalid device circuit number %s' % str(circuit))
    Exception: Invalid device circuit number 1_01
    2018-09-17 12:33:33,716 - evok - ERROR - Invalid device circuit number 1_02
    Traceback (most recent call last):
      File "/opt/evok/lib/python2.7/site-packages/evok/config.py", line 370, in add_aliases
        dev_obj = Devices.by_int(dev_pointer["dev_type"], dev_pointer["circuit"])
      File "/opt/evok/lib/python2.7/site-packages/evok/devices.py", line 67, in by_int
        raise Exception('Invalid device circuit number %s' % str(circuit))
    Exception: Invalid device circuit number 1_02
    


  • So it seems like there are multiple missing packages after following the installation instructions. I'm working my way through them now to see if I can fix it.


  • administrators

    Hello @alydersen ,
    I can confirm that there are indeed errors. I was able to install the packages without any dependency issues by simply downloading latest raspbian stretch lite (2018-06-27), doing the full apt update && apt upgrade, then reboot of the PLC and apt install evok afterwards. The installation finished successfully, but the Evok doesn't start.

    We apologize for the inconvenience and we will get back to you as soon as possible with the fix.

    Thank you for you patience,
    Martin



  • @martin-kudláček Thanks - I'll await you response then



  • @martin-kudláček Any hints as to when you expect this to be fixed? Right now our whole production is down, so any pointers on when you expect to have anything ready is much appreciated.


  • administrators

    Hello @alydersen,
    we have changed the official documentation regarding the installation of the Evok. Please, follow it precisely: https://github.com/UniPiTechnology/evok

    Best regards,
    Martin



  • @martin-kudláček So I've made a fresh install and done exactly what the README.md says. I still end up getting the evok.py under /opt/evok/lib/python2.7/site-packages/evok/evok.py and it can not run:

    root@L513-sn24:/opt/evok/bin# python /opt/evok/lib/python2.7/site-packages/evok/evok.py
    Traceback (most recent call last):
      File "/opt/evok/lib/python2.7/site-packages/evok/evok.py", line 5, in <module>
        import tornado.httpserver
    ImportError: No module named tornado.httpserver
    

  • administrators

    Hello @alydersen
    with evok being in Debian package, there is no need to start it manually as you are doing. There is a systemd service called evok and you can control the evok as follows:

    sudo systemctl stop evok
    sudo systemctl start evok
    

    The evok service is marked to start upon boot automatically.

    Your evok installation is probably OK and therefor it fails when you try to start it again. With the default config of the evok, you should see ale the inputs and outputs in the web UI. If not, send us please the output of this command:

    sudo systemctl status evok
    

    Thank you,
    Martin



  • @martin-kudláček said in Can not install EVOK due to dependencies:

    systemctl status evok

    root@L513-sn24:/opt/evok/bin# systemctl status evok
    ● evok.service - EVOK ModBus/WebSocket/RPC Server
       Loaded: loaded (/lib/systemd/system/evok.service; enabled; vendor preset: enabled)
       Active: failed (Result: exit-code) since Tue 2018-09-18 15:01:43 CEST; 17s ago
      Process: 3879 ExecStopPost=/bin/rm -f /etc/nginx/sites-enabled/evok (code=exited, status=0/SUCCESS)
      Process: 3876 ExecStopPost=/bin/cp -f /etc/nginx/sites-available/mervis /etc/nginx/sites-enabled/ (code=exited, status=1/FAILURE)
      Process: 3873 ExecStopPost=/bin/mv -f /etc/nginx/sites-enabled/evok /etc/nginx/sites-available/ (code=exited, status=0/SUCCESS)
      Process: 3869 ExecStopPost=/bin/rm -f /etc/evok-nginx.conf (code=exited, status=0/SUCCESS)
      Process: 3866 ExecStart=/opt/evok/bin/python /opt/evok/lib/python2.7/site-packages/evok/evok.py (code=exited, status=255)
      Process: 3863 ExecStartPre=/bin/ln -sf /etc/nginx/sites-enabled/evok /etc/evok-nginx.conf (code=exited, status=0/SUCCESS)
      Process: 3860 ExecStartPre=/bin/rm -f /etc/nginx/sites-enabled/mervis (code=exited, status=0/SUCCESS)
      Process: 3857 ExecStartPre=/bin/mv -f /etc/nginx/sites-enabled/mervis /etc/nginx/sites-available/ (code=exited, status=1/FAILURE)
      Process: 3854 ExecStartPre=/bin/cp -f /etc/nginx/sites-available/evok /etc/nginx/sites-enabled/ (code=exited, status=0/SUCCESS)
     Main PID: 3866 (code=exited, status=255)
    
    Sep 18 15:01:43 L513-sn24 systemd[1]: evok.service: Service hold-off time over, scheduling restart.
    Sep 18 15:01:43 L513-sn24 systemd[1]: Stopped EVOK ModBus/WebSocket/RPC Server.
    Sep 18 15:01:43 L513-sn24 systemd[1]: evok.service: Start request repeated too quickly.
    Sep 18 15:01:43 L513-sn24 systemd[1]: Failed to start EVOK ModBus/WebSocket/RPC Server.
    Sep 18 15:01:43 L513-sn24 systemd[1]: evok.service: Unit entered failed state.
    Sep 18 15:01:43 L513-sn24 systemd[1]: evok.service: Failed with result 'exit-code'
    


  • Sep 18 15:03:45 L513-sn24 systemd[1]: Starting EVOK ModBus/WebSocket/RPC Server...
    Sep 18 15:03:45 L513-sn24 systemd[1]: Started EVOK ModBus/WebSocket/RPC Server.
    

    It seems as though it is starting, but the web interface will not show anything other than the basic stuff:
    0_1537275991026_Screen Shot 2018-09-18 at 15.05.56.png



  • And after a little while it times out:

    Sep 18 15:03:52 L513-sn24 systemd[1]: evok.service: Service hold-off time over, scheduling restart.
    Sep 18 15:03:52 L513-sn24 systemd[1]: Stopped EVOK ModBus/WebSocket/RPC Server.
    Sep 18 15:03:52 L513-sn24 systemd[1]: evok.service: Start request repeated too quickly.
    Sep 18 15:03:52 L513-sn24 systemd[1]: Failed to start EVOK ModBus/WebSocket/RPC Server.
    Sep 18 15:03:52 L513-sn24 systemd[1]: evok.service: Unit entered failed state.
    Sep 18 15:03:52 L513-sn24 systemd[1]: evok.service: Failed with result 'exit-code'.
    

  • administrators

    That's really odd. All the libraries (as well as python itself) are bundled in the deb package, which is why it is not possible (or at least trivial) to run the program manually as well. This is a standard Debian mechanism for distributing python applications to prevent library version conflicts. We did test the package several times when we released it, but it's possible something has gone amiss in the meanwhile.

    @Martin-Kudláček mentioned he will test with a clean image to see if there are any issues with the current installation instructions, it's possible we have missed something.



  • Anything I can do to assist - please let me know. I'm in a squeeze time wise.



  • This might be interesting:

    root@raspberrypi:/home/pi# apt-get install unipi-modbus-tools
    Reading package lists... Done
    Building dependency tree        
    Reading state information... Done
    The following additional packages will be installed:
      busybox neuron-kernel unipi-common
    The following NEW packages will be installed:
      busybox neuron-kernel unipi-common unipi-modbus-tools
    0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
    Need to get 456 kB of archives.
    After this operation, 1153 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Get:1 http://raspbian.trivini.no/raspbian stretch/main armhf busybox armhf 1:1.22.0-19 [374 kB]
    Get:2 https://repo.unipi.technology/debian stretch/main armhf unipi-common armhf 1.1.10 [9574 B]
    Get:3 https://repo.unipi.technology/debian stretch/main armhf unipi-modbus-tools armhf 1.1.10 [41.6 kB]
    Get:4 https://repo.unipi.technology/debian stretch/main armhf neuron-kernel armhf 1.15.20180914 [30.7 kB]
    Fetched 456 kB in 1s (353 kB/s)     
    apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    	LANGUAGE = (unset),
    	LC_ALL = (unset),
    	LC_CTYPE = "UTF-8",
    	LANG = "en_GB.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    Selecting previously unselected package busybox.
    (Reading database ... 34695 files and directories currently installed.)
    Preparing to unpack .../busybox_1%3a1.22.0-19_armhf.deb ...
    Unpacking busybox (1:1.22.0-19) ...
    Selecting previously unselected package unipi-common.
    Preparing to unpack .../unipi-common_1.1.10_armhf.deb ...
    Adding 'diversion of /boot/overlays/ds2482.dtbo to /usr/share/rpikernelhack/overlays/ds2482.dtbo by rpikernelhack'
    Adding 'diversion of /boot/overlays/neuronee.dtbo to /usr/share/rpikernelhack/overlays/neuronee.dtbo by rpikernelhack'
    Adding 'diversion of /boot/overlays/neuron-spi.dtbo to /usr/share/rpikernelhack/overlays/neuron-spi.dtbo by rpikernelhack'
    Adding 'diversion of /boot/overlays/neuron-spi-new.dtbo to /usr/share/rpikernelhack/overlays/neuron-spi-new.dtbo by rpikernelhack'
    Adding 'diversion of /boot/overlays/unipiee.dtbo to /usr/share/rpikernelhack/overlays/unipiee.dtbo by rpikernelhack'
    Unpacking unipi-common (1.1.10) ...
    Selecting previously unselected package unipi-modbus-tools.
    Preparing to unpack .../unipi-modbus-tools_1.1.10_armhf.deb ...
    Unpacking unipi-modbus-tools (1.1.10) ...
    Selecting previously unselected package neuron-kernel.
    Preparing to unpack .../neuron-kernel_1.15.20180914_armhf.deb ...
    Unpacking neuron-kernel (1.15.20180914) ...
    Setting up busybox (1:1.22.0-19) ...
    Processing triggers for man-db (2.7.6.1-2) ...
    Setting up unipi-common (1.1.10) ...
    Removing 'diversion of /boot/overlays/ds2482.dtbo to /usr/share/rpikernelhack/overlays/ds2482.dtbo by rpikernelhack'
    Removing 'diversion of /boot/overlays/neuronee.dtbo to /usr/share/rpikernelhack/overlays/neuronee.dtbo by rpikernelhack'
    Removing 'diversion of /boot/overlays/neuron-spi-new.dtbo to /usr/share/rpikernelhack/overlays/neuron-spi-new.dtbo by rpikernelhack'
    Removing 'diversion of /boot/overlays/neuron-spi.dtbo to /usr/share/rpikernelhack/overlays/neuron-spi.dtbo by rpikernelhack'
    Removing 'diversion of /boot/overlays/unipiee.dtbo to /usr/share/rpikernelhack/overlays/unipiee.dtbo by rpikernelhack'
    Created symlink /etc/systemd/system/sysinit.target.wants/unipicheck.service → /lib/systemd/system/unipicheck.service.
    update-initramfs: Generating /boot/initrd.img-4.14.50-v7+
    WARNING: missing /lib/modules/4.14.50-v7+
    Ensure all necessary drivers are built into the linux image!
    depmod: ERROR: could not open directory /lib/modules/4.14.50-v7+: No such file or directory
    depmod: FATAL: could not search modules: No such file or directory
    hwclock: Cannot access the Hardware Clock via any known method.
    hwclock: Use the --debug option to see the details of our search for an access method.
    depmod: WARNING: could not open /var/tmp/mkinitramfs_uvP96k/lib/modules/4.14.50-v7+/modules.order: No such file or directory
    depmod: WARNING: could not open /var/tmp/mkinitramfs_uvP96k/lib/modules/4.14.50-v7+/modules.builtin: No such file or directory
    Setting up unipi-modbus-tools (1.1.10) ...
    Created symlink /etc/systemd/system/unipispi.target.wants/unipihost.service → /lib/systemd/system/unipihost.service.
    Created symlink /etc/systemd/system/unipispi.target.wants/unipitcp.service → /lib/systemd/system/unipitcp.service.
    Job for unipihost.service failed because the control process exited with error code.
    See "systemctl status unipihost.service" and "journalctl -xe" for details.
    unipihost.service couldn't start.
    Setting up neuron-kernel (1.15.20180914) ...
    


  • I installed

    apt-get install raspberrypi-kernel-headers
    

    Then removed evok and unipi-modbus-tools before I reinstalled them. New status is:

    Sep 18 16:10:51 L513-sn24 systemd[1]: Starting EVOK ModBus/WebSocket/RPC Server...
    Sep 18 16:10:51 L513-sn24 systemd[1]: Started EVOK ModBus/WebSocket/RPC Server.
    Sep 18 16:10:53 L513-sn24 OWFS[5331]: DEFAULT: ow_arg.c:(110) Cannot access device /dev/i2c-1
    Sep 18 16:10:53 L513-sn24 OWFS[5331]: DEFAULT: owlib.c:(52) No valid 1-wire buses found