Effectivement (on est en préparation ici de la RC de wapt le problème est corrigé)
en attendant vous pouvez remplace la ligne par
data = subprocess.check_output( 'mongoexport -d wapt -chosts --jsonArray --db wapt' ,shell =True)Attention mongodb doit être run
Il faut également replacer :
jsondata = json.load()par:
jsondata = json.loads(data)
Une nouvelle version sera publié en ligne rapidement
Simon
Le 17/02/2018 à 23:35, Eric Sanders a écrit :
Bonsoir,
J'ai fais des tests de migrations d'un serveur sous debian et j'ai un soucis :
sudo -u wapt /usr/bin/python /opt/wapt/waptserver/waptserver_upgrade.py upgrade2postgres Upgrading from mongodb to postgres
[options]##########mongodb_port=27017##########mongodb_ip=127.0.0.1#wapt_folder=/var/www/wapt/#waptwua_folder=/var/www/waptwua #waptserver_port=8080wapt_user=adminwapt_password=20159058655678cf35c2c7653229d8 0fd21ab2 wapt_folder = /var/www/waptserver_uuid = bd968efa-ac1f-11e6-b9d5-000c2991021a secret_key = 0pGxrUaTXqHXJ3OXu8fmNasofOofxLdwvUBvFruHzcDQARKr30foxClWEkfZ ln1h use_kerberos = Falseallow_unauthenticated_registration = True #loglevel=warning
#client_tasks_timeout=0.3#client_tasks_timeout=0.3 #client_connect_timeout=1#client_read_timeout=10
could not change directory to "/root": Permission non accordéedumping mongodb data2018-02-17T20:24:16.926+0100 error parsing command line options: --dbpath and related flags are not supported in 3.0 tools.See http://dochub.mongodb.org/core/tools-dbpath-deprecated for more information2018-02-17T20:24:16.926+0100 try 'mongoexport --help' for more informationTraceback (most recent call last):File "/opt/wapt/waptserver/waptserver_upgrade.py", line 198, in <module> upgrade2postgres()File "/opt/wapt/waptserver/waptserver_upgrade.py", line 156, in upgrade2postgres jsondata = create_import_data()File "/opt/wapt/waptserver/waptserver_upgrade.py", line 77, in create_import_data data = subprocess.check_output('mongoexport -d wapt -c hosts --jsonArray --dbpath=%s' % mongo_datadir,shell=True) File "/usr/lib/python2.7/subprocess.py", line 219, in check_output raise CalledProcessError(retcode, cmd, output=output)subprocess.CalledProcessError: Command 'mongoexport -d wapt -c hosts --jsonArray --dbpath=/var/lib/mongodb/' returned non-zero exit status 3
J'ai tester depuis une debian 8 puis j'ai fais la même chose depuis une debian 9 .... même punition ....
mongoexport -d wapt -c hosts --jsonArray --dbpath=/var/lib/mongodb
Cette commande semble deprecated ...
_______________________________________________ WAPT mailing list WAPT@lists.tranquil.it http://lists.tranquil.it/ listinfo/wapt
_______________________________________________
WAPT mailing list
WAPT@lists.tranquil.it
http://lists.tranquil.it/listinfo/wapt