Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error-Handling on Bootstrap Download #2536

Closed
adamkrellenstein opened this issue Oct 21, 2024 · 1 comment
Closed

Error-Handling on Bootstrap Download #2536

adamkrellenstein opened this issue Oct 21, 2024 · 1 comment

Comments

@adamkrellenstein
Copy link
Member


WARNING: `counterparty-server bootstrap` downloads a recent snapshot of a Counterparty database
from a centralized server maintained by the Counterparty Core development team.
Because this method does not involve verifying the history of Counterparty transactions yourself,
the `bootstrap` command should not be used for mission-critical, commercial or public-facing nodes.
        
2024-10-21T17:49:58.112-04:00 - [    INFO] - Downloading database from https://bootstrap.counterparty.io/counterparty.latest.tar.gz...
2024-10-21T17:54:41.961-04:00 - [   ERROR] - Exception caught!
Traceback (most recent call last):
  File "/Users/adam/Documents/work/Counterparty/CounterpartyXCP/counterparty-core/counterparty-core/counterpartycore/server.py", line 745, in start_all
    bootstrap(no_confirm=True)
  File "/Users/adam/Documents/work/Counterparty/CounterpartyXCP/counterparty-core/counterparty-core/counterpartycore/server.py", line 969, in bootstrap
    urllib.request.urlretrieve(bootstrap_url, tarball_path, bootstrap_progress)  # nosec B310  # noqa: S310
  File "/opt/homebrew/Cellar/python@3.10/3.10.14_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 280, in urlretrieve
    raise ContentTooShortError(
urllib.error.ContentTooShortError: <urlopen error retrieval incomplete: got only 6998912880 out of 12733558462 bytes>
ERROR:root:SQLITE_LOG: cannot open file at line 44373 of [e876e51a0e] (14) SQLITE_CANTOPEN
ERROR:root:SQLITE_LOG: os_unix.c:44373: (0) open(/Users/adam/Library/Application Support/counterparty/counterparty.db) - Undefined error: 0 (14) SQLITE_CANTOPEN
2024-10-21T17:54:41.971-04:00 - [   ERROR] - Unhandled Exception
Traceback (most recent call last):
  File "/opt/homebrew/bin/counterparty-server", line 8, in <module>
    sys.exit(cli.main())
  File "/Users/adam/Documents/work/Counterparty/CounterpartyXCP/counterparty-core/counterparty-core/counterpartycore/cli.py", line 497, in main
    server.start_all(args)
  File "/Users/adam/Documents/work/Counterparty/CounterpartyXCP/counterparty-core/counterparty-core/counterpartycore/server.py", line 805, in start_all
    TelemetryOneShot().close()
  File "/Users/adam/Documents/work/Counterparty/CounterpartyXCP/counterparty-core/counterparty-core/counterpartycore/lib/util.py", line 632, in __call__
    instance = super().__call__(*args, **kwargs)
  File "/Users/adam/Documents/work/Counterparty/CounterpartyXCP/counterparty-core/counterparty-core/counterpartycore/lib/telemetry/oneshot.py", line 16, in __init__
    self.db = database.get_connection(read_only=True)
  File "/Users/adam/Documents/work/Counterparty/CounterpartyXCP/counterparty-core/counterparty-core/counterpartycore/lib/database.py", line 85, in get_connection
    return get_db_connection(config.DATABASE, read_only=read_only, check_wal=check_wal)
  File "/Users/adam/Documents/work/Counterparty/CounterpartyXCP/counterparty-core/counterparty-core/counterpartycore/lib/database.py", line 64, in get_db_connection
    db = apsw.Connection(db_file, flags=apsw.SQLITE_OPEN_READONLY)
apsw.CantOpenError: CantOpenError: unable to open database file
Unhandled Exception
Traceback (most recent call last):
  File "/opt/homebrew/bin/counterparty-server", line 8, in <module>
    sys.exit(cli.main())
  File "/Users/adam/Documents/work/Counterparty/CounterpartyXCP/counterparty-core/counterparty-core/counterpartycore/cli.py", line 497, in main
    server.start_all(args)
  File "/Users/adam/Documents/work/Counterparty/CounterpartyXCP/counterparty-core/counterparty-core/counterpartycore/server.py", line 805, in start_all
    TelemetryOneShot().close()
  File "/Users/adam/Documents/work/Counterparty/CounterpartyXCP/counterparty-core/counterparty-core/counterpartycore/lib/util.py", line 632, in __call__
    instance = super().__call__(*args, **kwargs)
  File "/Users/adam/Documents/work/Counterparty/CounterpartyXCP/counterparty-core/counterparty-core/counterpartycore/lib/telemetry/oneshot.py", line 16, in __init__
    self.db = database.get_connection(read_only=True)
  File "/Users/adam/Documents/work/Counterparty/CounterpartyXCP/counterparty-core/counterparty-core/counterpartycore/lib/database.py", line 85, in get_connection
    return get_db_connection(config.DATABASE, read_only=read_only, check_wal=check_wal)
  File "/Users/adam/Documents/work/Counterparty/CounterpartyXCP/counterparty-core/counterparty-core/counterpartycore/lib/database.py", line 64, in get_db_connection
    db = apsw.Connection(db_file, flags=apsw.SQLITE_OPEN_READONLY)
apsw.CantOpenError: CantOpenError: unable to open database file
@adamkrellenstein adamkrellenstein changed the title Retry on Bootstrap Download Error-Handling on Bootstrap Download Oct 21, 2024
@ouziel-slama
Copy link
Contributor

fixed here #3023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants