SCM-Manager service doesn't start anymore on Windows strating from 3.0.1 version

  • bug description (occurred issue):

I could successfully start the service on Windows 2016 Server up to the version 3.0.0. From 3.0.1 version the service doesn’t start anymore.

Looking at scm-server.wrapper.log I can see the following error:

2024-02-12 10:33:13,286 DEBUG - Starting WinSW in console mode
2024-02-12 10:33:16,266 DEBUG - Starting WinSW in console mode
2024-02-12 10:33:16,651 INFO - Installing the service with id ‘scm-server’
2024-02-12 10:33:16,744 DEBUG - Completed. Exit code is 0
2024-02-12 10:33:22,276 DEBUG - Starting WinSW in console mode
2024-02-12 10:33:24,761 DEBUG - Starting WinSW in console mode
2024-02-12 10:33:25,101 INFO - Starting the service with id ‘scm-server’
2024-02-12 10:33:25,374 DEBUG - Starting WinSW in service mode
2024-02-12 10:33:25,393 DEBUG - Completed. Exit code is 0
2024-02-12 10:33:25,482 INFO - Starting %JAVA_HOME%\bin\java -cp “C:\scm-server_3.0.3\conf”;“C:\scm-server_3.0.3\lib*” -DBASE_DIR=“C:\scm-server_3.0.3” -Djava.awt.headless=true sonia.scm.server.ScmServerDaemon
2024-02-12 10:33:25,773 FATAL - Unhandled exception
System.ComponentModel.Win32Exception (2): The system cannot find the file specified.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at WinSW.Util.ProcessHelper.StartProcessAndCallbackForExit(Process processToStart, String executable, String arguments, Dictionary2 envVars, String workingDirectory, Nullable1 priority, ProcessCompletionCallback callback, Boolean redirectStdin, LogHandler logHandler, Boolean hideWindow)
at WinSW.WrapperService.StartProcess(Process processToStart, String arguments, String executable, LogHandler logHandler, Boolean redirectStdin)
at WinSW.WrapperService.OnStart(String args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
— End of stack trace from previous location where exception was thrown —
at System.ServiceProcess.ServiceBase.Run(ServiceBase services)
at System.ServiceProcess.ServiceBase.Run(ServiceBase service)
at WinSW.Program.Run(String argsArray, IWinSWConfiguration descriptor)
at WinSW.Program.Main(String args)

java version:
openjdk version “21.0.2” 2024-01-16 LTS
OpenJDK Runtime Environment Microsoft-8905927 (build 21.0.2+13-LTS)
OpenJDK 64-Bit Server VM Microsoft-8905927 (build 21.0.2+13-LTS, mixed mode, sharing)

  • SCM-Manager version and installed package: SCM-Manager 3.0.1, 3.0.2, 3.0.3

Hey @paolongit

thank you for your report. We are looking at it and will keep you updated.

Hi there, I just took a look at the differences between 3.0.0 and 3.0.1: There is just one single line changed (apart from those for the version number). We only fixed the evaluation of environment variables for “forward headers” and “log appenders”. If you don’t set explicit environment variables to enable those, I don’t see why this should impact your server.

Can you please ensure, that all directories configured in the config.yml file (and there sub directories) have write permissions for the user running SCM-Manager?

Thanks,
René

Hi! First of all, thank you very much for your answer.

I checked the config.yml file for the 3.0.3 version and it’s almost identical to the one I use for the 3.0.0 version (the one that works). The only difference are the following lines:
## set http idle timeout (set to 0 for default)
idleTimeout: 0
I also tried to comment the idleTimeout, but it doesn’t work anyway.

If it can be helpful for you as additional information, I did the same following steps for both 3.0.0 and 3.0.3 version:

  • download the windows-x.y.z.zip version
  • extract it to a scm-server_x.y.z folder
  • install the service with the “scm-manager.exe install” command
  • start the service with the “scm-manager.exe start” command (without changing any configuration)

The 3.0.0 version works, the 3.0.3 version doesn’t work (see log error in my first post)

Note 1: Of course I uninstalled the previous version usting the command “scm-manager.exe uninstall” command before installing the new one
Note 2: Also 3.0.1 and 3.0.2 versions have the same problem as 3.0.3 version

if you have any idea about some further check or test I can do, I’ll be glad to do it in order to resolve the problem.

Thank you,
Paolo

Hey @paolongit ,

just checked this in a VM once more. Out of the box I got the same error. Can you please check, that your JAVA_HOME environment variable is set globally as a system variable? At first, I only got it set for the current user, what was not sufficient.

Regards
René

2 Likes

Thank you!!!
I didn’t have JAVA_HOME set as system variable. I don’t know why this setting wasn’t necessary before 3.0.1 release and I don’t know if you know it. Anyway it works now and I hope this post can be useful also for other Windows users.

Bye,
Paolo

2 Likes