Bot stopped launching

Failure to fill out the requested information will result in us asking for it or closing the ticket as incomplete. This includes the request for Console output and any logs.

If reporting a bug, please open a topic under Support > Bug Reports.

The Nightly Build does not include support, however, we do accept bug reports under Nightly Builds > Bug Reports.

Fill out the following so that we are able to provide support for your inquiry.

To provide the bot information below, you can simply type botinfo in your bot console and hit enter. That will print the bot’s general information. Version 2.4.0+ you may get the versions from the Information panel.

Please remove this line and the lines above to make it less confusing for other users.

PhantomBot Version: 3.0.0
OS Version: Raspbian
Java Version: 1.8.0_65
Browser and Version (for Panel Support): Chrome 76.0.3809.132
Stock PhantomBot: Yes

Let us know what help you need: I upgraded to 3.0.0 months ago to try out the beta panel. It was working great then it just stopped. I had it running for a long time, thought the Pi just needed a reboot. (RPi 3b+) After that, it just stopped responding when running launch.sh.

[email protected]:~/phantombot $ ./launch.sh
[09-10-2019 @ 03:46:22.606 GMT] The working directory is: /home/theblips/phantombot
[09-10-2019 @ 03:46:22.683 GMT] Detected Java 1.8.0_65 running on Linux 4.14.30+ (arm)
[09-10-2019 @ 03:46:23.769 GMT]
[09-10-2019 @ 03:46:23.776 GMT] PhantomBot Version: 3.0.0
[09-10-2019 @ 03:46:23.780 GMT] Build Revision: fcc08b51
[09-10-2019 @ 03:46:23.785 GMT] Creator: mast3rplan
[09-10-2019 @ 03:46:23.789 GMT] Developers: PhantomIndex, Kojitsari, ScaniaTV, Zackery (Zelakto) & IllusionaryOne
[09-10-2019 @ 03:46:23.794 GMT] https://phantombot.tv/
[09-10-2019 @ 03:46:23.797 GMT]

That’s where it just stops. I did the steps to try doing another update (to v3.0.0… probably not a wise decision…) and it still hangs in the same spot. Just short of losing my DB of almost 3 years of use, what else can I do here?

Can you upload us your latest core-error, error, and stacktraces files from the bot’s logs folder.

If you are using the Discord feature, make sure you have the updated version of Discord4J-2.10.1-shaded.jar in your PhantomBot/libraries folder

I’ll be uploading them shortly… Need to get WinSCP up and running on my laptop.

OK, I updated it and it still stalls in the same place. I’m uploading the logs next.

Core Error:

[09-11-2019 @ 01:14:44.608 GMT] java.sql.SQLException: [SQLITE_CORRUPT] The database disk image is malformed (database disk image is malformed)
at org.sqlite.core.DB.newSQLException(DB.java:893)
at org.sqlite.core.DB.newSQLException(DB.java:904)
at org.sqlite.core.DB.throwex(DB.java:871)
at org.sqlite.core.NativeDB.prepare(Native Method)
at org.sqlite.core.DB.prepare(DB.java:211)
at org.sqlite.jdbc3.JDBC3Statement.execute(JDBC3Statement.java:60)
at org.sqlite.SQLiteConfig.apply(SQLiteConfig.java:133)
at org.sqlite.core.CoreConnection.(CoreConnection.java:85)
at org.sqlite.jdbc3.JDBC3Connection.(JDBC3Connection.java:24)
at org.sqlite.jdbc4.JDBC4Connection.(JDBC4Connection.java:24)
at org.sqlite.SQLiteConnection.(SQLiteConnection.java:45)
at org.sqlite.JDBC.createConnection(JDBC.java:114)
at org.sqlite.JDBC.connect(JDBC.java:88)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at com.gmt2001.datastore.SqliteStore.CreateConnection(SqliteStore.java:171)
at com.gmt2001.datastore.SqliteStore.CheckConnection(SqliteStore.java:210)
at com.gmt2001.datastore.SqliteStore.DropIndexes(SqliteStore.java:1065)
at tv.phantombot.PhantomBot.(PhantomBot.java:564)
at tv.phantombot.PhantomBot.main(PhantomBot.java:1352)

[09-11-2019 @ 01:14:44.626 GMT] java.sql.SQLException: [SQLITE_CORRUPT] The database disk image is malformed (database disk image is malformed)
at org.sqlite.core.DB.newSQLException(DB.java:893)
at org.sqlite.core.DB.newSQLException(DB.java:904)
at org.sqlite.core.DB.throwex(DB.java:871)
at org.sqlite.core.NativeDB.prepare(Native Method)
at org.sqlite.core.DB.prepare(DB.java:211)
at org.sqlite.jdbc3.JDBC3Statement.execute(JDBC3Statement.java:60)
at org.sqlite.SQLiteConfig.apply(SQLiteConfig.java:133)
at org.sqlite.core.CoreConnection.(CoreConnection.java:85)
at org.sqlite.jdbc3.JDBC3Connection.(JDBC3Connection.java:24)
at org.sqlite.jdbc4.JDBC4Connection.(JDBC4Connection.java:24)
at org.sqlite.SQLiteConnection.(SQLiteConnection.java:45)
at org.sqlite.JDBC.createConnection(JDBC.java:114)
at org.sqlite.JDBC.connect(JDBC.java:88)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at com.gmt2001.datastore.SqliteStore.CreateConnection(SqliteStore.java:171)
at com.gmt2001.datastore.SqliteStore.CheckConnection(SqliteStore.java:210)
at com.gmt2001.datastore.SqliteStore.GetFileList(SqliteStore.java:342)
at com.gmt2001.datastore.SqliteStore.DropIndexes(SqliteStore.java:1066)
at tv.phantombot.PhantomBot.(PhantomBot.java:564)
at tv.phantombot.PhantomBot.main(PhantomBot.java:1352)

[09-11-2019 @ 01:14:44.630 GMT] java.lang.NullPointerException
at com.gmt2001.datastore.SqliteStore.GetFileList(SqliteStore.java:344)
at com.gmt2001.datastore.SqliteStore.DropIndexes(SqliteStore.java:1066)
at tv.phantombot.PhantomBot.(PhantomBot.java:564)
at tv.phantombot.PhantomBot.main(PhantomBot.java:1352)

stacktraces:

[09-11-2019 @ 01:14:44.636 GMT] java.lang.NullPointerException
at com.gmt2001.datastore.SqliteStore.GetFileList(SqliteStore.java:344)
at com.gmt2001.datastore.SqliteStore.DropIndexes(SqliteStore.java:1066)
at tv.phantombot.PhantomBot.(PhantomBot.java:564)
at tv.phantombot.PhantomBot.main(PhantomBot.java:1352)

Unfortunately, I have no regular errors log

Also, I now see that the database is corrupt :frowning:

That is probably the issue. You can try using one of your backups or attempt a recovery.

The steps to attempt a recovery are:

  1. Download DB Browser for SQLite
  2. Open the database in DB Browser for SQLite (File > Open Database…)
  • NOTE: If you are attempting the recovery on a different machine, make sure you copy over the file phantombot.db from the bot config folder. Also, if the files phantombot.db-shm and/or phantombot.db-wal exist, it is important that you also copy them into the same folder as the main file.
  1. Export the database to an SQL file (File > Export > Database to SQL file…). Make sure all tables are selected (Select all button). The drop-downs on the bottom should say Export everything and Overwrite old schema. The checkboxes can be left as is.
  2. Close the database (File > Close Database) and then delete the corrupt database file.
  3. Import the SQL file as a new database (File > Import > Database from SQL file…). When it asks if you want to create a new database, say Yes. Save it as phantombot.db.
  4. Close the database (File > Close Database).
  5. Delete the corrupt database from the bot’s config folder and then copy in the recovered database.

If you encounter an error at any time during this process, then it is impossible to recover the database and you will have to resort to either a backup or a new empty database.

1 Like

No dice. Thanks everyone for the assist! I just reinstalled and am rebuilding my commands and such.

I am not sure if you had it disabled for some reason but PhantomBot does automatically back up the database file to the dbbackup directory. You might have a copy in there is not corrupted. Also, you can set some variables in botlogin.txt to backup more often and keep around more files:

backupsqlitehourfrequency=hours
backupsqlitekeepdays=days

By default the bot will backup the database at start and every 24 hours and keep 5 days of backups.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.