Good morning
I also had a problem during the database migration with the postconf.sh script.
So I tried the command you indicated, namely:
Code: Select all
sudo -u wapt PYTHONPATH=/opt/wapt PYTHONHOME=/opt/wapt /opt/wapt/bin/python /opt/wapt/waptserver/upgrade.py upgrade2postgres -c "/opt/wapt/conf/waptserver.ini"
This does not work (see below).
Code: Select all
dumping mongodb data
If you are running a mongod on the same path you should connect to that instead of direct data file access
2018-10-25T12:28:43.130+0200 [tools] dbexit:
2018-10-25T12:28:43.130+0200 [tools] shutdown: going to close listening sockets...
2018-10-25T12:28:43.130+0200 [tools] shutdown: going to flush diaglog...
2018-10-25T12:28:43.130+0200 [tools] shutdown: going to close sockets...
2018-10-25T12:28:43.131+0200 [tools] shutdown: waiting for fs preallocator...
2018-10-25T12:28:43.131+0200 [tools] shutdown: closing all files...
2018-10-25T12:28:43.131+0200 [tools] closeAllFiles() finished
2018-10-25T12:28:43.131+0200 [tools] shutdown: removing fs lock...
2018-10-25T12:28:43.131+0200 [tools] couldn't remove fs lock errno:9 Bad file descriptor
2018-10-25T12:28:43.131+0200 [tools] dbexit: really exiting now
Traceback (most recent call last):
File "/opt/wapt/waptserver/upgrade.py", line 190, in <module>
upgrade2postgres()
File "/opt/wapt/waptserver/upgrade.py", line 152, in upgrade2postgres
jsondata = create_import_data()
File "/opt/wapt/waptserver/upgrade.py", line 71, 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 574, 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 45
I have the impression that a mongod.lock file is created each time and causes a problem, or perhaps I'm mistaken?
Code: Select all
drwxr-xr-x 3 mongodb mongodb 4096 oct. 25 12:17 ./
drwxr-xr-x 42 root root 4096 oct. 24 15:27 ../
drwxr-xr-x 2 mongodb mongodb 4096 oct. 25 12:17 journal/
-rw------- 1 mongodb mongodb 67108864 oct. 25 12:17 local.0
-rw------- 1 mongodb mongodb 16777216 oct. 25 12:17 local.ns
-rwxr-xr-x 1 mongodb mongodb 6 oct. 25 12:17 mongod.lock*
-rw------- 1 mongodb mongodb 67108864 oct. 24 13:49 wapt.0
-rw------- 1 mongodb mongodb 134217728 oct. 24 13:46 wapt.1
-rw------- 1 mongodb mongodb 268435456 oct. 24 13:34 wapt.2
-rw------- 1 mongodb mongodb 16777216 oct. 24 13:34 wapt.ns