We upgraded Debian from 16.04 to Debian 18.10, and Globaleaks from 3.4.1 and 3.6.8.
The updated Globaleaks installation completed successfully but fails to start.
Extended logs show failure while migrating tables. Our old database and backup is still on version 44.
If the migration fails all the time, how do we roll back to version 3.4.1?
See logs below:
● globaleaks.service - LSB: Start the GlobaLeaks server.
Loaded: loaded (/etc/init.d/globaleaks; generated)
Active: active (exited) since Tue 2019-01-29 07:38:49 UTC; 3min 7s ago
Docs: man:systemd-sysv-generator(8)
Process: 1088 ExecStart=/etc/init.d/globaleaks start (code=exited, status=0/SUCCESS)
Jan 29 07:38:44 ac-globaleaks-01 systemd[1]: Starting LSB: Start the GlobaLeaks server…
Jan 29 07:38:48 ac-globaleaks-01 globaleaks[1088]: * Starting GlobaLeaks daemon globaleaks
Jan 29 07:38:49 ac-globaleaks-01 globaleaks[1088]: …done.
Jan 29 07:38:49 ac-globaleaks-01 systemd[1]: Started LSB: Start the GlobaLeaks server…
root@ac-globaleaks-01:~# curl -vvv localhost:8082
- Rebuilt URL to: localhost:8082/
- Trying 127.0.0.1…
- TCP_NODELAY set
- connect to 127.0.0.1 port 8082 failed: Connection refused
- Failed to connect to localhost port 8082: Connection refused
- Closing connection 0
curl: (7) Failed to connect to localhost port 8082: Connection refused
root@ac-globaleaks-01:~# globaleaks -v
GlobaLeaks version: 3.6.8
Database version: 46
2019-01-29 07:03:33+0000 [-] Loading /usr/lib/python2.7/dist-packages/globaleaks/backend.py…
2019-01-29 07:03:34+0000 [-] Loaded.
2019-01-29 07:03:34+0000 [-] twistd 17.9.0 (/usr/bin/python 2.7.15) starting up.
2019-01-29 07:03:34+0000 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2019-01-29 07:03:34+0000 [-] /usr/lib/python2.7/dist-packages/sqlalchemy/ext/declarative/clsregistry.py:120: sqlalchemy.exc.SAWarning: This declarative base already contains a class with the same class name and module name as globaleaks.db.migration.y, and will be replaced in the string-lookup table.
2019-01-29 07:03:36+0000 [-] [E] Found an already initialized database version: 44
2019-01-29 07:03:36+0000 [-] [E] Performing schema migration from version 44 to version 46
2019-01-29 07:03:36+0000 [-] [I] Updating DB from version 44 to version 45
2019-01-29 07:03:36+0000 [-] [I] Migrating table:
2019-01-29 07:03:36+0000 [-] * Anomalies [#2706]
2019-01-29 07:03:37+0000 [-] * ArchivedSchema [#3]
2019-01-29 07:03:37+0000 [-] * Comment [#20]
2019-01-29 07:03:37+0000 [-] * Config [#90]
2019-01-29 07:03:37+0000 [-] * ConfigL10N [#73]
2019-01-29 07:03:37+0000 [-] * Context [#8]
2019-01-29 07:03:37+0000 [-] * ContextImg [#7]
2019-01-29 07:03:37+0000 [-] * CustomTexts [#0]
2019-01-29 07:03:37+0000 [-] * EnabledLanguage [#1]
2019-01-29 07:03:37+0000 [-] * Field [#161]
2019-01-29 07:03:37+0000 [-] * FieldAnswer [#185]
2019-01-29 07:03:37+0000 [-] * FieldAnswerGroup [#108]
2019-01-29 07:03:37+0000 [-] ł FieldAttr [#516]
2019-01-29 07:03:37+0000 [-] * FieldOption [#205]
2019-01-29 07:03:37+0000 [-] * File [#2]
2019-01-29 07:03:37+0000 [-] * IdentityAccessRequest [#0]
2019-01-29 07:03:37+0000 [-] * InternalFile [#51]
2019-01-29 07:03:37+0000 [-] * InternalTip [#9]
2019-01-29 07:03:37+0000 [-] * Mail [#0]
2019-01-29 07:03:37+0000 [-] * Message [#0]
2019-01-29 07:03:37+0000 [-] * Questionnaire [#9]
2019-01-29 07:03:37+0000 [-] * Receiver [#14]
2019-01-29 07:03:37+0000 [-] * ReceiverContext [#14]
2019-01-29 07:03:37+0000 [-] * ReceiverFile [#167]
2019-01-29 07:03:37+0000 [-] * ReceiverTip [#21]
2019-01-29 07:03:37+0000 [-] * SecureFileDelete [#1]
2019-01-29 07:03:37+0000 [-] * SubmissionStatus [#3]
2019-01-29 07:03:37+0000 [-] * SubmissionSubStatus [#0]
2019-01-29 07:03:37+0000 [-] * SubmissionStatusChange [#8]
2019-01-29 07:03:37+0000 [-] * ShortURL [#0]
2019-01-29 07:03:37+0000 [-] * Signup [#0]
2019-01-29 07:03:37+0000 [-] * Stats [#10]
2019-01-29 07:03:37+0000 [-] * Step [#10]
2019-01-29 07:03:37+0000 [-] * Tenant [#1]
2019-01-29 07:03:37+0000 [-] ł User [#18]
2019-01-29 07:03:38+0000 [-] * UserImg [#2]
2019-01-29 07:03:38+0000 [-] * UserTenant [#18]
2019-01-29 07:03:38+0000 [-] * WhistleblowerFile [#188]
2019-01-29 07:03:38+0000 [-] [E] Failure while migrating table WhistleblowerFile: (sqlite3.IntegrityError) UNIQUE constraint failed: whistleblowerfile.filename [SQL: u’INSERT INTO whistleblowerfile (id, receivertip_id, name, filename, size, content_type, downloads, creation_date, last_access, description, new) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’] [parameters: ((u’8f6f980f-9589-4ddc-91da-624be0cfcea0’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 1.pdf’, u’g6CLZ3XRtaRZIY1l.plain’, 158864, u’application/pdf’, 0, ‘2019-01-23 09:27:49.867779’, ‘1970-01-01 00:00:00.000000’, u’Email 1’, 1), (u’52ffb8c6-6f07-4ef7-9467-7ce602f65da9’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 1 - Annexure A .jpg’, u’EenyAJBjQdGseRhL.plain’, 143923, u’image/jpeg’, 0, ‘2019-01-23 09:29:38.514923’, ‘1970-01-01 00:00:00.000000’, u’Email 1 - Annexure A’, 1), (u’c45c71f8-15cc-48fb-8093-d04e65886743’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 2.pdf’, u’Y4eQ6OCdkPRLkgxp.plain’, 173071, u’application/pdf’, 0, ‘2019-01-23 09:30:02.831072’, ‘1970-01-01 00:00:00.000000’, u’Email 2’, 1), (u’9dc156f5-3a18-4581-80bf-46e5ece1e218’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 3.pdf’, u’pNSyRxgTTfACQRv3.plain’, 163389, u’application/pdf’, 0, ‘2019-01-23 09:30:23.614091’, ‘1970-01-01 00:00:00.000000’, u’Email 3’, 1), (u’860f24be-4bd4-4268-8b2a-14b9ed5d8d74’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 3 - Annexure A.pdf’, u’xZdMXEYFBxhRlb52.plain’, 114555, u’application/pdf’, 0, ‘2019-01-23 09:30:36.484355’, ‘1970-01-01 00:00:00.000000’, u’Email 3 - Annexure A’, 1), (u’1d635638-8bd5-4275-85ee-2f90f2346ec3’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 3 - Annexure B.pdf’, u’JL3ypF237Dnq8RUH.plain’, 143824, u’application/pdf’, 0, ‘2019-01-23 09:30:50.932228’, ‘1970-01-01 00:00:00.000000’, u’Email 3 - Annexure B’, 1), (u’af928c72-48a8-42fe-a4a9-ea1355a25c9d’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 3 - Annexure C.pdf’, u’BCrdtIl0zhaC2B0q.plain’, 1412058, u’application/pdf’, 0, ‘2019-01-23 09:31:23.355521’, ‘1970-01-01 00:00:00.000000’, u’Email 3 - Annexure C’, 1), (u’21a068ad-dc90-49e3-aa2c-e56f762cf270’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 3 - Annexure C.pdf’, u’BCrdtIl0zhaC2B0q.plain’, 1412058, u’application/pdf’, 0, ‘2019-01-23 09:31:24.410222’, ‘1970-01-01 00:00:00.000000’, u’Email 3 - Annexure C’, 1) … displaying 10 of 188 total bound parameter sets … (u’a6c2a7a3-151b-4c2b-8b4b-bedb3e3bc052’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 60 - Annexure D.doc’, u’kN34HR8leRpRSngx.plain’, 69632, u’application/msword’, 0, ‘2019-01-28 06:59:16.014034’, ‘1970-01-01 00:00:00.000000’, u’Email 60 - Annexure D’, 1), (u’27e7531f-def7-40d8-bfca-f8b94a3d4050’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 61.pdf’, u’iCyf2btMB46fpLxJ.plain’, 165873, u’application/pdf’, 0, ‘2019-01-28 08:29:56.930502’, ‘1970-01-01 00:00:00.000000’, u’Email 61’, 1))]
2019-01-29 07:03:38+0000 [-] [E] Migration failure: (sqlite3.IntegrityError) UNIQUE constraint failed: whistleblowerfile.filename [SQL: u’INSERT INTO whistleblowerfile (id, receivertip_id, name, filename, size, content_type, downloads, creation_date, last_access, description, new) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’] [parameters: ((u’8f6f980f-9589-4ddc-91da-624be0cfcea0’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 1.pdf’, u’g6CLZ3XRtaRZIY1l.plain’, 158864, u’application/pdf’, 0, ‘2019-01-23 09:27:49.867779’, ‘1970-01-01 00:00:00.000000’, u’Email 1’, 1), (u’52ffb8c6-6f07-4ef7-9467-7ce602f65da9’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 1 - Annexure A .jpg’, u’EenyAJBjQdGseRhL.plain’, 143923, u’image/jpeg’, 0, ‘2019-01-23 09:29:38.514923’, ‘1970-01-01 00:00:00.000000’, u’Email 1 - Annexure A’, 1), (u’c45c71f8-15cc-48fb-8093-d04e65886743’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 2.pdf’, u’Y4eQ6OCdkPRLkgxp.plain’, 173071, u’application/pdf’, 0, ‘2019-01-23 09:30:02.831072’, ‘1970-01-01 00:00:00.000000’, u’Email 2’, 1), (u’9dc156f5-3a18-4581-80bf-46e5ece1e218’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 3.pdf’, u’pNSyRxgTTfACQRv3.plain’, 163389, u’application/pdf’, 0, ‘2019-01-23 09:30:23.614091’, ‘1970-01-01 00:00:00.000000’, u’Email 3’, 1), (u’860f24be-4bd4-4268-8b2a-14b9ed5d8d74’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 3 - Annexure A.pdf’, u’xZdMXEYFBxhRlb52.plain’, 114555, u’application/pdf’, 0, ‘2019-01-23 09:30:36.484355’, ‘1970-01-01 00:00:00.000000’, u’Email 3 - Annexure A’, 1), (u’1d635638-8bd5-4275-85ee-2f90f2346ec3’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 3 - Annexure B.pdf’, u’JL3ypF237Dnq8RUH.plain’, 143824, u’application/pdf’, 0, ‘2019-01-23 09:30:50.932228’, ‘1970-01-01 00:00:00.000000’, u’Email 3 - Annexure B’, 1), (u’af928c72-48a8-42fe-a4a9-ea1355a25c9d’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 3 - Annexure C.pdf’, u’BCrdtIl0zhaC2B0q.plain’, 1412058, u’application/pdf’, 0, ‘2019-01-23 09:31:23.355521’, ‘1970-01-01 00:00:00.000000’, u’Email 3 - Annexure C’, 1), (u’21a068ad-dc90-49e3-aa2c-e56f762cf270’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 3 - Annexure C.pdf’, u’BCrdtIl0zhaC2B0q.plain’, 1412058, u’application/pdf’, 0, ‘2019-01-23 09:31:24.410222’, ‘1970-01-01 00:00:00.000000’, u’Email 3 - Annexure C’, 1) … displaying 10 of 188 total bound parameter sets … (u’a6c2a7a3-151b-4c2b-8b4b-bedb3e3bc052’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 60 - Annexure D.doc’, u’kN34HR8leRpRSngx.plain’, 69632, u’application/msword’, 0, ‘2019-01-28 06:59:16.014034’, ‘1970-01-01 00:00:00.000000’, u’Email 60 - Annexure D’, 1), (u’27e7531f-def7-40d8-bfca-f8b94a3d4050’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 61.pdf’, u’iCyf2btMB46fpLxJ.plain’, 165873, u’application/pdf’, 0, ‘2019-01-28 08:29:56.930502’, ‘1970-01-01 00:00:00.000000’, u’Email 61’, 1))]
2019-01-29 07:03:38+0000 [-] [E] Verbose exception traceback:
2019-01-29 07:03:38+0000 [-] [I] Traceback (most recent call last):\n\n File “/usr/lib/python2.7/dist-packages/globaleaks/db/init.py”, line 81, in update_db\n migration.perform_migration(db_version)\n\n File “/usr/lib/python2.7/dist-packages/globaleaks/db/migration.py”, line 233, in perform_migration\n raise exception\n\nIntegrityError: (sqlite3.IntegrityError) UNIQUE constraint failed: whistleblowerfile.filename [SQL: u’INSERT INTO whistleblowerfile (id, receivertip_id, name, filename, size, content_type, downloads, creation_date, last_access, description, new) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)’] [parameters: ((u’8f6f980f-9589-4ddc-91da-624be0cfcea0’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 1.pdf’, u’g6CLZ3XRtaRZIY1l.plain’, 158864, u’application/pdf’, 0, ‘2019-01-23 09:27:49.867779’, ‘1970-01-01 00:00:00.000000’, u’Email 1’, 1), (u’52ffb8c6-6f07-4ef7-9467-7ce602f65da9’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 1 - Annexure A .jpg’, u’EenyAJBjQdGseRhL.plain’, 143923, u’image/jpeg’, 0, ‘2019-01-23 09:29:38.514923’, ‘1970-01-01 00:00:00.000000’, u’Email 1 - Annexure A’, 1), (u’c45c71f8-15cc-48fb-8093-d04e65886743’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 2.pdf’, u’Y4eQ6OCdkPRLkgxp.plain’, 173071, u’application/pdf’, 0, ‘2019-01-23 09:30:02.831072’, ‘1970-01-01 00:00:00.000000’, u’Email 2’, 1), (u’9dc156f5-3a18-4581-80bf-46e5ece1e218’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 3.pdf’, u’pNSyRxgTTfACQRv3.plain’, 163389, u’application/pdf’, 0, ‘2019-01-23 09:30:23.614091’, ‘1970-01-01 00:00:00.000000’, u’Email 3’, 1), (u’860f24be-4bd4-4268-8b2a-14b9ed5d8d74’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 3 - Annexure A.pdf’, u’xZdMXEYFBxhRlb52.plain’, 114555, u’application/pdf’, 0, ‘2019-01-23 09:30:36.484355’, ‘1970-01-01 00:00:00.000000’, u’Email 3 - Annexure A’, 1), (u’1d635638-8bd5-4275-85ee-2f90f2346ec3’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 3 - Annexure B.pdf’, u’JL3ypF237Dnq8RUH.plain’, 143824, u’application/pdf’, 0, ‘2019-01-23 09:30:50.932228’, ‘1970-01-01 00:00:00.000000’, u’Email 3 - Annexure B’, 1), (u’af928c72-48a8-42fe-a4a9-ea1355a25c9d’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 3 - Annexure C.pdf’, u’BCrdtIl0zhaC2B0q.plain’, 1412058, u’application/pdf’, 0, ‘2019-01-23 09:31:23.355521’, ‘1970-01-01 00:00:00.000000’, u’Email 3 - Annexure C’, 1), (u’21a068ad-dc90-49e3-aa2c-e56f762cf270’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 3 - Annexure C.pdf’, u’BCrdtIl0zhaC2B0q.plain’, 1412058, u’application/pdf’, 0, ‘2019-01-23 09:31:24.410222’, ‘1970-01-01 00:00:00.000000’, u’Email 3 - Annexure C’, 1) … displaying 10 of 188 total bound parameter sets … (u’a6c2a7a3-151b-4c2b-8b4b-bedb3e3bc052’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 60 - Annexure D.doc’, u’kN34HR8leRpRSngx.plain’, 69632, u’application/msword’, 0, ‘2019-01-28 06:59:16.014034’, ‘1970-01-01 00:00:00.000000’, u’Email 60 - Annexure D’, 1), (u’27e7531f-def7-40d8-bfca-f8b94a3d4050’, u’31e868b0-43f9-464d-a7c0-bc521ee17939’, u’Email 61.pdf’, u’iCyf2btMB46fpLxJ.plain’, 165873, u’application/pdf’, 0, ‘2019-01-28 08:29:56.930502’, ‘1970-01-01 00:00:00.000000’, u’Email 61’, 1))]\n
2019-01-29 07:03:38+0000 [-] Main loop terminated.
2019-01-29 07:03:38+0000 [-] Server Shut Down.
2019-01-29 07:03:38+0000 [-] Exiting GlobaLeaks