Install failed. Executing daemon shutdown request, the reason is UNKNOWN

Revisions: <fetched=23320; last=23320>

[2022-06-20 14:16:31.307][subgit-install][1] Everything is up-to-date.

[2022-06-20 14:16:31.308][subgit-install][1] Sync complete for git location default.

[2022-06-20 14:16:31.308][subgit-install][1] Executing daemon shutdown request, the reason is UNKNOWN.

subgit-install-20220620-141637.zip (8.7 KB)

Hello Max,

judging from the log, the installation went well, SubGit managed to translate all the revisions from the repository up to the bare latest r23320:

Revisions: <fetched=23320; last=23320>

I’m not sure if that was an initial import or just another subgit install to start SubGit daemon, however: if that was the very first subgit install and initial import, then that means SubGit imported nothing and the most probable cause is incorrect mapping, the ffa/client_root/Client path probably points at nowhere in the SVN repository. If, on the other hand, that was just another subgit install invoked to start SubGit daemon, then it indicates the Git and SVN repositories are in sync.
Another issue is that the daemon didn’t start in the end of the install process due to timeout waiting for pid file error: during the installation, SubGit starts the daemon and waits until the daemon creates a pid file with the port number the daemon listens (the daemon listens random unoccupied port). Then it connects to the daemon using this port and sends a command to it.

In your case, the daemon was not able create the pid file within the given period of time. One of the possible reasons is that the daemon was too slow to start. To resolve it increase the daemon launch timeout in SubGit configuration file:

[daemon]

launchTimeout = 5

the default value is 5; try to increase it to, say, 60 seconds.

Another possible reason is that the daemon started but couldn’t write to the pid file due to a permissions issue, for example. To resolve it make sure that the user on whose behalf you start the installation is able to create the file.

Thank you for your reply.

This is not the first time to install as the logs are huge. I cleaned the logs and re-run the subgit install.

The console shows the following:

➜ code subgit install farm-ffa-tech.git
SubGit version 3.3.14 (‘Bobique’) build #4433
About to shut down background translation process.
Background translation process is not running.
Translating Subversion revisions to Git commits…
INSTALLATION FAILED
error: Failed to launch background translation process: timeout waiting for pid file ‘/Users/meijun/code/farm-ffa-tech.git/subgit/daemon.pid’.
error: Unexpected error has occurred; please report along with the logs (’/Users/meijun/code/subgit-install-20220620-141637.zip’)
error: to https://support.tmatesoft.com/, thank you!

I tried setting “launchTimeout=60” before and it still didn’t work.

About pid

[2022-06-20 15:02:37.111][subgit-install][22] ‘/Users/meijun/code/farm-ffa-tech.git/subgit/subgit.2290250134256352060.pid’ renamed to ‘/Users/meijun/code/farm-ffa-tech.git/subgit/daemon.pid’

I think it means pid created successfully. I noticed that deamon.pid briefly appeared in finder.

Hello Max,

it’s pretty strange that the pid file just briefly appears in finder, SubGit does not remove it by itself, especially during the daemon start, so if the file disappears, then it most probably is done by another process, like an anti-virus software, could it be the case?

[2022-06-20 15:02:37.428][subgit-install][1] Everything is up-to-date.
[2022-06-20 15:02:37.428][subgit-install][1] Sync complete for git location default.
[2022-06-20 15:02:37.430][subgit-install][1] Updated installation report:
ErrorReport[description=‘Operation rejected: SubGit installation is in progress.
Operations will be allowed as soon as SubGit installation is completed.’, warning=true, git enabled=false, svn enabled=false]
[2022-06-20 15:02:37.431][subgit-install][1] Additional repository sync for location ‘default’
[2022-06-20 15:02:37.431][subgit-install][1] Sync started for git location ‘default’, mirror mode: REMOTE_MIRROR, recovery mode: FAIL_HARD, fail-safe mode: AUTO
[2022-06-20 15:02:37.442][subgit-install][1] Checking remote ‘http://svn.ifunplus.cn/svn/farm-ffa-tech’.
[2022-06-20 15:02:37.458][subgit-install][1] Revisions: <fetched=23320; last=23320>
[2022-06-20 15:02:37.458][subgit-install][1] Everything is up-to-date.
[2022-06-20 15:02:37.458][subgit-install][1] Sync complete for git location default.
[2022-06-20 15:02:37.458][subgit-install][1] Executing daemon shutdown request, the reason is UNKNOWN.
[2022-06-20 15:02:37.459][subgit-install][1] Trying to obtain file lock on ‘/Users/meijun/code/farm-ffa-tech.git/subgit/daemon.lock’.
[2022-06-20 15:02:37.459][subgit-install][1] Succeeded attempt to obtain file lock on ‘/Users/meijun/code/farm-ffa-tech.git/subgit/daemon.lock’
[2022-06-20 15:02:37.459][subgit-install][1] Thread pool shutdown scheduled.
[2022-06-20 15:02:37.460][subgit-install][1] Daemon info pid=39324; port=57521; address=127:0:0:1; user=root from file ‘/Users/meijun/code/farm-ffa-tech.git/subgit/daemon.pid’
[2022-06-20 15:02:37.460][subgit-install][1] Pid file ‘/Users/meijun/code/farm-ffa-tech.git/subgit/daemon.pid’ deleted.
[2022-06-20 15:02:37.460][subgit-install][1] Pid file deleted, daemon will be shut down NOW.
[2022-06-20 15:02:37.462][subgit-install][1] Server socket closed.

Not sure why “execute daemon shutdown request”. Could it be caused by the Mac OS version? (macOS Big Sur v11.6.1)

[2022-06-20 15:02:37.458][subgit-install][1] Executing daemon shutdown request, the reason is UNKNOWN.
[2022-06-20 15:02:37.460][subgit-install][1] Pid file ‘/Users/meijun/code/farm-ffa-tech.git/subgit/daemon.pid’ deleted.
[2022-06-20 15:02:37.460][subgit-install][1] Pid file deleted, daemon will be shut down NOW.

This is normal SubGit working flow, expected in logs, not that SubGit just deletes the file and this leads to the problem, SubGit may remove and re-create the file during normal work. The issue is that it is unable to create or access it at some point.
I don’t think it could be caused by MacOS version and we haven’t seen any issues related to MacOS before. I don’t have BigSur right now to test, but just tested on Catalina and latest Monterey and everything worked fine. I would rather guessed it might be related to some software installed in the system.

Backup pid file via command line.

45256
50099
127:0:0:1
root

Is the username ‘root’ wrong?

Looks to be wrong, indeed, should be the user that starts SubGit.

sorry, my mistake. I use sudo subgit install.

Are there more debugging options to find the problem?

Hello Max,

from SubGit side, it is possible to enable debug logging setting the core.logLevel to finest in the SubGit configuration file:

[core]
    …
    logLevel = finest

with this setting SubGit will log everything it is doing.