PTCInc / thingworx-gitbackup-extension

[Unofficial/Not supported] ThingWorx GitBackup Extension for storing your ThingWorx application code in a Git repository
MIT License
25 stars 11 forks source link

Entities going to Thing not running state #47

Closed jlagares closed 1 year ago

jlagares commented 1 year ago

Hello, I have a deployment of Saas Thingworkx and the github things go to "not running" state without any understanding of how or when this happens (we talked by email on my hp account). Thing [Here goes GIT thing] is not running This happens will all gitthings I have. This happens executing Status service on the git thing.

I'm waiting for the logs, just opened case.

vrosu commented 1 year ago

Thanks for reporting this @jlagares. We’d need to have the entries around the time when you try to enable a Git thing from ApplicationLog (accessible via composer) and ErrorLog.log (which indeed you need to retrieve via a support ticket as it’s not exposed in composer). I am quite curious to see why the Git things are not running, as I have not observed that before.

jlagares commented 1 year ago

Thanks, ticket opened. In the meantime I'm re creating all gitthings again, removed all repo content manually (as I could not via service) and checking again. One question is, can 2 Git Things have the same repo folder ? As we have several and all point to the same folder but refer to different github branches, I'm thinking that this might confuse the thingworx git extension.

vrosu commented 1 year ago

Two Git things can use the same File Repository, but mandatory they need to be placed in two different sub-folders of that File Repository. The extension does not verify if there's already an existing local Git repository in the folder you specified, and yes, that can be a source of this issue (I think).

vrosu commented 1 year ago

For transparency, in the error log we observed two interesting errors:

  1. Unable to initialize thing [redacted], Cannot lock /ThingworxStorage/repository/GitRepository/[redacted]/.git/config. Ensure that no other process has an open file handle on the lock file /ThingworxStorage/repository/GitRepository/[redacted]/.git/config.lock, then you may delete the lock file and retry. This points into a file using that lock file - potentially two Git things created in the same folder can do this.
  2. Unable to initialize thing [redacted], null. This error does not have much context and I requested an ErrorLog with stack trace activated.
vrosu commented 1 year ago

And another question: did this behavior started happening sudden, after working fine in the past? Or is this the first attempt of using the GitBackup extension ? Besides the log files, can you remember anything that changed in your system before this error started appearing?

jlagares commented 1 year ago

It happened without noticing working correctly before. This has also happened in some dockers that I have, so whenever I see it there I'll send you the error Log. The environment is shared by many people so no clue everything that happened. I'll be working with Ilaria in the following weeks so I can keep you updated.