question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Older dameon (0.18) fails to migrate properly - migrate4to5

See original GitHub issue

The Issue

coming from

({'timestamp': '2018-03-11T12:47:09.501852Z', 'userId': 'lbry', 'event': 'Blob Bytes Available', 'context': {'app': {'build': 'release', 'version': '0.18.2', 'name': 'lbrynet', 'wallet': {'version': '3.2.0rc10', 'name': 'lbryum'}, 'python_version': '2.7.12'}, 'os': {'version': '4.14.0-0.bpo.3-amd64', 'name': 'Linux'}, 'library': {'version': '1.0.0', 'name': 'lbrynet-analytics'}}, 'properties': {'lbry_id': '***', 'value': 6995819419, 'session_id': '***'}})

the upgrade fails

lbrynet.extras.daemon.migrator.migrate4to5:9: Doing the migration
2018-12-06 09:08:15,724 ERROR    lbrynet.extras.daemon.Component:61: Error setting up database
Traceback (most recent call last):
  File "lbrynet/extras/daemon/Component.py", line 55, in _setup
  File "site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
  File "site-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
  File "lbrynet/extras/daemon/Components.py", line 177, in start
  File "site-packages/twisted/python/threadpool.py", line 250, in inContext
  File "site-packages/twisted/python/threadpool.py", line 266, in <lambda>
  File "site-packages/twisted/python/context.py", line 122, in callWithContext
  File "site-packages/twisted/python/context.py", line 85, in callWithContext
  File "lbrynet/extras/daemon/migrator/dbmigrator.py", line 28, in migrate_db
  File "lbrynet/extras/daemon/migrator/migrate4to5.py", line 10, in do_migration
  File "lbrynet/extras/daemon/migrator/migrate4to5.py", line 56, in add_lbry_file_metadata
sqlite3.IntegrityError: UNIQUE constraint failed: lbry_file_metadata.lbry_file

and further down: https://privatebin.net/?5f423d4902bbe134#jtWIEJed4n07CorjKm+jiOefAkQ6NqqKk+h2ab7lE2w=

Steps to reproduce

  1. be on an old version (0.18.2), publish stuff (possibly?)
  2. upgrade to latest RC9
  3. launch

Expected behaviour

everything works

Actual behaviour

the daemon starts but with problems

System Configuration

{“processor”: “x86_64”, “python_version”: “3.7.1”, “platform”: “Linux-4.15.0-20-generic-x86_64-with-debian-buster-sid”, “os_release”: “4.15.0-20-generic”, “os_system”: “Linux”, “lbrynet_version”: “0.30.1rc9”, “lbryschema_version”: “0.0.16”, “build”: “rc”, “distro”: {“id”: “ubuntu”, “version”: “18.04”, “version_parts”: {“major”: “18”, “minor”: “04”, “build_number”: “”}, “like”: “debian”, “codename”: “Bionic Beaver”}, “desktop”: “KDE”}

Internal Use

Acceptance Criteria

Definition of Done

  • Tested against acceptance criteria
  • Tested against the assumptions of user story
  • The project builds without errors
  • Unit tests are written and passing
  • Tests on devices/browsers listed in the issue have passed
  • QA performed & issues resolved
  • Refactoring completed
  • Any configuration or build changes documented
  • Documentation updated
  • Peer Code Review performed

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tzarebczancommented, Dec 8, 2018

@nikooo777 , Jack thinks this is related to some old back and forth we did on previous daemon builds. Try changing the db_revision file to one higher or one lower and see if that fixes it.

0reactions
tzarebczancommented, Feb 13, 2019

This is an issue when upgrading from 18.2 (about 1 year old). Ultimately, we want these old users to come back and be able to startup LBRY, so we should handle failed migrations better. I’ll create a separate issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to find container images · Issue #822 · bitnami-labs ...
I am not able to install sealed-secrets anymore. Using helm chart (v2.1.5), my k8s cluster is not able to find the container image:...
Read more >
Ansible Automation Platform 1.2 to 2 Migration Guide
Deploy automation mesh execution and hop nodes in Environment B. Once the infrastructure is successfully migrated, the focus shifts to migrating ...
Read more >
Migrating a Database fails due to Storage Issues
Restart the Database and Daemon via the WebNative Admin Portal. Navigate to Database > Admin > Settings; Select Start Database and Start Daemon....
Read more >
VMs go to 100% CPU after live migration from Trusty to Bionic
We are seeing issues after live migrating a KVM VMs from a Trusty to Bionic where about 1 in 10 VMs go to...
Read more >
Readme and Release notes for release 3.4.0.18 General Parallel ...
Follow the installation and migration instructions in your GPFS Concepts, ... by mmlsfs (V2.3 and older) can now be mounted on a GPFS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found