base table not found: 1146 Table 'atom.object'

292 views
Skip to first unread message

Matthew Bruton

unread,
Sep 25, 2020, 3:15:36 PM9/25/20
to AtoM Users
Hi there,
At my wits end with another attempted installation/upgrade of atom to 2.6.

All the latest recommended various dependencies. Upgrading from 2.5.3 to 2.6.

I'm getting the following errors in the nginx logs:
2020/09/25 20:06:00 [warn] 11711#11711: conflicting server name "_" on 0.0.0.0:80, ignored

 followed immediately by

2020/09/25 20:06:06 [error] 11712#11712: *17 FastCGI sent in stderr: "PHP message:  [wrapped: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'atom.object' doesn't exist]" while reading response header from upstream, client: _________, server: _, request: "GET / HTTP/1.1", upstream "fastcgi://unix:/run/php7.2-fpm.atom.sock:", host: "___________"

So this manifests as a 500 error on the web screen.

Restarting every thing doesn't work. Tried deleting databaseses/users and recreating them. Doesn't solve problem either.

I need help.

Karl Goetz

unread,
Sep 25, 2020, 6:36:55 PM9/25/20
to ica-ato...@googlegroups.com
Hi,
Assuming the server name "_" is exactly what the log says not you hiding hostnames, you probably have multiple nginx configuration files which capture the default hostname.

look in /etc/nginx/sites-enabled/ and check the files therein.

http://nginx.org/en/docs/http/server_names.html covers this from the nginx side, search for "In catch-all server examples the strange name" on that page to se
Server names are defined using the server_name directive and determine which server block is used for a given request. See also “How nginx processes a request”. They may be defined using exact names, wildcard names, or regular expressions: server { listen 80; server_name example.org www.example.org; ... } server { listen 80; server_name *.example.org; ... } server { listen 80; server_name ...
Once you sort out your duplicate host definition you can investigate your 500 error in more detail.

Karl.


From: ica-ato...@googlegroups.com <ica-ato...@googlegroups.com> on behalf of Matthew Bruton <matthewb...@gmail.com>
Sent: Saturday, 26 September 2020 5:15 AM
To: AtoM Users <ica-ato...@googlegroups.com>
Subject: [atom-users] base table not found: 1146 Table 'atom.object'
 
--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/b30acb6b-def7-4129-a024-30de8ee39387o%40googlegroups.com.



University of Tasmania Electronic Communications Policy (December, 2014).
This email is confidential, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone outside the intended recipient organisation is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender. The views expressed in this email are not necessarily the views of the University of Tasmania, unless clearly intended otherwise.

matthewb...@gmail.com

unread,
Sep 30, 2020, 7:13:07 AM9/30/20
to AtoM Users
Hi Karl,

I removed conflicting sites and the first error is no longer appearing. However I am still getting the second error.

Any other suggestions? Short of a complete system re-installation,(which is difficult for me), I can't think of what else to try.

Dan Gillean

unread,
Sep 30, 2020, 7:24:30 PM9/30/20
to ICA-AtoM Users
Hi Matthew, 

I'm really sorry to hear how much you've been struggling with this upgrade. 

Most often when I've seen this issue come up, it's because a step in the upgrade process has been missed, or done out of order. However, there remains the chance that something else is at play here. I'll start with some suggestions on the upgrade process: 

First, if you're installing the new 2.6 site on the same server as the old one, you may want to make sure that you don't have 2 conflicting MySQL mode configuration files - remember, in the 2.6 instructions, we create one at /etc/mysql/conf.d/mysqld.cnf during the installation. The SQL modes we recommend are different between 2.5 and 2.6, so this might be a first thing to double-check. See:
Next, make sure you have your 2.5 backup saved! I'm going to recommend that you try running the tools:purge command before dropping and recreating the database - this sometimes helps. The purge command will clear out ALL user data in the database. Once the purge is complete, the task will prompt you for a site name and description, user account, etc - don't worry too much about what you enter for this stage, since it will be overwritten once we load your 2.5 database. 

From AtoM's root installation directory, run:
Now, let's drop and recreate the database, to ensure we have the correct collation and character set:
  • mysql -u username -p -e "DROP DATABASE IF EXISTS atom;"
  • mysql -u username -p -e "CREATE DATABASE atom CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;"
One important thing to note - if you didn't call the database "atom" during installation, then remember to modify this first command!

Now you can try loading your 2.5 database, and then running the upgrade task:
  • php -d memory_limit=-1 symfony tools:upgrade-sql
Don't forget to restart services, populate the search index, etc. 

If that still doesn't work, then you may want to do a little investigation of your old database, and make sure there's not some data corruption that might be preventing the upgrade task from running as expected. Our Troubleshooting documentation includes some guidance on how you can check for and resolve the most common forms we've seen reported: 
Let us know how it goes, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


Matthew Bruton

unread,
Oct 5, 2020, 5:42:33 AM10/5/20
to AtoM Users
Dan,

Thanks for your response.
So I wasn't sure how to check out the modes for conflict. I am attaching a screenshot of what is in my etc/mysql folder.
Perhaps you can tell me if there is something I can delete.

I went ahead anyway and tried purging and recreating. When I went to upgrade, I got hilariously (if you don't laugh you'd cry) the same atom.object error.


mysql2.png

Matthew Bruton

unread,
Oct 5, 2020, 5:56:20 AM10/5/20
to AtoM Users
I am trying to look into data corruption, and when I put in the mysql query to  pull up the four column table showing information, I get
"atom.information_object does not exist"

See the following screenshot.
datbase query.png
Message has been deleted
Message has been deleted

Steve Breker

unread,
Oct 6, 2020, 1:08:48 PM10/6/20
to AtoM Users
Hi Matthew

I've seen that issue come up when the AtoM database is in place, but is missing the table schema and data. Your screenshot above showing the failed query seems to support this.

See Step 5 of the upgrade docs (Copy Your Old Data section):

Did you complete step 5 to load the data? Ensure that the database name that you load the 2.5 database into on the new server matches the name of the database supplied when the AtoM 2.6 Web Installer was run.

e.g.:
mysql -u <user> -p <AtoM-db-name-supplied-during-2.6-install> < <2.5-AtoM-sqldump-name>

where:
- <user> is your database user
- <AtoM-db-name-supplied-during-2.6-install> is the database name you supplied during the AtoM 2.6 Web install process
- <2.5-AtoM-sqldump-name> is the name of your 2.5 AtoM database export sqldump file

e.g.:
mysql -u root -p atom-26 < /path/to/atom-25.sql


Steve

Dan Gillean

unread,
Oct 6, 2020, 1:56:42 PM10/6/20
to ICA-AtoM Users
Hi Matthew, 

As you can see, I've asked one of our developers to take a look at this thread and provide some thoughts. 

Steve was able to reproduce the exact errors that you see when he tried to run the upgrade task (or the database corruption checking query) against an empty database - i.e. when the 2.5 db has not been properly loaded into the new (dropped and recreated) AtoM 2.6 database, so there is no schema in place to upgrade. 

I suggest that you start by double-checking the things that Steve has recommended. 

IF it turns out that you were actually loading your 2.5 database properly, using the expected db name provided during the AtoM 2.6 installation etc, THEN, my next suspicion would be that the data corruption exists in your sqldump - i.e. it was already present in your 2.5 instance, but wasn't yet causing noticeable problems. 

If you try everything that Steve has suggested and still can't get your upgrade to complete successfully, then runnin the  SQL query to check for data corruption should happen in your 2.5 installation - you might need to fix some things there and create a new sqldump backup to be used in the upgrade process. 

Regarding the sqlmodes and configuration files: 

I would consider this the last thing to check, if everything above hasn't resolved the issue. I can tell from your screen shot at least that there's not actually 2 configuration files in the exact same spot, so that's good. If you've tried everything above and it hasn't helped, then it could be worth opening up the /etc/mysql/conf.d/mysqld.cnf configuration file in your new 2.6 installation to make sure the modes written there conform to what AtoM expects. 

I personally find nano to be the easiest CLI text editor to work with, and I think it comes installed in Ubuntu, so try: 
  • nano /etc/mysql/conf.d/mysqld.cnf
Compare the modes listed in there with what you find in our documentation

[mysqld]
sql_mode=ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
optimizer_switch='block_nested_loop=off'


If you need to make any changes to make this file match what we recommend, then make sure you restart MySQL after: 
  • sudo systemctl restart mysql
In the meantime, please let us know what you find when following the previous steps!

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.

matthewb...@gmail.com

unread,
Oct 8, 2020, 12:58:45 PM10/8/20
to AtoM Users
Thanks Dan,
Steves advice worked.
Reply all
Reply to author
Forward
0 new messages