sqLite Client Disconnected Error

Posted on
Mon Jan 12, 2009 6:19 pm
matt (support) offline
Site Admin
User avatar
Posts: 21429
Joined: Jan 27, 2003
Location: Texas

(No subject)

Based on that, it sounds like it has become corrupt again. Although that is strange that you can see the data in the Terminal. I wonder if you can execute the SQL to append data to a table from the Terminal? That may be when the failure is occurring.

Image

Posted on
Fri Jun 21, 2013 4:59 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: sqLite Client Disconnected Error

I think I have a similar problem with the current SQL Logger plugin:

Code: Select all
Jun 21, 2013 6:55:16 PM
  Reloading plugin "SQL Logger 1.1.6"
  Stopping plugin "SQL Logger 1.1.6" (pid 64659)
  SQL Logger                      closing SQL connection
  Stopped plugin "SQL Logger 1.1.6"
  Starting plugin "SQL Logger 1.1.6" (pid 64676)
  Started plugin "SQL Logger 1.1.6"
  SQL Logger                      connected to /Library/Application Support/Perceptive Automation/Indigo 6/Logs/indigo_history.sqlite
  SQL Logger                      searching for unused device and variable tables
  SQL Logger Error                Error in plugin execution startup:

Traceback (most recent call last):
  File "plugin.py", line 553, in startup
  File "plugin.py", line 486, in _connectToSqlDb
  File "plugin.py", line 763, in removeUnusedTablesAction
  File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/SQL Logger.indigoPlugin/Contents/Server Plugin/indigologger/indigosql.py", line 110, in GetAllTableNames
<class 'sqlite3.DatabaseError'>: database disk image is malformed



I tried stopping the server and moving the DB the trash and restarting; no effect on the error and a new DB was not created in the SQL Client folder. Any thoughts?

Posted on
Fri Jun 21, 2013 7:47 pm
jay (support) offline
Site Admin
User avatar
Posts: 18260
Joined: Mar 19, 2008
Location: Austin, Texas

Re: sqLite Client Disconnected Error

Are you sure you deleted the file listed in the event log above (/Library/Application Support/Perceptive Automation/Indigo 6/Logs/indigo_history.sqlite)? According to that, it found a file there when it started up.

I'd shut the server down again - make sure it really is shut down as well as all the plugins. Look at the Activity Monitor application and make sure there isn't an IndigoServer or IndigoPluginHost process running. Delete that file (and empty the trash), then start the server back up.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Jun 22, 2013 2:22 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: sqLite Client Disconnected Error

That got it, thanks!

Posted on
Sat Jul 27, 2013 4:14 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: sqLite Client Disconnected Error

Did it again. Is this a bug or have I set it up wrong?

Posted on
Sat Jul 27, 2013 5:42 pm
jay (support) offline
Site Admin
User avatar
Posts: 18260
Joined: Mar 19, 2008
Location: Austin, Texas

Re: sqLite Client Disconnected Error

Is this the same Mac that's been exhibiting other odd behaviors? I suspect that Mac has got some serious issues...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Jul 27, 2013 6:25 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: sqLite Client Disconnected Error

No; bought a 2010 mini a year ago. Works fine. I retired the other and have had no hiccoughs. It did have a power outage in a recent storm but all else seems normal. I just wouldn't think a power failure would mess up the DB. When the DB is reset is all data lost?

Posted on
Sat Jul 27, 2013 6:32 pm
matt (support) offline
Site Admin
User avatar
Posts: 21429
Joined: Jan 27, 2003
Location: Texas

Re: sqLite Client Disconnected Error

I think an abrupt power failure can corrupt the sqLite file (and other files the OS is actively writing to). I'd recommend using an uninterruptible power supply (UPS) so the Mac doesn't have unclean reboots like that.

Image

Posted on
Sat Jul 27, 2013 8:38 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: sqLite Client Disconnected Error

I do have a UPS. Unfortunately here in Atlanta the power outages last longer than a few hours, so I suppose I should just shut down the computer manually in the case of a power outage. If I don't get there in time, is it reasonable to replace the file with one from the backup drive?

Posted on
Sun Jul 28, 2013 10:24 am
matt (support) offline
Site Admin
User avatar
Posts: 21429
Joined: Jan 27, 2003
Location: Texas

Re: sqLite Client Disconnected Error

hamw wrote:
I do have a UPS. Unfortunately here in Atlanta the power outages last longer than a few hours, so I suppose I should just shut down the computer manually in the case of a power outage. If I don't get there in time, is it reasonable to replace the file with one from the backup drive?

That should be fine. You'll lose the SQLite changes that occurred since then, but I imagine that isn't critical. Note the SQLite plugin is optional and only needed if you need a historical database of device state changes, or if you are using the Event Log error trigger it defines (which we really should move into a different plugin).

Image

Posted on
Sun Jul 28, 2013 9:01 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: sqLite Client Disconnected Error

Honestly, I'd just want to get some data such as temp, humidity and runtime for my AC units and crawl space dehumidifiers, and temp and humidity for the outside for comparison purposes. Would be great if that data were easily exported for graphing.

Posted on
Sun Jul 28, 2013 9:57 pm
matt (support) offline
Site Admin
User avatar
Posts: 21429
Joined: Jan 27, 2003
Location: Texas

Re: sqLite Client Disconnected Error

hamw wrote:
Would be great if that data were easily exported for graphing.


Agreed. I hope to look into that after v6 ships during some spare time.

Image

Who is online

Users browsing this forum: No registered users and 2 guests