Update

Questions générales sur l'installation et l'utilisation de Yadoms
nevaram
Messages : 15
Enregistré le : 21 décembre 2017, 19:24

Update

Message par nevaram »

Bonjour,

J'essaye d'utiliser yadoms, mais rien ne semble fonctionner. Je pense que la base des mes problemes vient que je n'ai pas d'interpreteur de script d'installé. Dans le menu Update, rien ne se passe et dans les logs j'ai les messages suivants.

Code : Tout sélectionner

09:21:35 : scanForUpdates : [Error] : Unable to get avalaibility of interpreter Python 2.7 : Interpreter doesn't answer to avalaible request : No answer from interpreter when sending message 4
09:21:35 : scanForUpdates : [Error] : Unable to get avalaibility of interpreter Python 2.7 : timeout
09:21:35 : scanForUpdates : [Error] :  Error scanning available versions (do you have a working Internet connection ?), Interpreter yPython27 not found

Capture.PNG
Capture.PNG (32.68 Kio) Vu 22259 fois
Avatar du membre
sgallou
Messages : 128
Enregistré le : 25 avril 2017, 09:56

Re: Update

Message par sgallou »

Bonjour,

effectivement, python n'a pas été trouvé. Python 2.7 doit être installé sur votre machine. En respectant les installations par défaut, ça devrait normalement fonctionner (après redémarrage de Yadoms).

Sous Linux et Mac, Python doit être dans le path.

Sous Windows, Python est recherché, par priorité :
  • Dans le path
  • Dans le chemin indiqué par la clé de registre HKLM\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath
  • Dans le chemin indiqué par la clé de registre HKLM\\SOFTWARE\\Wow6432Node\\Python\\PythonCore\\2.7\\InstallPath
  • Sous C:\python27
  • Sous %ProgramFiles%\python27
  • Sous %ProgramFiles(x86)%\python27
A noter que Python 2.7 étant en passe de devenir obsolète, le développement du support de Python 3.x est prévu à court terme.

Sébastien
nevaram
Messages : 15
Enregistré le : 21 décembre 2017, 19:24

Re: Update

Message par nevaram »

Merci pour cette réponse, je suis sur ubuntu et je ne maîtrise pas trop linux.

Il me semble que python soit correctement installé, j'ai simplement fait un apt-get install python2.7
Si je tape juste python j'obtient les lignes suivantes (je suppose qu'il est dans le PATH?) :

Code : Tout sélectionner

Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0] on linux2
>>>
dans le doute j'avais également fait apt-get install python-dev

pour l’installation de yadoms, j'ai copier les fichiers de https://github.com/Yadoms/yadoms/releas ... nux.tar.gz dans /opt/yadoms il y a-t-il autre chose à faire ?
Avatar du membre
sgallou
Messages : 128
Enregistré le : 25 avril 2017, 09:56

Re: Update

Message par sgallou »

Hmmm... C'est étrange effectivement, python semble correctement installé.

Il semblerait que l'interpréteur (côté Yadoms) soit mal installé. Pouvez-vous essayer de le supprimer (ou de déplacer /opt/yadoms/scriptInterpreters/yPython27 en dehors de l'arborescence de Yadoms), de relancer Yadoms et de tenter l'installation via la page de mise à jour ?

Si le problème n'est pas résolu, pourriez-vous m'envoyer le log du démarrage de Yadoms (/opt/yadoms/log/yadoms.log) ?

Sébastien
nevaram
Messages : 15
Enregistré le : 21 décembre 2017, 19:24

Re: Update

Message par nevaram »

Alors quand je retire le dossier scriptInterpreters ça a l'air de fonctionner, j'ai la liste des updates qui s'affiche et je peux lancer l'installation de l’interpréteur python.

Par contre, dés qu'il à fini de s'installer, ça se remet à planter et j'ai les messages suivants:

Code : Tout sélectionner

12:15:38 : scriptInterpreter.install : [Error] : Unable to get avalaibility of interpreter Python 2.7 : Interpreter doesn't answer to avalaible request : No answer from interpreter when sending message 4
12:15:38 : scriptInterpreter.install : [Error] : Unable to get avalaibility of interpreter Python 2.7 : timeout
c'est peut être un problème de droit ? les fichiers appartiennent à root et j’exécute yadoms avec sudo
Avatar du membre
sgallou
Messages : 128
Enregistré le : 25 avril 2017, 09:56

Re: Update

Message par sgallou »

Je ne pense pas que ce soit un problème de droit. Notre interpréteur pour Python 2.7 fonctionne exactement de la même manière que les plugins (lancement du process par Yadoms), et je suppose que les plugins fonctionnent.

Pouvez-vous m'envoyer votre dernier yadoms.log (idéalement avec le niveau de trace le plus élevé, à régler dans yadoms.ini), ainsi que interpreter.log (dans logs/scriptInterpreters/yPython27) ?

Par ailleurs, il n'est pas recommandé de lancer Yadoms avec les droits root. Il serait préférable de créer un utilisateur dédié (en s'inspirant de cet article. Même si je ne pense pas que ça soit lié à votre problème.

Pouvez-vous également m'envoyer ce que renvoi exactement la commande "python --version" ?

Merci,
Sébastien
nevaram
Messages : 15
Enregistré le : 21 décembre 2017, 19:24

Re: Update

Message par nevaram »

Alors dans l'ordre:

Code : Tout sélectionner

  cat logs/yadoms.log
# Log file created/rotated Monday, 6 May 19 12:14:01 GMT
12:14:01 : Supervisor : [Error] : Fail to execute query : no such table: Configuration
12:14:01 : Supervisor : [Error] : Fail to execute query : no such table: Configuration
12:15:38 : scriptInterpreter.install : [Error] : Unable to get avalaibility of interpreter Python 2.7 : Interpreter doesn't answer to avalaible request : No answer from interpreter when sending message 4
12:15:38 : scriptInterpreter.install : [Error] : Unable to get avalaibility of interpreter Python 2.7 : timeout
12:16:11 : scanForUpdates : [Error] : Unable to get avalaibility of interpreter Python 2.7 : Interpreter doesn't answer to avalaible request : No answer from interpreter when sending message 4
12:16:11 : scanForUpdates : [Error] : Unable to get avalaibility of interpreter Python 2.7 : timeout
12:16:11 : scanForUpdates : [Error] :  Error scanning available versions (do you have a working Internet connection ?), Interpreter yPython27 not found
12:16:41 :  : [Error] : Unable to get avalaibility of interpreter Python 2.7 : Interpreter doesn't answer to avalaible request : No answer from interpreter when sending message 4
12:16:41 :  : [Error] : Unable to get avalaibility of interpreter Python 2.7 : timeout
13:36:10 : Main : [Information] : ********************************************************************
13:36:10 : Main : [Information] : Yadoms 2.2.1 is starting
13:36:10 : Main : [Information] : ********************************************************************
13:36:10 : Main : [Information] : Startup options :
13:36:10 : Main : [Information] :       Log level = trace
13:36:10 : Main : [Information] :       Log path = "logs"
13:36:10 : Main : [Information] :       Web server port number = 80
13:36:10 : Main : [Information] :       SSL activated = 0
13:36:10 : Main : [Information] :       SSL Web server port number = 443
13:36:10 : Main : [Information] :       Web server ip = 0.0.0.0
13:36:10 : Main : [Information] :       Web server path = www
13:36:10 : Main : [Information] :       Database engine = sqlite
13:36:10 : Main : [Information] :               Sqlite Database path = yadoms.db3
13:36:10 : Main : [Information] : ********************************************************************
13:36:10 : Main : [Debug] : Yadoms is running...
13:36:10 : Supervisor : [Debug] : Supervisor is starting
13:36:10 : Supervisor : [Information] : Load database
13:36:10 : Supervisor : [Information] : Initialize SQLite database
13:36:10 : Supervisor : [Information] : Check for database update...
13:36:10 : Supervisor : [Information] : Load database with success
13:36:10 : Supervisor : [Information] : Summary task will happens @14:1
13:36:10 : Supervisor : [Information] : Next step in 24 minutes
13:36:10 : Summary computing task : [Information] : Start computing summary values
13:36:10 : Summary computing task : [Information] : End of computing summary values
13:36:10 : Database purge task : [Information] : Start purging database : removing acquisition of more than 30 days : prior to 2019-Apr-06 00:00:00
13:36:10 : Database purge task : [Trace] : Do a purge step...
13:36:10 : Database purge task : [Information] : End of purging database
13:36:10 : CUpdateManager : [Debug] : Start
13:36:10 : Supervisor : [Information] : Start all plugin instances...
13:36:10 : Supervisor : [Information] : Plugin teleinfo found
13:36:10 : Supervisor : [Information] : Plugin WebConnectionQuality found
13:36:10 : Supervisor : [Information] : Plugin WES found
13:36:10 : Supervisor : [Information] : Plugin ZWave found
13:36:10 : Supervisor : [Information] : Plugin WeatherUnderground found
13:36:10 : Supervisor : [Information] : Plugin RfxLanXpl found
13:36:10 : Supervisor : [Information] : Plugin RfPlayer found
13:36:10 : Supervisor : [Information] : Plugin Sigfox found
13:36:10 : Supervisor : [Information] : Plugin megatecUps found
13:36:10 : Supervisor : [Information] : Plugin SystemInformation found
13:36:11 : Supervisor : [Information] : Plugin rfxcom found
13:36:11 : Supervisor : [Information] : Plugin SomfySituo found
13:36:11 : Supervisor : [Information] : Plugin IPX800 found
13:36:11 : Supervisor : [Information] : Plugin Linky found
13:36:11 : Supervisor : [Information] : Plugin enOcean found
13:36:11 : Supervisor : [Information] : Plugin OrangeBusiness found
13:36:11 : Supervisor : [Information] : Plugin OneWire found
13:36:11 : Supervisor : [Information] : Plugin MailSender found
13:36:11 : Supervisor : [Information] : Plugin freeMobileSms found
13:36:11 : Supervisor : [Information] : Start plugin instance System
13:36:11 : Supervisor : [Debug] : All plugin instances are started, wait for running...
13:36:11 : InternalPlugin : [Debug] : InternalPlugin is running...
13:36:13 : Supervisor : [Information] : All started instances are now running
13:36:13 : Supervisor : [Debug] : DateTimeNotifier : schedule the task @13:37:00.000
13:36:13 : Supervisor : [Information] : Supervisor is running...
13:37:00 :  : [Debug] : DateTimeNotifier : schedule the task @13:38:00.000
13:37:13 :  : [Trace] : Rest request : [GET] : /rest/configuration/server
13:37:13 :  : [Trace] : Rest request : [GET] : /rest/configuration/databaseVersion
13:37:13 :  : [Trace] : Rest request : [GET] : /rest/configuration/external/webClient
13:37:14 :  : [Trace] : Rest request : [GET] : /rest/plugin/instance
13:37:14 :  : [Trace] : Rest request : [GET] : /rest/system/information
13:37:14 : Websocket connection : [Information] : New websocket client
13:37:14 : Websocket receiver thread : [Debug] : Started
13:37:14 :  : [Trace] : Rest request : [GET] : /rest/widget/package
13:37:14 :  : [Trace] : Rest request : [GET] : /rest/page
13:37:14 :  : [Trace] : Rest request : [GET] : /rest/page/1/widget
13:37:14 :  : [Trace] : Rest request : [GET] : /rest/eventLogger/last
13:37:14 : Websocket receiver thread : [Debug] : Websocket receive data : {"type":"acquisitionFilter","data":[]}
13:37:14 : Websocket receiver thread : [Debug] : Websocket receive data : {"type":"acquisitionFilter","data":[]}
13:37:16 :  : [Trace] : Rest request : [GET] : /rest/system/information
13:37:16 :  : [Trace] : Rest request : [GET] : /rest/maintenance/information
13:37:17 :  : [Trace] : Rest request : [GET] : /rest/system/information
13:37:18 :  : [Trace] : Rest request : [POST] : /rest/update/scan
13:37:18 :  : [Information] : Task : scanForUpdates successfully started. TaskId = 6953a7e6-43e1-473e-a531-5b52473ddfca
13:37:18 : scanForUpdates : [Debug] : scanForUpdates report progression 0 with message task.started
13:37:18 : scanForUpdates : [Information] : Scan for updates...
13:37:18 : scanForUpdates : [Debug] : scanForUpdates report progression 0 with message scanForUpdates
13:37:18 : scanForUpdates : [Debug] : Read Yadoms versions...
13:37:19 :  : [Trace] : Rest request : [GET] : /rest/eventLogger/from/6
13:37:22 : scanForUpdates : [Debug] : Read Plugins versions...
13:37:24 :  : [Trace] : Rest request : [GET] : /rest/eventLogger/from/7
13:37:29 :  : [Trace] : Rest request : [GET] : /rest/eventLogger/from/7
13:37:30 : scanForUpdates : [Debug] : Read Widgets versions...
13:37:31 : scanForUpdates : [Debug] : Read ScriptInterpreters versions...
13:37:31 : scanForUpdates : [Debug] : Start process "scriptInterpreters/yPython27/yPython27" from "."
13:37:31 : scanForUpdates : [Information] : Message queue ID : yInterpreter.af838106-f2d8-4a5f-8bd3-94dc45bee168
13:37:31 : scanForUpdates : [Trace] : [SEND] message 2 to interpreter Python 2.7
13:37:31 : scanForUpdates : [Trace] : [SEND] message 4 to interpreter Python 2.7
13:37:31 : interpreter.yPython27 : [Information] : #### START ####
13:37:31 :  : [Information] : Interpreter Python 2.7 is running
13:37:31 :  : [Information] : Interpreter Python 2.7 is stopped
13:37:34 :  : [Trace] : Rest request : [GET] : /rest/eventLogger/from/7
13:37:39 :  : [Trace] : Rest request : [GET] : /rest/eventLogger/from/7
13:37:44 :  : [Trace] : Rest request : [GET] : /rest/eventLogger/from/7
13:37:49 :  : [Trace] : Rest request : [GET] : /rest/eventLogger/from/7
13:37:54 :  : [Trace] : Rest request : [GET] : /rest/eventLogger/from/7
13:37:59 :  : [Trace] : Rest request : [GET] : /rest/eventLogger/from/7
13:38:00 :  : [Debug] : DateTimeNotifier : schedule the task @13:39:00.000
13:38:01 : scanForUpdates : [Debug] : Send AvalaibleRequest to interpreter Python 2.7
13:38:01 : scanForUpdates : [Error] : Unable to get avalaibility of interpreter Python 2.7 : Interpreter doesn't answer to avalaible request : No answer from interpreter when sending message 4
13:38:01 : scanForUpdates : [Error] : Unable to get avalaibility of interpreter Python 2.7 : timeout
13:38:01 : scanForUpdates : [Error] :  Error scanning available versions (do you have a working Internet connection ?), Interpreter yPython27 not found
13:38:01 : scanForUpdates : [Debug] : scanForUpdates report progression 100 with message scanForUpdates.failed
13:38:01 : taskScheduler : [Information] : Stopping thread Task scanForUpdates
13:38:01 : scanForUpdates : [Debug] : Close message queues
13:38:01 :  : [Trace] : Rest request : [GET] : /rest/update/list/releasesOnly
13:38:04 :  : [Trace] : Rest request : [GET] : /rest/eventLogger/from/7
13:38:09 :  : [Trace] : Rest request : [GET] : /rest/eventLogger/from/7
Le dossier logs/scriptInterpreters est vide

Code : Tout sélectionner

 python --version
Python 2.7.15rc1
Avatar du membre
sgallou
Messages : 128
Enregistré le : 25 avril 2017, 09:56

Re: Update

Message par sgallou »

Je crois que je viens de reproduire votre problème sous Windows.
Je vous tiens au courant.

Désolé pour ce contre-temps,
Sébastien
nevaram
Messages : 15
Enregistré le : 21 décembre 2017, 19:24

Re: Update

Message par nevaram »

OK, pas de soucis.

Je peux aussi vous donner un accès la vm si besoin.

Tenez moi au courant.
Avatar du membre
sgallou
Messages : 128
Enregistré le : 25 avril 2017, 09:56

Re: Update

Message par sgallou »

Bonjour,

je vous ai répondu par MP.

Sébastien
Répondre