Why does leapp preupgrade fail with `sqlite3.OperationalError: unable to open database file` traceback error ?

Solution Verified - Updated -

Issue

  • leapp preupgrade command fails with below traceback error when upgrading from RHEL 7 to RHEL 8 :

    # leapp preupgrade
    Traceback (most recent call last):
     File "/usr/bin/leapp", line 9, in <module>
       load_entry_point('leapp==0.12.1', 'console_scripts', 'leapp')()
     File "/usr/lib/python2.7/site-packages/leapp/cli/__init__.py", line 18, in main
       cli.command.execute('leapp version {}'.format(VERSION))
     File "/usr/lib/python2.7/site-packages/leapp/utils/clicmd.py", line 105, in execute
       args.func(args)
     File "/usr/lib/python2.7/site-packages/leapp/utils/clicmd.py", line 127, in called
       self.target(args)
     File "/usr/lib/python2.7/site-packages/leapp/cli/upgrade/__init__.py", line 352, in preupgrade
       e.store()
     File "/usr/lib/python2.7/site-packages/leapp/utils/audit/__init__.py", line 79, in store
       self.do_store(connection)
     File "/usr/lib/python2.7/site-packages/leapp/utils/audit/__init__.py", line 126, in do_store
       (self.context, self.configuration, self.stamp, self.kind))
    sqlite3.OperationalError: unable to open database file
    
  • leapp preupgrade command fails with below traceback error when upgrading from RHEL 8 to RHEL 9 :

    Traceback (most recent call last):
    File "/usr/lib/python3.6/site-packages/leapp/repository/actor_definition.py", line 74, in _do_run
    File "/usr/lib/python3.6/site-packages/leapp/actors/__init__.py", line 289, in run
    File "/etc/leapp/repos.d/system_upgrade/common/actors/targetuserspacecreator/actor.py", line 58, in process
    File "/usr/lib/python3.6/site-packages/leapp/utils/deprecation.py", line 42, in process_wrapper
    File "/etc/leapp/repos.d/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py", line 256, in perform
    File "/usr/lib64/python3.6/contextlib.py", line 99, in __exit__
    File "/etc/leapp/repos.d/system_upgrade/common/libraries/overlaygen.py", line 593, in create_source_overlay
    File "/etc/leapp/repos.d/system_upgrade/common/libraries/overlaygen.py", line 326, in cleanup_scratch
    File "/usr/lib64/python3.6/logging/__init__.py", line 1296, in debug
    File "/usr/lib64/python3.6/logging/__init__.py", line 1444, in _log
    File "/usr/lib64/python3.6/logging/__init__.py", line 1454, in handle
    File "/usr/lib64/python3.6/logging/__init__.py", line 1516, in callHandlers
    File "/usr/lib64/python3.6/logging/__init__.py", line 865, in handle
    File "/usr/lib/python3.6/site-packages/leapp/logger/__init__.py", line 40, in emit
    File "/usr/lib/python3.6/site-packages/leapp/logger/__init__.py", line 45, in _do_emit
    File "/usr/lib/python3.6/site-packages/leapp/utils/audit/__init__.py", line 87, in store
    File "/usr/lib/python3.6/site-packages/leapp/utils/audit/__init__.py", line 73, in get_connection
    File "/usr/lib/python3.6/site-packages/leapp/cli/commands/upgrade/util.py", line 26, in wrapper
    File "/usr/lib/python3.6/site-packages/leapp/utils/audit/__init__.py", line 60, in create_connection
    sqlite3.OperationalError: unable to open database file
    

Environment

  • Red Hat Enterprise Linux Server 8
  • Red Hat Enterprise Linux Server 7
    • Leapp

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content