Problème install debian 11

Bonjour,

Je suis en train de basculer jeedom 4.4.1 sous debian 11 via une fresh install faite avec l’iso de jeedom, tout c’est bien passé sauf pour MyModbus ( Version béta du 2023-12-03 01:02:07) qui refuse de redémarrer :frowning: :frowning:

Ci joint les logs de mymodbus et de l’install :

0000|Traceback (most recent call last):
0001|File "/var/www/html/plugins/mymodbus/ressources/mymodbusd/mymodbusd.py", line 41, in <module>
0002|from mymodbus import PyModbusClient
0003|File "/var/www/html/plugins/mymodbus/ressources/mymodbusd/mymodbus.py", line 37, in <module>
0004|from jeedom.jeedom import jeedom_utils
0005|File "/var/www/html/plugins/mymodbus/ressources/mymodbusd/jeedom/jeedom.py", line 34, in <module>
0006|import pyudev
0007|File "/var/www/html/plugins/mymodbus/ressources/_pyenv/versions/3.9.16/lib/python3.9/site-packages/pyudev/__init__.py", line 45, in <module>
0008|from pyudev.core import Context, Enumerator
0009|File "/var/www/html/plugins/mymodbus/ressources/_pyenv/versions/3.9.16/lib/python3.9/site-packages/pyudev/core.py", line 27, in <module>
0010|from pyudev._ctypeslib.libudev import ERROR_CHECKERS, SIGNATURES
0011|File "/var/www/html/plugins/mymodbus/ressources/_pyenv/versions/3.9.16/lib/python3.9/site-packages/pyudev/_ctypeslib/__init__.py", line 26, in <module>
0012|from . import libc, libudev
0013|File "/var/www/html/plugins/mymodbus/ressources/_pyenv/versions/3.9.16/lib/python3.9/site-packages/pyudev/_ctypeslib/libc.py", line 27, in <module>
0014|from ctypes import c_int
0015|File "/var/www/html/plugins/mymodbus/ressources/_pyenv/versions/3.9.16/lib/python3.9/ctypes/__init__.py", line 8, in <module>
0016|from _ctypes import Union, Structure, Array
0017|ImportError: libffi.so.6: cannot open shared object file: No such file or directory
0000|+ echo '*******************Begin of package installation******************'
0001|*******************Begin of package installation******************
0002|+ touch /tmp/jeedom_install_in_progress_mymodbus
0003|+ echo 1
0004|+ echo 2
0005|+ sudo apt update
0006|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0007|Hit:1 https://deb.nodesource.com/node_18.x nodistro InRelease
0008|Hit:2 http://security.debian.org/debian-security bullseye-security InRelease
0009|Hit:3 http://deb.debian.org/debian bullseye InRelease
0010|Hit:4 http://deb.debian.org/debian bullseye-updates InRelease
0011|Hit:5 https://download.docker.com/linux/debian bullseye InRelease
0012|Reading package lists...
0013|Building dependency tree...
0014|Reading state information...
0015|1 package can be upgraded. Run 'apt list --upgradable' to see it.
0016|+ echo 3
0017|+ sudo apt install -o Dpkg::Options::=--force-confdef -y git
0018|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0019|Reading package lists...
0020|Building dependency tree...
0021|Reading state information...
0022|git is already the newest version (1:2.30.2-1+deb11u2).
0023|0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
0024|+ echo 4
0025|+ sudo apt install -o Dpkg::Options::=--force-confdef -y libbz2-dev
0026|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0027|Reading package lists...
0028|Building dependency tree...
0029|Reading state information...
0030|libbz2-dev is already the newest version (1.0.8-4).
0031|0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
0032|+ echo 5
0033|+ sudo apt install -o Dpkg::Options::=--force-confdef -y libreadline-dev
0034|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0035|Reading package lists...
0036|Building dependency tree...
0037|Reading state information...
0038|libreadline-dev is already the newest version (8.1-1).
0039|0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
0040|+ echo 6
0041|+ sudo apt install -o Dpkg::Options::=--force-confdef -y libsqlite3-dev
0042|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0043|Reading package lists...
0044|Building dependency tree...
0045|Reading state information...
0046|libsqlite3-dev is already the newest version (3.34.1-3).
0047|0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
0048|+ echo 7
0049|+ sudo apt install -o Dpkg::Options::=--force-confdef -y libncurses5-dev
0050|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0051|Reading package lists...
0052|Building dependency tree...
0053|Reading state information...
0054|libncurses5-dev is already the newest version (6.2+20201114-2+deb11u2).
0055|0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
0056|+ echo 8
0057|+ sudo apt install -o Dpkg::Options::=--force-confdef -y libncursesw5-dev
0058|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0059|Reading package lists...
0060|Building dependency tree...
0061|Reading state information...
0062|libncursesw5-dev is already the newest version (6.2+20201114-2+deb11u2).
0063|0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
0064|+ echo 9
0065|+ sudo apt install -o Dpkg::Options::=--force-confdef -y libffi-dev
0066|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0067|Reading package lists...
0068|Building dependency tree...
0069|Reading state information...
0070|libffi-dev is already the newest version (3.3-6).
0071|0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
0072|+ echo 10
0073|+ sudo apt install -o Dpkg::Options::=--force-confdef -y liblzma-dev
0074|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0075|Reading package lists...
0076|Building dependency tree...
0077|Reading state information...
0078|liblzma-dev is already the newest version (5.2.5-2.1~deb11u1).
0079|0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
0080|+ echo 11
0081|+ sudo chmod +x /var/www/html/core/class/../../plugins/mymodbus/ressources/post-install.sh
0082|+ sudo /var/www/html/core/class/../../plugins/mymodbus/ressources/post-install.sh
0083|********************************************************
0084|*           Nettoyage de l'ancienne version            *
0085|********************************************************
0086|Mon Jan  8 10:01:01 CET 2024
0087|********************************************************
0088|*            Installation de pyenv                     *
0089|********************************************************
0090|Mon Jan  8 10:01:01 CET 2024
0091|****  Configuration de pyenv...
0092|****  Suppression des anciennes versions de pyenv...
0093|pyenv: 3.9.16 uninstalled
0094|********************************************************
0095|*    Installation de python 3.11.6 (dure longtemps)    *
0096|********************************************************
0097|Mon Jan  8 10:01:01 CET 2024
0098|**** Mise à jour de pyenv
0099|fatal: not a git repository (or any of the parent directories): .git
0100|**** Mise à jour de pyenv terminée, installation de python 3.11.6
0101|python-build: definition not found: 3.11.6
0102|See all available versions with `pyenv install --list'.
0103|If the version you need is missing, try upgrading pyenv.
0104|********************************************************
0105|*      Configuration de pyenv avec python 3.11.6       *
0106|********************************************************
0107|Mon Jan  8 10:01:01 CET 2024
0108|/var/www/html/core/class/../../plugins/mymodbus/ressources/post-install.sh: 166: cd: can't cd to ressources/mymodbusd
0109|pyenv: version `3.11.6' not installed
0110|WARNING The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
0111|Defaulting to user installation because normal site-packages is not writeable
0112|Requirement already satisfied: pip in /usr/local/lib/python3.9/dist-packages (23.3.2)
0113|Requirement already satisfied: setuptools in /usr/local/lib/python3.9/dist-packages (69.0.3)
0114|DEPRECATION: gpg 1.14.0-unknown has a non-standard version number. pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of gpg or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at https://github.com/pypa/pip/issues/12063
0115|ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/root/.local'
0116|Check the permissions.
0117|WARNING The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
0118|Defaulting to user installation because normal site-packages is not writeable
0119|Requirement already satisfied: requests in /usr/local/lib/python3.9/dist-packages (2.31.0)
0120|Requirement already satisfied: pyserial in /usr/local/lib/python3.9/dist-packages (3.5)
0121|Requirement already satisfied: pyudev in /usr/local/lib/python3.9/dist-packages (0.24.1)
0122|Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.9/dist-packages (from requests) (3.3.2)
0123|Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.9/dist-packages (from requests) (3.6)
0124|Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.9/dist-packages (from requests) (2.1.0)
0125|Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/dist-packages (from requests) (2023.11.17)
0126|DEPRECATION: gpg 1.14.0-unknown has a non-standard version number. pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of gpg or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at https://github.com/pypa/pip/issues/12063
0127|ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/root/.local'
0128|Check the permissions.
0129|WARNING The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
0130|Defaulting to user installation because normal site-packages is not writeable
0131|Collecting pymodbus==3.2.2
0132|Downloading pymodbus-3.2.2-py3-none-any.whl (166 kB)
0133|━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 166.5/166.5 kB 4.6 MB/s eta 0:00:00
0134|Collecting setuptools<66.0.0 (from pymodbus==3.2.2)
0135|Downloading setuptools-65.7.0-py3-none-any.whl (1.2 MB)
0136|━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 13.0 MB/s eta 0:00:00
0137|DEPRECATION: gpg 1.14.0-unknown has a non-standard version number. pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of gpg or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at https://github.com/pypa/pip/issues/12063
0138|Installing collected packages: setuptools, pymodbus
0139|ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/root/.local'
0140|Check the permissions.
0141|********************************************************
0142|*           Installation terminée                      *
0143|********************************************************
0144|Mon Jan  8 10:01:04 CET 2024
0145|+ echo 12
0146|+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end mymodbus
0147|+ rm /tmp/jeedom_install_in_progress_mymodbus
0148|+ echo '*******************End of package installation******************'
0149|*******************End of package installation******************

et un screen de "Vérification des packages système "

pyenv est absent…

Bonjour,

Voir dernière mise à jour

MàJ dans la version du 06/02 plus réinstall par sécurité faite, mais cela ne change strictement rien :frowning:

Ca change rien cad ? Le log est tjrs le meme ?

Strictement le même, mais
0099|fatal: not a git repository (or any of the parent directories): .git
me parait curieux :frowning:

Bonjours a tous, c’est @Michel_F qui gère la Beta de Mymodbus

EDIT: je vient de faire une VM Debian 11 et je suis en 4.4.1

j ai poussé une sauvegarde qui est en PROD. et effectivement ca ne marche pas .
Pour y remédier:

  1. Arrêt démon
  2. Suppression du répertoire plugins/mymodbus/ressources/_pyenv
  3. Installation maj plugin.
  4. Relance dépendances.
    Chez moi tout est OK « pour le moment » :innocent:

Alors on va attendre son avis :slight_smile:

Bonjour,

OK, donc quelque chose se passe mal avec la mise à jour de pyenv et tu n’es pas le seul à qui c’est arrivé. J’aimerais trouver comment faire cette mise à jour correctement. Est-ce que tu peux relancer l’installation des dépendances et poster le log mymodbus_packages STP ?

edit: il faut une configuration supplémentaire du shell pour pyenv depuis une certaine version (je ne sais pas laquelle), je fais des tests et reviens avec une proposition.
@m.georgein : tu sais éditer des fichiers sur ta machine Jeedom ?

A+
Michel

OK, donc lors d’une restauration d’un backup, celui-ci ne contient pas certains répertoires.

Notamment le répertoire .git qui se trouve dans _pyenv et donc la mise à jour de pyenv ne peut pas se faire.

Maintenant, je sais quel est le problème, je vais adapter le script post_install.sh pour que ça fonctionne.

Pas de soucis pour bidouiller les fichiers en cas de problème

Si tu n’as pas supprimé le répertoire _pyenv, est-ce que tu pourrais ajouter ces lignes dans ressources/post-install.sh :

if [ -d "$PYENV_ROOT" ] && [ ! -d "$PYENV_ROOT/.git" ]; then
  rm -rf "$PYENV_ROOT"
fi

Juste après la ligne 120, entre ces lignes :

ldconfig
if [ ! -d "$PYENV_ROOT" ]; then

Ce qui donne :

ldconfig
if [ -d "$PYENV_ROOT" ] && [ ! -d "$PYENV_ROOT/.git" ]; then
  rm -rf "$PYENV_ROOT"
fi
if [ ! -d "$PYENV_ROOT" ]; then

En gros si le répertoire _pyenv existe mais pas le répertoire .git, alors le script supprime le répertoire _pyenv. Pyenv est installé juste après, proprement.

Une fois cette modi faite, relance l’installation des dépendances et dis-moi si c’est OK STP.

Si c’est bon après ça, je commit la modif.

Je teste ça dans la matinée et je te dis

je viens de tester ta correction du .sh, mymodbus est repartis nickel, a titre d’info je te joins le log des dépendances :

0000|+ echo '*******************Begin of package installation******************'
0001|*******************Begin of package installation******************
0002|+ touch /tmp/jeedom_install_in_progress_mymodbus
0003|+ echo 1
0004|+ echo 2
0005|+ sudo apt update
0006|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0007|Get:1 http://security.debian.org/debian-security bullseye-security InRelease [48.4 kB]
0008|Hit:2 http://deb.debian.org/debian bullseye InRelease
0009|Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
0010|Hit:4 https://deb.nodesource.com/node_18.x nodistro InRelease
0011|Hit:5 https://download.docker.com/linux/debian bullseye InRelease
0012|Fetched 92.4 kB in 0s (236 kB/s)
0013|Reading package lists...
0014|Building dependency tree...
0015|Reading state information...
0016|1 package can be upgraded. Run 'apt list --upgradable' to see it.
0017|+ echo 3
0018|+ sudo apt install -o Dpkg::Options::=--force-confdef -y git
0019|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0020|Reading package lists...
0021|Building dependency tree...
0022|Reading state information...
0023|git is already the newest version (1:2.30.2-1+deb11u2).
0024|0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
0025|+ echo 4
0026|+ sudo apt install -o Dpkg::Options::=--force-confdef -y libbz2-dev
0027|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0028|Reading package lists...
0029|Building dependency tree...
0030|Reading state information...
0031|libbz2-dev is already the newest version (1.0.8-4).
0032|0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
0033|+ echo 5
0034|+ sudo apt install -o Dpkg::Options::=--force-confdef -y libreadline-dev
0035|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0036|Reading package lists...
0037|Building dependency tree...
0038|Reading state information...
0039|libreadline-dev is already the newest version (8.1-1).
0040|0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
0041|+ echo 6
0042|+ sudo apt install -o Dpkg::Options::=--force-confdef -y libsqlite3-dev
0043|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0044|Reading package lists...
0045|Building dependency tree...
0046|Reading state information...
0047|libsqlite3-dev is already the newest version (3.34.1-3).
0048|0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
0049|+ echo 7
0050|+ sudo apt install -o Dpkg::Options::=--force-confdef -y libncurses5-dev
0051|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0052|Reading package lists...
0053|Building dependency tree...
0054|Reading state information...
0055|libncurses5-dev is already the newest version (6.2+20201114-2+deb11u2).
0056|0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
0057|+ echo 8
0058|+ sudo apt install -o Dpkg::Options::=--force-confdef -y libncursesw5-dev
0059|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0060|Reading package lists...
0061|Building dependency tree...
0062|Reading state information...
0063|libncursesw5-dev is already the newest version (6.2+20201114-2+deb11u2).
0064|0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
0065|+ echo 9
0066|+ sudo apt install -o Dpkg::Options::=--force-confdef -y libffi-dev
0067|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0068|Reading package lists...
0069|Building dependency tree...
0070|Reading state information...
0071|libffi-dev is already the newest version (3.3-6).
0072|0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
0073|+ echo 10
0074|+ sudo apt install -o Dpkg::Options::=--force-confdef -y liblzma-dev
0075|WARNING apt does not have a stable CLI interface. Use with caution in scripts.
0076|Reading package lists...
0077|Building dependency tree...
0078|Reading state information...
0079|liblzma-dev is already the newest version (5.2.5-2.1~deb11u1).
0080|0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
0081|+ echo 11
0082|+ sudo chmod +x /var/www/html/core/class/../../plugins/mymodbus/ressources/post-install.sh
0083|+ sudo /var/www/html/core/class/../../plugins/mymodbus/ressources/post-install.sh
0084|********************************************************
0085|*           Nettoyage de l'ancienne version            *
0086|********************************************************
0087|Tue Jan  9 09:41:29 CET 2024
0088|********************************************************
0089|*            Installation de pyenv                     *
0090|********************************************************
0091|Tue Jan  9 09:41:29 CET 2024
0092|% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
0093|Dload  Upload   Total   Spent    Left  Speed
0094|0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   270  100   270    0     0    252      0  0:00:01  0:00:01 --:--:--   252
0095|Cloning into '/var/www/html/plugins/mymodbus/ressources/_pyenv'...
0096|Cloning into '/var/www/html/plugins/mymodbus/ressources/_pyenv/plugins/pyenv-doctor'...
0097|Cloning into '/var/www/html/plugins/mymodbus/ressources/_pyenv/plugins/pyenv-update'...
0098|Cloning into '/var/www/html/plugins/mymodbus/ressources/_pyenv/plugins/pyenv-virtualenv'...
0099|WARNING seems you still have not added 'pyenv' to the load path.
0100|# Load pyenv automatically by appending
0101|# the following to
0102|# ~/.bash_profile if it exists, otherwise ~/.profile (for login shells)
0103|# and ~/.bashrc (for interactive shells) :
0104|export PYENV_ROOT="$HOME/.pyenv"
0105|[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
0106|eval "$(pyenv init -)"
0107|# Restart your shell for the changes to take effect.
0108|# Load pyenv-virtualenv automatically by adding
0109|# the following to ~/.bashrc:
0110|eval "$(pyenv virtualenv-init -)"
0111|****  Configuration de pyenv...
0112|****  Suppression des anciennes versions de pyenv...
0113|********************************************************
0114|*    Installation de python 3.11.6 (dure longtemps)    *
0115|********************************************************
0116|Tue Jan  9 09:41:35 CET 2024
0117|**** Mise à jour de pyenv
0118|HEAD is now at 6e3b91a Added PyPy 7.3.14 (#2876)
0119|hint: Pulling without specifying how to reconcile divergent branches is
0120|hint: discouraged. You can squelch this message by running one of the following
0121|hint: commands sometime before your next pull:
0122|hint:
0123|hint:   git config pull.rebase false  # merge (the default strategy)
0124|hint:   git config pull.rebase true   # rebase
0125|hint:   git config pull.ff only       # fast-forward only
0126|hint:
0127|hint: You can replace "git config" with "git config --global" to set a default
0128|hint: preference for all repositories. You can also pass --rebase, --no-rebase,
0129|hint: or --ff-only on the command line to override the configured default per
0130|hint: invocation.
0131|Already up to date.
0132|/var/www/html/plugins/mymodbus
0133|**** Mise à jour de pyenv terminée, installation de python 3.11.6
0134|Downloading Python-3.11.6.tar.xz...
0135|-> https://www.python.org/ftp/python/3.11.6/Python-3.11.6.tar.xz
0136|Installing Python-3.11.6...
0137|Installed Python-3.11.6 to /var/www/html/plugins/mymodbus/ressources/_pyenv/versions/3.11.6
0138|********************************************************
0139|*      Configuration de pyenv avec python 3.11.6       *
0140|********************************************************
0141|Tue Jan  9 09:42:39 CET 2024
0142|WARNING The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
0143|Requirement already satisfied: pip in /var/www/html/plugins/mymodbus/ressources/_pyenv/versions/3.11.6/lib/python3.11/site-packages (23.2.1)
0144|Collecting pip
0145|Obtaining dependency information for pip from https://files.pythonhosted.org/packages/15/aa/3f4c7bcee2057a76562a5b33ecbd199be08cdb4443a02e26bd2c3cf6fc39/pip-23.3.2-py3-none-any.whl.metadata
0146|Downloading pip-23.3.2-py3-none-any.whl.metadata (3.5 kB)
0147|Requirement already satisfied: setuptools in /var/www/html/plugins/mymodbus/ressources/_pyenv/versions/3.11.6/lib/python3.11/site-packages (65.5.0)
0148|Collecting setuptools
0149|Obtaining dependency information for setuptools from https://files.pythonhosted.org/packages/55/3a/5121b58b578a598b269537e09a316ad2a94fdd561a2c6eb75cd68578cc6b/setuptools-69.0.3-py3-none-any.whl.metadata
0150|Downloading setuptools-69.0.3-py3-none-any.whl.metadata (6.3 kB)
0151|Downloading pip-23.3.2-py3-none-any.whl (2.1 MB)
0152|━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 1.9 MB/s eta 0:00:00
0153|Downloading setuptools-69.0.3-py3-none-any.whl (819 kB)
0154|━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 819.5/819.5 kB 3.5 MB/s eta 0:00:00
0155|Installing collected packages: setuptools, pip
0156|Attempting uninstall: setuptools
0157|Found existing installation: setuptools 65.5.0
0158|Uninstalling setuptools-65.5.0:
0159|Successfully uninstalled setuptools-65.5.0
0160|Attempting uninstall: pip
0161|Found existing installation: pip 23.2.1
0162|Uninstalling pip-23.2.1:
0163|Successfully uninstalled pip-23.2.1
0164|Successfully installed pip-23.3.2 setuptools-69.0.3
0165|WARNING The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
0166|Collecting requests
0167|Downloading requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
0168|Collecting pyserial
0169|Downloading pyserial-3.5-py2.py3-none-any.whl (90 kB)
0170|━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.6/90.6 kB 4.1 MB/s eta 0:00:00
0171|Collecting pyudev
0172|Downloading pyudev-0.24.1-py3-none-any.whl (62 kB)
0173|━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.9/62.9 kB 326.7 MB/s eta 0:00:00
0174|Collecting charset-normalizer<4,>=2 (from requests)
0175|Downloading charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (33 kB)
0176|Collecting idna<4,>=2.5 (from requests)
0177|Downloading idna-3.6-py3-none-any.whl.metadata (9.9 kB)
0178|Collecting urllib3<3,>=1.21.1 (from requests)
0179|Downloading urllib3-2.1.0-py3-none-any.whl.metadata (6.4 kB)
0180|Collecting certifi>=2017.4.17 (from requests)
0181|Downloading certifi-2023.11.17-py3-none-any.whl.metadata (2.2 kB)
0182|Downloading requests-2.31.0-py3-none-any.whl (62 kB)
0183|━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 15.7 MB/s eta 0:00:00
0184|Downloading certifi-2023.11.17-py3-none-any.whl (162 kB)
0185|━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 162.5/162.5 kB 7.7 MB/s eta 0:00:00
0186|Downloading charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (140 kB)
0187|━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.3/140.3 kB 15.0 MB/s eta 0:00:00
0188|Downloading idna-3.6-py3-none-any.whl (61 kB)
0189|━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.6/61.6 kB 12.8 MB/s eta 0:00:00
0190|Downloading urllib3-2.1.0-py3-none-any.whl (104 kB)
0191|━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 104.6/104.6 kB 13.2 MB/s eta 0:00:00
0192|Installing collected packages: pyserial, urllib3, pyudev, idna, charset-normalizer, certifi, requests
0193|Successfully installed certifi-2023.11.17 charset-normalizer-3.3.2 idna-3.6 pyserial-3.5 pyudev-0.24.1 requests-2.31.0 urllib3-2.1.0
0194|WARNING The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
0195|Collecting pymodbus==3.2.2
0196|Downloading pymodbus-3.2.2-py3-none-any.whl (166 kB)
0197|━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 166.5/166.5 kB 1.9 MB/s eta 0:00:00
0198|Collecting setuptools<66.0.0 (from pymodbus==3.2.2)
0199|Downloading setuptools-65.7.0-py3-none-any.whl (1.2 MB)
0200|━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 1.5 MB/s eta 0:00:00
0201|Installing collected packages: setuptools, pymodbus
0202|Attempting uninstall: setuptools
0203|Found existing installation: setuptools 69.0.3
0204|Uninstalling setuptools-69.0.3:
0205|Successfully uninstalled setuptools-69.0.3
0206|Successfully installed pymodbus-3.2.2 setuptools-65.7.0
0207|********************************************************
0208|*           Installation terminée                      *
0209|********************************************************
0210|Tue Jan  9 09:42:47 CET 2024
0211|+ echo 12
0212|+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end mymodbus
0213|+ rm /tmp/jeedom_install_in_progress_mymodbus
0214|+ echo '*******************End of package installation******************'
0215|*******************End of package installation******************

Bravo à toi !!!

Nickel, merci pour ton retour, je mets ça dans la prochaine version.

edit: par contre le tag solution devrait être mis sur ma proposition de solution et pas sur le résultat du test

corrigé :wink:

1 « J'aime »

Je réouvre le sujet car apparemment il y a encore un problème => @Michel_F

En debian 10 pas de soucis tout est ok

En récupérant un backup de debian 10 pour le mettre sur une fresh install debian11,
OU en réinstallant MyModbus
OU en le mettant à jour

Le daemon refuses de démarrer :

A remarquer dans le log qui suit cette ligne :

0033|ImportError: libffi.so.6: cannot open shared object file: No such file or directory
0009|[2024-01-10 09:58:59]DEBUG : eqLogic mymodbus getCompleteConfiguration: [{"id":"3059","name":"SUN_2000","eqProtocol":"tcp","eqKeepopen":"0","eqRefreshMode":"cyclic","eqPolling":"30","eqWriteCmdCheckTimeout":"5","eqFirstDelay":"10","eqTcpAddr":"192.168.2.139","eqTcpPort":"502","eqTcpRtu":"0","cmds":[{"id":"60383","name":"Backup SOC Min","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int16","cmdAddress":"47102","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60433","name":"Tension grid","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"37101","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60435","name":"Tension onduleur ","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int16","cmdAddress":"32066","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"61755","name":"Temp\u00e9rature Batterie","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int16","cmdAddress":"37022","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60386","name":"Capacit\u00e9 Batterie","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"37758","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60377","name":"SOC Limite de d\u00e9charge","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int16","cmdAddress":"47082","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60199","name":"Prod","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"32064","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"1"},{"id":"60193","name":"SOC","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int16","cmdAddress":"37760","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60195","name":"Batterie","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"37765","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"1"},{"id":"60190","name":"EDF","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"37113","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60017","name":"Conso","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"32080","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"}]}]
0010|[2024-01-10 09:58:59]DEBUG : deamon_start socketport *55502*
0011|[2024-01-10 09:58:59]DEBUG : deamon_start API-key *'v6lXFJHrWBfZ6Y6dt8fHbQTIOgHWrRmYxntMj6fGmXUU3pZAt1bPcjYrUqIMEQqO'*
0012|[2024-01-10 09:58:59]DEBUG : deamon_start callbackURL *'localhost:80/plugins/mymodbus/core/php/jeemymodbus.php'*
0013|[2024-01-10 09:58:59]DEBUG : deamon_start config *'[{"id":"3059","name":"SUN_2000","eqProtocol":"tcp","eqKeepopen":"0","eqRefreshMode":"cyclic","eqPolling":"30","eqWriteCmdCheckTimeout":"5","eqFirstDelay":"10","eqTcpAddr":"192.168.2.139","eqTcpPort":"502","eqTcpRtu":"0","cmds":[{"id":"60383","name":"Backup SOC Min","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int16","cmdAddress":"47102","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60433","name":"Tension grid","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"37101","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60435","name":"Tension onduleur ","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int16","cmdAddress":"32066","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"61755","name":"Temp\u00e9rature Batterie","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int16","cmdAddress":"37022","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60386","name":"Capacit\u00e9 Batterie","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"37758","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60377","name":"SOC Limite de d\u00e9charge","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int16","cmdAddress":"47082","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60199","name":"Prod","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"32064","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"1"},{"id":"60193","name":"SOC","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int16","cmdAddress":"37760","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60195","name":"Batterie","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"37765","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"1"},{"id":"60190","name":"EDF","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"37113","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60017","name":"Conso","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"32080","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"}]}]'*
0014|[2024-01-10 09:58:59]INFO : Lancement du démon mymodbus : export PYENV_ROOT="/var/www/html/plugins/mymodbus/ressources/_pyenv"; command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"; eval "$(pyenv init -)"; cd /var/www/html/plugins/mymodbus/ressources/mymodbusd; nice -n 19 python3 mymodbusd.py --socketport 55502 --loglevel 'debug' --apikey 'v6lXFJHrWBfZ6Y6dt8fHbQTIOgHWrRmYxntMj6fGmXUU3pZAt1bPcjYrUqIMEQqO' --callback 'localhost:80/plugins/mymodbus/core/php/jeemymodbus.php' --json '[{"id":"3059","name":"SUN_2000","eqProtocol":"tcp","eqKeepopen":"0","eqRefreshMode":"cyclic","eqPolling":"30","eqWriteCmdCheckTimeout":"5","eqFirstDelay":"10","eqTcpAddr":"192.168.2.139","eqTcpPort":"502","eqTcpRtu":"0","cmds":[{"id":"60383","name":"Backup SOC Min","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int16","cmdAddress":"47102","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60433","name":"Tension grid","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"37101","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60435","name":"Tension onduleur ","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int16","cmdAddress":"32066","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"61755","name":"Temp\u00e9rature Batterie","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int16","cmdAddress":"37022","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60386","name":"Capacit\u00e9 Batterie","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"37758","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60377","name":"SOC Limite de d\u00e9charge","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int16","cmdAddress":"47082","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60199","name":"Prod","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"32064","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"1"},{"id":"60193","name":"SOC","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int16","cmdAddress":"37760","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60195","name":"Batterie","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"37765","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"1"},{"id":"60190","name":"EDF","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"37113","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"},{"id":"60017","name":"Conso","type":"info","cmdSlave":"1","cmdFctModbus":"3","cmdFormat":"int32","cmdAddress":"32080","cmdFrequency":"1","cmdInvertBytes":"0","cmdInvertWords":"0","repeat":"0"}]}]'
0015|[2024-01-10 09:58:59]DEBUG : deamon_info = {"state":"nok","launchable":"ok"}
0016|Traceback (most recent call last):
0017|File "/var/www/html/plugins/mymodbus/ressources/mymodbusd/mymodbusd.py", line 41, in <module>
0018|from mymodbus import PyModbusClient
0019|File "/var/www/html/plugins/mymodbus/ressources/mymodbusd/mymodbus.py", line 37, in <module>
0020|from jeedom.jeedom import jeedom_utils
0021|File "/var/www/html/plugins/mymodbus/ressources/mymodbusd/jeedom/jeedom.py", line 34, in <module>
0022|import pyudev
0023|File "/var/www/html/plugins/mymodbus/ressources/_pyenv/versions/3.11.6/lib/python3.11/site-packages/pyudev/__init__.py", line 45, in <module>
0024|from pyudev.core import Context, Enumerator
0025|File "/var/www/html/plugins/mymodbus/ressources/_pyenv/versions/3.11.6/lib/python3.11/site-packages/pyudev/core.py", line 27, in <module>
0026|from pyudev._ctypeslib.libudev import ERROR_CHECKERS, SIGNATURES
0027|File "/var/www/html/plugins/mymodbus/ressources/_pyenv/versions/3.11.6/lib/python3.11/site-packages/pyudev/_ctypeslib/__init__.py", line 26, in <module>
0028|from . import libc, libudev
0029|File "/var/www/html/plugins/mymodbus/ressources/_pyenv/versions/3.11.6/lib/python3.11/site-packages/pyudev/_ctypeslib/libc.py", line 27, in <module>
0030|from ctypes import c_int
0031|File "/var/www/html/plugins/mymodbus/ressources/_pyenv/versions/3.11.6/lib/python3.11/ctypes/__init__.py", line 8, in <module>
0032|from _ctypes import Union, Structure, Array
0033|ImportError: libffi.so.6: cannot open shared object file: No such file or directory
0034|[2024-01-10 09:59:04]DEBUG : deamon_info = {"state":"nok","launchable":"ok"}
0035|[2024-01-10 09:59:10]DEBUG : deamon_info = {"state":"nok","launchable":"ok"}
0036|[2024-01-10 09:59:16]DEBUG : deamon_info = {"state":"nok","launchable":"ok"}
0037|[2024-01-10 09:59:22]DEBUG : deamon_info = {"state":"nok","launchable":"ok"}

Ce n’est pas lié à Debian 11, parce que ma machine de dev est sous Debian 11.

Lors de l’installation du plugin, libffi-dev devrait être installé, est-ce bien le cas ?
Pour vérifier, tu peux utiliser un terminal :

dpkg -s libffi-dev | grep Status

Si tu n’as rien en retour, ce n’est pas installé, sinon tu auras un truc du genre Status: install ok installed.
Si ce n’est pas installé :

apt install libffi-dev

Avec sudo devant si tu n’es pas root.

edit:

Oui, il était installé

J’ai relancé une install de libffi-dev par acquis de conscience … idem, même punition

Au final j’ai supprimé le rep « plugins/mymodbus/ressources/_pyenv » et j’ai relancé les dépendances

Visiblement cela semble avoir résolu le problème, Mymodbus refonctionne, même après reboot … pour l’instant :wink:

L’astuce de la suppression du rep est à mettre de coté …

Je vais finir par faire un bouton dans la config qui supprime ce répertoire…