Results 1 to 10 of 10

Thread: Missing Cortex logs and defibrillator rebooting PC

  1. #1
    Automated Home Sr Member mcockerell's Avatar
    Join Date
    Jan 2009
    Posts
    71

    Default Missing Cortex logs and defibrillator rebooting PC

    It was suggested that I look at the Cortex logs while trying to sort out my noticeboard problem (after a PC rebuild/Cortex reinstall) - see earlier thread.

    What I found when I looked at them was a bit disconcerting:

    1) Cortex is only logging up to the first auto-log shutoff point, no subsequent log files are produced.
    Looking back at the system, this has been the case since I first installed Cortex W10 in May 2018.

    2) Defibrillator is periodically losing the connection to Cortex and rebooting the PC.
    This is transparent to us as Cortex seems to be w

    I have another application running on the same PC that is continually monitoring our solar panels.
    It logs its latest data every minute and those logs show that the PC is still working until Defibrillator reboots it.

    Without the Cortex logs it's difficult to see if Cortex is really having a problem, because it seems to be working before the reboot.

    What do I need to check/change so that Cortex starts logging continuously to help resolve this problem?

    Thanks in advance, Martin

  2. #2
    Automated Home Legend Karam's Avatar
    Join Date
    Mar 2005
    Posts
    818

    Default

    In Logging options you enable 'To File Always'. This will log continuously so I wouldn't really recommend it being kept enabled under normal circumstances - especially if detailed logging options are also set. There are obviously the other options of Logging only when an error or a warning are raised which are usually the options that are enabled (these capture data before and after the error/warning point).

    Defibrillator itself generates log files - usually these will just indicate the point at which it has lost contact with Cortex.

    Even if you don't have continuos logging enabled Cortex also logs general data from sensors and its other activities in the object textual history, so you may be able to tell from the timings on these whether Cortex was still logging during the defibrillator time out period.

    The question though is why is defibrillator losing contact with Cortex? One thing you could try is simply to shut down defibrillator and see if you get any incidences of Cortex actually stopping working. If not then it suggests the problem is with the communication path. My suspicion is that this is more likely the cause. The communication channel is via the Windows API and it's not unknown for other applications to mess with this. So the next test might be to relaunch Cortex and defibrilllator as normal but shut down the other application and see if you get the same problem

  3. #3
    Automated Home Sr Member mcockerell's Avatar
    Join Date
    Jan 2009
    Posts
    71

    Default

    I decided to reinstall Windows 10 from scratch last weekend (3rd March) to make sure that I had a 'solid' platform for reloading Cortex.
    Having done that I left Cortex running for a few days without Defibrillator (without issue) and then re-enabled it - so far it hasn't rebooted.
    Cortex is now the only application running on the box, so having the solar logger running may have been causing a problem.

    One thing that I have noticed, however, is the following error message while Cortex is starting up:
    16:28:45 Error while attempting to connect:Socket Error # 10061 Connection refused.

    Is this something that I should be concerned about? - it happens every time Cortex starts up.

  4. #4
    Automated Home Legend chris_j_hunter's Avatar
    Join Date
    Dec 2007
    Location
    North Lancashire
    Posts
    1,674

    Default

    was curious to know what the error code meant ... some Googling revealed this ...

    Socket error = #10061xx ... a Connection Refused error sent by the server ... the target machine actively refused it. The most common cause is a misconfigured server, full server, or incorrect Port specified by the client. Sometimes ... caused by either a firewall or anti-virus software on the local computer ... blocking the ports needed to make a successful FTP connection to the server ... in which case, either disable the firewall or anti-virus software or configure it to allow CuteFTP to establish an FTP session over ports 20 and 21 ...

  5. #5
    Automated Home Sr Member mcockerell's Avatar
    Join Date
    Jan 2009
    Posts
    71

    Default

    Yes, I found that on Google too, but that doesn't tell me what Cortex is trying to do when it happens. So I can't determine if this is an issue and was hoping that either Karam or Vivian could shed some light on this one. Interestingly I've looked back at some earlier logs, including for the old version of Cortex (pre-W10), and see the same error message during initialisation.

  6. #6
    Automated Home Legend Karam's Avatar
    Join Date
    Mar 2005
    Posts
    818

    Default

    Well it isn't what you should expect to see. I guess it must be one of the functions which has reason to access a server. So perhaps just try disabling one by one to determine. Could be for example getting the PC public IP address (See House object), could be getting Internet time (see clock object), could be a Web API Client connection, E-mail, and one or two others. Also you can start turning on more detailed diagnostic logging options (just relevant ones) which may show up what was being accessed before the error, but beware that this can generate a lot of information so suggest you try one option at a time.

  7. #7
    Automated Home Sr Member mcockerell's Avatar
    Join Date
    Jan 2009
    Posts
    71

    Default

    I've tried to isolate it a bit more without any success, I have checked all the obvious things and can't see what might be trying to connect to a socket.
    One more curious thing that I have found is that the following connection seems to be added automatically whenever Cortex starts:

    2019-03-14 World Connections.jpg

    I keep deleting it,but it keeps coming back.
    I'm wondering if this is the cause of the problem as I don't have a telephony interface.

  8. #8
    Automated Home Legend Karam's Avatar
    Join Date
    Mar 2005
    Posts
    818

    Default

    This is just a connection to the telephony object which Cortex puts in as a kind of default like it does for the >24hr unoccupied to the HVAC. I can't imagine it having any relationship to the socket error and indeed you'll find it on most people's systems unless they actively change the connection (you can change the trigger to the recipient of this connection but not leave it empty).

    We'd be happy to have a look at your database if you wish.

  9. #9
    Automated Home Sr Member mcockerell's Avatar
    Join Date
    Jan 2009
    Posts
    71

    Default

    Well the system seems to now be stable, it hasn't rebooted itself since I rebuilt the PC two weeks ago. Perhaps the reboot issue *is* associated with the solar logger, another USB-connected serial device - I plan to reinstate that shortly to see if the problem returns.
    In the meantime, Karam, I would like to take you up on your offer to review our Cortex database - I'm sending it you by direct email.
    Last edited by mcockerell; 2nd April 2019 at 07:56 PM.

  10. #10
    Automated Home Sr Member mcockerell's Avatar
    Join Date
    Jan 2009
    Posts
    71

    Default

    I thought that I would provide an update a few weeks on:

    The good news is that Cortex is stable and the system hasn't rebooted itself since I rebuilt it a month ago; I would prefer to be sure that it is 'fixed', but I guess that's the best I can hope for.
    Karam helped me to identify the cause of the socket error; Cortex was trying to connect to a Squeezebox that isn't normally powered on - the fix for that was to remove it from the configuration.

    And after a couple of weeks of stability I re-enabled the solar logging, and all seems to be working correctly (as it used to on the Windows XP system).

    So I guess I have to put this down to experience.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •