Upgraded to v7; running as daemon, server won't load DB

Posted on
Sun Jan 01, 2017 10:06 pm
gregss offline
Posts: 88
Joined: Sep 21, 2006
Location: Atlanta, GA

Upgraded to v7; running as daemon, server won't load DB

I just upgraded in the past few days to version 7 on macOS Sierra. I've been running version 6 and prior versions in daemon mode for quite some time without problems. With version 7, I can't get the server to properly load my database.

The Indigo Server is running under a separate user account (indigo), and the permissions have been set accordingly.

When I start the server, this is what I get in the log:
Code: Select all
2017-01-01 22:58:40.702   Application   Starting Indigo Server version 7.0.2 (Mac OS X 10.12)
2017-01-01 22:58:40.702   Application   Loading attachments
2017-01-01 22:58:40.703   Application   "device target attachment.scpt" script loaded
2017-01-01 22:58:40.704   Application   "group target attachment.scpt" script loaded
2017-01-01 22:58:40.706   Application   "growl attachment.scpt" script loaded
2017-01-01 22:58:40.710   Application   "iTunes attachment.scpt" script loaded
2017-01-01 22:58:40.712   Application   "scenes attachment.scpt" script loaded
2017-01-01 22:58:40.714   Application   "time stamp attachment.scpt" script loaded


...but when I switch permissions to my user account and run a local server using Indigo on my user account, or run as a single application, I see this:
Code: Select all
2017-01-01 23:03:10.578   Application   Starting Indigo Server version 7.0.2 (Mac OS X 10.12)
2017-01-01 23:03:10.579   Application   Loading attachments
2017-01-01 23:03:10.580   Application   "device target attachment.scpt" script loaded
2017-01-01 23:03:10.581   Application   "group target attachment.scpt" script loaded
2017-01-01 23:03:10.583   Application   "growl attachment.scpt" script loaded
2017-01-01 23:03:10.587   Application   "iTunes attachment.scpt" script loaded
2017-01-01 23:03:10.589   Application   "scenes attachment.scpt" script loaded
2017-01-01 23:03:10.590   Application   "time stamp attachment.scpt" script loaded
[b]2017-01-01 23:03:10.649   Application   Loading database "/Library/Application Support/Perceptive Automation/Indigo 7/Databases/Our House.indiDb"[/b]
2017-01-01 23:03:11.031   Application   Loading plugin "Action Collection 2.0.4"
2017-01-01 23:03:11.032   Application   Starting plugin "Action Collection 2.0.4" (pid 5861)
2017-01-01 23:03:11.033   Application   Loading interface "INSTEON Commands 2.0.10"
2017-01-01 23:03:11.034   Application   Starting interface "INSTEON Commands 2.0.10" (pid 5862)


The difference is that Indigo Server loads the database just fine when running under my account via Indigo, but I have issues running under a separate account. The database is in the same install directory as Indigo, and the permissions correspond to the rest of the Indigo installation — i.e., when I try to run as a daemon, the DB is "owned" by indigo and has r/w permissions by that user/group.

Is there something obvious that I'm doing wrong? Is there an easy way to force Indigo to link to the proper database, if it's not behind the scenes in the server?

Thanks,
-Greg
Last edited by gregss on Tue Jan 03, 2017 8:00 am, edited 1 time in total.

Posted on
Mon Jan 02, 2017 1:35 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Upgraded to v7; running as daemon, server won't load DB

Despite the database not loading, is the Indigo Server actually responsive? Can you connect to it from the Indigo Client?

Try moving all the AppleScripts attachments:

/Library/Application Support/Perceptive Automation/Indigo 7/Scripts/Attachements/

out to the "(disabled)" version of the folder. There is also a "-daemon" flag you can pass the IndigoServer when it is launched that will force Indigo to disable functionality that may not work well when run in daemon mode (like AppleScripts).

Image

Posted on
Mon Jan 02, 2017 3:09 pm
gregss offline
Posts: 88
Joined: Sep 21, 2006
Location: Atlanta, GA

Re: Upgraded to v7; running as daemon, server won't load DB

Matt,

Thanks for the reply.

No, the server does not respond. When I attempt to connect to it, I get:
Failed to connect to Indigo Server. The Indigo Server is either unreachable over the network or is not running.


I tried moving the AppleScript attachments to the (disabled) folder. I also added the -daemon flag to my ProgramArguments in the Launchd file. Now, I get just the following in the log:
Code: Select all
2017-01-02 16:03:58.289   Application   Starting Indigo Server version 7.0.2 (Mac OS X 10.12.2)
2017-01-02 16:03:58.290   Application   Running in daemon mode -- AppleScript support disabled


Indigo Client can tell there's an instance of Server running — when I click Start Local Server, the "Stop Server" button is active, and start is grayed out. But, there's no functionality and it's unresponsive.

It really is like it's getting hung up on the step of loading the database. Normally in this situation, I would just start the server in the single application mode so that any prefs about the DB, etc., get updated. But it seems like the server is hanging on to an old preference or something.

Is there a way I can enable any additional debugging output to find out where it's getting hung up?

-Greg

Posted on
Mon Jan 02, 2017 5:17 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Upgraded to v7; running as daemon, server won't load DB

Stop the Indigo Server (it overwrites the file when it shuts down) and edit the file:

/Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Indigo Server Prefs.indiPref

And change the following node value to true:

<EnableDebuggingUI type="bool">true</EnableDebuggingUI>

Image

Posted on
Mon Jan 02, 2017 8:23 pm
gregss offline
Posts: 88
Joined: Sep 21, 2006
Location: Atlanta, GA

Re: Upgraded to v7; running as daemon, server won't load DB

Thanks. I tried enabling the debugging detail, and I don't see any significant changes. Can you think of anything else I can try?
-Greg

Posted on
Mon Jan 02, 2017 10:16 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Upgraded to v7; running as daemon, server won't load DB

Can you post the Event Log results with the debug logging enabled (and attachment scripts moved to the disabled folder)? Maybe it will give me a clue.

Image

Posted on
Tue Jan 03, 2017 8:00 am
gregss offline
Posts: 88
Joined: Sep 21, 2006
Location: Atlanta, GA

Re: Upgraded to v7; running as daemon, server won't load DB

There wasn't much change. Here is is with debugging output on, starting as a daemon under dedicated user account:
Code: Select all
2017-01-03 08:55:13.796   Application   Starting Indigo Server version 7.0.2 (Mac OS X 10.12.2)
2017-01-03 08:55:13.801   Application   Running in daemon mode -- AppleScript support disabled


And for comparison, here's the full start-up sequence when the server is launched under my account from the Indigo client. (To confirm, I changed the permissions of the Indigo folder in between generating these logs.)
Code: Select all
2017-01-03 08:55:57.855   Application   Starting Indigo Server version 7.0.2 (Mac OS X 10.12.2)
2017-01-03 08:55:57.856   Application   Loading attachments
2017-01-03 08:55:57.936   Application   Loading database "/Library/Application Support/Perceptive Automation/Indigo 7/Databases/Our House.indiDb"
2017-01-03 08:55:58.232   Application   Loading plugin "Action Collection 2.0.4"
2017-01-03 08:55:58.235   Application   Starting plugin "Action Collection 2.0.4" (pid 52057)
2017-01-03 08:55:58.235   Application   Loading interface "INSTEON Commands 2.0.10"
2017-01-03 08:55:58.236   Application   Starting interface "INSTEON Commands 2.0.10" (pid 52058)
2017-01-03 08:55:58.237   Application   Loading plugin "DSC Alarm 1.5.5"
2017-01-03 08:55:58.237   Application   Starting plugin "DSC Alarm 1.5.5" (pid 52059)
2017-01-03 08:55:58.239   Application   Loading plugin "Growl 2.0.1"
2017-01-03 08:55:58.239   Application   Starting plugin "Growl 2.0.1" (pid 52060)
2017-01-03 08:55:58.241   Application   Loading plugin "Timers and Pesters 2.0.1"
2017-01-03 08:55:58.242   Application   Starting plugin "Timers and Pesters 2.0.1" (pid 52061)
2017-01-03 08:55:58.243   Application   Loading interface "Virtual Devices 2.0.2"
2017-01-03 08:55:58.244   Application   Starting interface "Virtual Devices 2.0.2" (pid 52062)
2017-01-03 08:55:58.246   Application   Found disabled interface "Z-Wave 2.0.34"
2017-01-03 08:55:58.246   Application   Found disabled plugin "Airfoil Pro 1.0.6"
2017-01-03 08:55:58.247   Application   Found disabled plugin "Airfoil 1.1.9"
2017-01-03 08:55:58.247   Application   Found disabled plugin "DIRECTV DVR Control 1.1.0"
2017-01-03 08:55:58.248   Application   Found disabled plugin "EasyDAQ Relay Card 2.0.2"
2017-01-03 08:55:58.249   Application   Found disabled plugin "Global Property Manager 2.0"
2017-01-03 08:55:58.249   Application   Found disabled plugin "iCal Alarm Processor 2.0"
2017-01-03 08:55:58.250   Application   Found disabled plugin "iTunes 2.0.3"
2017-01-03 08:55:58.250   Application   Found disabled plugin "NOAA Weather 2.0.0"
2017-01-03 08:55:58.251   Application   Found disabled plugin "SQL Logger 2.0.4"
2017-01-03 08:55:58.251   Application   Found disabled plugin "Vera Bridge 1.0.7"
2017-01-03 08:55:58.252   Application   Found disabled plugin "WeatherSnoop 2.1.1"
2017-01-03 08:55:58.260   Application   Bonjour registered "Indigo - Our House"
2017-01-03 08:55:58.942   Application   Indigo Cocoa client connected
2017-01-03 08:55:58.944   Application   WebServer client connected
2017-01-03 08:55:58.950   WebServer   started on port 8000 -- digest authentication enabled
2017-01-03 08:55:59.149   Application   Started interface "INSTEON Commands 2.0.10"
2017-01-03 08:55:59.155   Application   Started plugin "Growl 2.0.1"
2017-01-03 08:55:59.162   Application   Started interface "Virtual Devices 2.0.2"
2017-01-03 08:55:59.162   DSC Alarm   Log level preferences are set to "Normal".
2017-01-03 08:55:59.169   Application   Started plugin "Action Collection 2.0.4"
2017-01-03 08:55:59.182   Application   Started plugin "Timers and Pesters 2.0.1"
2017-01-03 08:55:59.220   Application   Started plugin "DSC Alarm 1.5.5"
2017-01-03 08:56:00.339   DSC Alarm   Initializing communication at address: (IP redacted):(port redacted)
2017-01-03 08:56:01.319   Trigger   Re-Start Exception E-mail
2017-01-03 08:56:01.319   Action Group   Other Action: Re-Start Initialization
2017-01-03 08:56:01.320   Trigger   Re-Start Restore At Home
2017-01-03 08:56:01.320   Action Group   Status Update: Continue At Home
2017-01-03 08:56:01.359   Trigger   Re-Start (All Server Starts)
2017-01-03 08:56:01.359   Action Group   Status Update: Request Status (All)
2017-01-03 08:56:01.363   DSC Alarm   Connected to Envisalink.
2017-01-03 08:56:01.561   Application   Embedded script executor host started
2017-01-03 08:56:01.592   Virtual Devices   sent "1st Floor - Hallway - Lights" status request
2017-01-03 08:56:01.598   Virtual Devices   sent "1st Floor - Mud Room - Light" status request
2017-01-03 08:56:01.605   Virtual Devices   sent "2nd Floor - Dining Room - Lights" status request
2017-01-03 08:56:01.618   Virtual Devices   sent "3rd Floor - Cora's Room - Light" status request
2017-01-03 08:56:01.621   Virtual Devices   sent "3rd Floor - Hallway - Light" status request
2017-01-03 08:56:01.845   Application   Connected to PowerLinc 2413U interface on port usbserial-A700ahKW
2017-01-03 08:56:01.846   Application   PowerLinc address 13.26.FF, firmware version 9.2
2017-01-03 08:56:01.880   Trigger   Re-Start (Main Interface)
2017-01-03 08:56:07.495   Email Sent   to "(email redacted)"; subject "[INDIGO] Re-Start Detected"

Posted on
Tue Jan 03, 2017 8:56 am
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Upgraded to v7; running as daemon, server won't load DB

Debug logging wasn't enabled for some reason (you'll see a lot more in the log when it is). Try adding (and search to see if there are more than 1 copy of that node) it again to the XML file. Make sure the Indigo Server is fully shutdown before changing the file.

Image

Posted on
Tue Jan 03, 2017 9:29 am
gregss offline
Posts: 88
Joined: Sep 21, 2006
Location: Atlanta, GA

Re: Upgraded to v7; running as daemon, server won't load DB

Matt,

Very strange. The debug entry is definitely set in my prefs file, and there is only one such node:
Code: Select all
   <EnableDebuggingUI type="bool">true</EnableDebuggingUI>


Between the database not being picked up, and the debug entry not triggering, it's almost like it's not seeing the right prefs file.

I did a search and confirmed that I only have two copies of this file in my /Library directory — the v6 folder and v7:
Code: Select all
macmini:MacOS greg$ sudo find /Library -name "Indigo Server Prefs.indiPref"
/Library/Application Support/Perceptive Automation/Indigo 6 (old)/Preferences/Indigo Server Prefs.indiPref
/Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Indigo Server Prefs.indiPref


Just to be safe, I renamed the v6 indiPref file — no changes. Should I do something to rebuild that file?

Posted on
Tue Jan 03, 2017 8:32 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Upgraded to v7; running as daemon, server won't load DB

Sorry, I told you the wrong XML node. Change this:

<ShowLLIO type="string">false</ShowLLIO>

to this:

<ShowLLIO type="string">__InternalVal6694__</ShowLLIO>

Image

Posted on
Tue Jan 03, 2017 9:12 pm
gregss offline
Posts: 88
Joined: Sep 21, 2006
Location: Atlanta, GA

Re: Upgraded to v7; running as daemon, server won't load DB

It's not much different. Here's the log with the new logging option:
Code: Select all
2017-01-03 22:10:19.061   Debug   openning file: /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Indigo Server Settings.indiPref
2017-01-03 22:10:19.063   Debug    closing file: /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Indigo Server Settings.indiPref
2017-01-03 22:10:19.064   Debug   openning file: /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Indigo Registration.indiPref
2017-01-03 22:10:19.064   Debug    closing file: /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Indigo Registration.indiPref
2017-01-03 22:10:19.064   Application   Starting Indigo Server version 7.0.2 (Mac OS X 10.12.2)
2017-01-03 22:10:19.065   Application   Running in daemon mode -- AppleScript support disabled


That is the correct Indigo Server Settings file.

-Greg

Posted on
Wed Jan 04, 2017 10:03 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Upgraded to v7; running as daemon, server won't load DB

The only thing that Indigo really does between reading those 2 settings files (which based on the log works) and loading the database (which it never gets to) is initialize the speech manager. My best guess is that under Sierra that hangs if there isn't yet a window server. It'll be some time before I can investigate this further, but I have added it to the request list.

Question for other Indigo users: has anyone successfully started the Indigo Server in daemon mode (before any users are logged in) under Sierra?

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests