Database disappeared..

Posted on
Sun Mar 10, 2019 2:13 pm
joshh385 offline
Posts: 24
Joined: Jan 04, 2019

Database disappeared..

I have a scheduled action that turns off some outside lights around sunrise in the morning. When I went outside today I noticed they were still on - this has happened occasionally before if the Mac running Indigo has restarted from an update and didn't come back up clean, etc. I went to take a look, and the Mac was running but the Indigo server was stopped. I tried to start it and it said it couldn't find the database or the permissions were not correct, so I downloaded the permission tool and ran it. No changes, and it couldn't find the database.

Poking around in the Perceptive Automation directory I see a copy of the DB in the Databases (Old) directory, which is from October 2018. Lots of work and changes since then. I see a similar old file in the 7.1 directory, but there isn't a current DB in the 7.2 directory. I opened up some log files and found an entry from early this morning (prior to when the task to shut off those lights would have run)

2019-03-10 07:15:01.241 Error DeleteOrigAndSwapInTemp() caught exception: FileIOError -- failed to swap original and temp files
2019-03-10 07:15:01.679 Error DeleteOrigAndSwapInTemp() caught exception: FileIOError -- failed to swap original and temp files
2019-03-10 07:30:01.496 Error DeleteOrigAndSwapInTemp() caught exception: FileIOError -- failed to swap original and temp files
2019-03-10 07:30:02.113 Error DeleteOrigAndSwapInTemp() caught exception: FileIOError -- failed to swap original and temp files
2019-03-10 11:52:48.654 Application Starting Indigo Server version 7.2.0 (Mac OS X 10.14)

The entry at 11:52 was me trying to start the server back up. From what I understand of the DeleteOrigAndSwapInTemp() function from an older forum post Indigo is writing to temp files and those get committed every 15 minutes or so. Sounds like something blew up in there, but now I have no original file left. My hope is the temp files it was trying to swap in still exist somewhere and I can do something with them... is that possible? Anyone know where those temp files might be? I've tried a variety of searches, find in the terminal window, etc and nothing, but I'm guessing they have some temp/random names so maybe my search isn't hitting them (optimistic...)

Posted on
Sun Mar 10, 2019 3:19 pm
jay (support) offline
Site Admin
User avatar
Posts: 18221
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Database disappeared..

We ask the OS for a temp directory and it returns one in the /tmp/ directory. Unfortunately, it could be anywhere inside that hierarchy and I'm not sure the name would be useful.

An error like that usually means that something stomped on the perms of the install directory or wherever the DB file is located. I'm not sure the perm fixer script will work, but rerunning the Indigo 7.2 installer would also fix perms (but leave everything else).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun Mar 10, 2019 3:57 pm
joshh385 offline
Posts: 24
Joined: Jan 04, 2019

Re: Database disappeared..

Thanks for the quick reply Jay. I’ll look through the temp directory to see if I can find anything useful.

I’ll do a reinstall of 7.2 as well. What’s strange- and what I’m still hoping I can resolve- is where did the current db go?

Posted on
Sun Mar 10, 2019 6:14 pm
jay (support) offline
Site Admin
User avatar
Posts: 18221
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Database disappeared..

I'd be a bit concerned that you've got some kind of system corruption given the error. Maybe attempt a disk repair or something?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests