Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenDJ 4.5 not Starting as Windows Service on Windows 11 21H2 #259

Open
NikyMandl opened this issue Sep 28, 2022 · 2 comments
Open

OpenDJ 4.5 not Starting as Windows Service on Windows 11 21H2 #259

NikyMandl opened this issue Sep 28, 2022 · 2 comments
Labels

Comments

@NikyMandl
Copy link

NikyMandl commented Sep 28, 2022

Describe the bug
A clear and concise description of what the bug is.

Installed OpenDJ 4.5 as Windows Service on Windows 11 21H2.
Service is not able to start. Stopping a few seconds after start.
OpenDJ windows Service has got local Admin rights, to be able writing in all Directorys and Files on system.
Also given the openDJ Folder the security settings "everyone has full rights" in Folder.
Tryed on 3 different Windows Systems. Everywhere the same Issue.
I Checked the Path of server.lock file and it is on the place descripted in the Log file.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Windows Services'
  2. Click on 'OpenDJ Server'
  3. Start Service
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

native-windows.out Logfile contains messages.

2022/09/28 13:23:46: (pid=7552) --------------- FIRST LOG MESSAGE FROM 'C:\opendj\lib\opendj_service.exe' ---------------
2022/09/28 13:23:46: (pid=7552) main called.
2022/09/28 13:23:46: (pid=7552) argv[0] = 'C:\opendj\lib\opendj_service.exe'
2022/09/28 13:23:46: (pid=7552) argv[1] = 'start'
2022/09/28 13:23:46: (pid=7552) argv[2] = 'C:\opendj'
2022/09/28 13:23:46: (pid=7552) startService
2022/09/28 13:23:46: (pid=7552) When determining the service bin path, the module file name is 'C:\opendj\lib\opendj_service.exe'.
2022/09/28 13:23:46: (pid=7552) Attempting to get the service name assuming command to run is '"C:\opendj\lib\opendj_service.exe" start "C:\opendj"'.
2022/09/28 13:23:46: (pid=7552) Successfully opened the Service Control Manager.
2022/09/28 13:23:46: (pid=7552) The service name was found to be 'OpenDJ Server'.
2022/09/28 13:23:46: (pid=7552) Registering the Event Log for service 'OpenDJ Server'.
2022/09/28 13:23:46: (pid=7552) serviceMain
2022/09/28 13:23:46: (pid=7552) When determining the service bin path, the module file name is 'C:\opendj\lib\opendj_service.exe'.
2022/09/28 13:23:46: (pid=7552) Attempting to get the service name assuming command to run is '"C:\opendj\lib\opendj_service.exe" start "C:\opendj"'.
2022/09/28 13:23:46: (pid=7552) Successfully opened the Service Control Manager.
2022/09/28 13:23:46: (pid=7552) The service name was found to be 'OpenDJ Server'.
2022/09/28 13:23:46: (pid=7552) Registering the service handler for 'OpenDJ Server'
2022/09/28 13:23:46: (pid=7552) registerServiceHandler returning '0'
2022/09/28 13:23:46: (pid=7552) Updating the service status. statusToSet=2 win32ExitCode=0 serviceExitCode=0 checkPoint=1 waitHint=5000
2022/09/28 13:23:46: (pid=7552) Service start pending: no controls accepted.
2022/09/28 13:23:46: (pid=7552) Determining if the server is running.
2022/09/28 13:23:46: (pid=7552) When determining whether the server is running, the lock file name is 'C:\opendj\locks\server.lock'.
2022/09/28 13:23:46: (pid=7552) Able to open the lock file 'C:\opendj\locks\server.lock'.
2022/09/28 13:23:46: (pid=7552) Able to lock 'C:\opendj\locks\server.lock', so the server is not running.
2022/09/28 13:23:46: (pid=7552) doStartApplication
2022/09/28 13:23:46: (pid=7552) doStartApplication: Launching batch file: "C:\opendj\bat\start-ds.bat" --windowsNetStart
2022/09/28 13:23:46: (pid=7552) createBatchFileChildProcess: Attempting to create child process '/c "C:\opendj\bat\start-ds.bat" --windowsNetStart' background=0.
2022/09/28 13:23:46: (pid=7552) createBatchFileChildProcess: Successfully created child process '/c "C:\opendj\bat\start-ds.bat" --windowsNetStart'.
2022/09/28 13:23:46: (pid=7552) doStartApplication: OPENDJ_WINDOWS_SERVICE_STARTDS_WAIT is not set. Using default 300000 milliseconds.
2022/09/28 13:23:46: (pid=7552) waitForProcess: wait time is: 300000
start-ds.bat: invoked
start-ds.bat: CLASSPATH=C:\opendj\classes;C:\opendj\lib\bootstrap.jar;
start-ds.bat: PATH=C:\Windows;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Users\usb win\AppData\Local\Microsoft\WindowsApps
2022/09/28 13:23:47: (pid=908) --------------- FIRST LOG MESSAGE FROM 'C:\opendj\lib\opendj_service.exe' ---------------
2022/09/28 13:23:47: (pid=908) main called.
2022/09/28 13:23:47: (pid=908) argv[0] = 'C:\opendj\lib\opendj_service.exe'
2022/09/28 13:23:47: (pid=908) argv[1] = 'state'
2022/09/28 13:23:47: (pid=908) argv[2] = 'C:\opendj'
2022/09/28 13:23:47: (pid=908) argv[3] = '--debug'
2022/09/28 13:23:47: (pid=908) Getting service state.
2022/09/28 13:23:47: (pid=908) When determining the service bin path, the module file name is 'C:\opendj\lib\opendj_service.exe'.
2022/09/28 13:23:47: (pid=908) Created the service bin path. code=0. cmdToRun='"C:\opendj\lib\opendj_service.exe" start "C:\opendj"'.
2022/09/28 13:23:47: (pid=908) Attempting to get the service name assuming command to run is '"C:\opendj\lib\opendj_service.exe" start "C:\opendj"'.
2022/09/28 13:23:47: (pid=908) Successfully opened the Service Control Manager.
2022/09/28 13:23:47: (pid=908) The service name was found to be 'OpenDJ Server'.
2022/09/28 13:23:47: (pid=908) Service 'OpenDJ Server' is enabled.
2022/09/28 13:23:47: (pid=908) main returning 0.
start-ds.bat: Run detach called by windows service
2022/09/28 13:23:48: (pid=1612) --------------- FIRST LOG MESSAGE FROM 'C:\opendj\lib\winlauncher.exe' ---------------
2022/09/28 13:23:48: (pid=1612) main called.
2022/09/28 13:23:48: (pid=1612) argv[0] = 'C:\opendj\lib\winlauncher.exe'
2022/09/28 13:23:48: (pid=1612) argv[1] = 'start'
2022/09/28 13:23:48: (pid=1612) argv[2] = 'C:\opendj'
2022/09/28 13:23:48: (pid=1612) argv[3] = 'java.exe'
2022/09/28 13:23:48: (pid=1612) argv[4] = '-Xrs'
2022/09/28 13:23:48: (pid=1612) argv[5] = '-server'
2022/09/28 13:23:48: (pid=1612) argv[6] = '-Dorg.opends.server.scriptName=start-ds'
2022/09/28 13:23:48: (pid=1612) argv[7] = 'org.opends.server.core.DirectoryServer'
2022/09/28 13:23:48: (pid=1612) argv[8] = '--configFile'
2022/09/28 13:23:48: (pid=1612) argv[9] = 'C:\opendj\config\config.ldif'
2022/09/28 13:23:48: (pid=1612) argv[10] = '--windowsNetStart'
2022/09/28 13:23:48: (pid=1612) Constructing full command line from arguments:
2022/09/28 13:23:48: (pid=1612) argv[0]: java.exe
2022/09/28 13:23:48: (pid=1612) argv[1]: -Xrs
2022/09/28 13:23:48: (pid=1612) argv[2]: -server
2022/09/28 13:23:48: (pid=1612) argv[3]: -Dorg.opends.server.scriptName=start-ds
2022/09/28 13:23:48: (pid=1612) argv[4]: org.opends.server.core.DirectoryServer
2022/09/28 13:23:48: (pid=1612) argv[5]: --configFile
2022/09/28 13:23:48: (pid=1612) argv[6]: C:\opendj\config\config.ldif
2022/09/28 13:23:48: (pid=1612) argv[7]: --windowsNetStart
2022/09/28 13:23:48: (pid=1612) The full commandline is 'java.exe -Xrs -server -Dorg.opends.server.scriptName=start-ds org.opends.server.core.DirectoryServer --configFile C:\opendj\config\config.ldif --windowsNetStart'.
2022/09/28 13:23:48: (pid=1612) createChildProcess: Attempting to create child process 'java.exe -Xrs -server -Dorg.opends.server.scriptName=start-ds org.opends.server.core.DirectoryServer --configFile C:\opendj\config\config.ldif --windowsNetStart' background=1.
2022/09/28 13:23:48: (pid=1612) createChildProcess: Successfully created child process 'java.exe -Xrs -server -Dorg.opends.server.scriptName=start-ds org.opends.server.core.DirectoryServer --configFile C:\opendj\config\config.ldif --windowsNetStart'.
2022/09/28 13:23:48: (pid=1612) The PID of the spawned process is 2600.
2022/09/28 13:23:48: (pid=1612) createPidFile(instanceDir='C:\opendj',pid=2600)
2022/09/28 13:23:48: (pid=1612) Attempting to get the PID file for instanceDir='C:\opendj'
2022/09/28 13:23:48: (pid=1612) PID file name is 'C:\opendj\logs\server.pid'.
2022/09/28 13:23:48: (pid=1612) Successfully put pid=2600 in the pid file 'C:\opendj\logs\server.pid'.
2022/09/28 13:23:48: (pid=1612) main finished. Returning 2600
start-ds.bat: Waiting for "C:\opendj\logs\server.starting" to be deleted
start-ds.bat: check started
2022/09/28 13:23:49: (pid=4304) --------------- FIRST LOG MESSAGE FROM 'C:\opendj\lib\opendj_service.exe' ---------------
2022/09/28 13:23:49: (pid=4304) main called.
2022/09/28 13:23:49: (pid=4304) argv[0] = 'C:\opendj\lib\opendj_service.exe'
2022/09/28 13:23:49: (pid=4304) argv[1] = 'state'
2022/09/28 13:23:49: (pid=4304) argv[2] = 'C:\opendj'
2022/09/28 13:23:49: (pid=4304) argv[3] = '--debug'
2022/09/28 13:23:49: (pid=4304) Getting service state.
2022/09/28 13:23:49: (pid=4304) When determining the service bin path, the module file name is 'C:\opendj\lib\opendj_service.exe'.
2022/09/28 13:23:49: (pid=4304) Created the service bin path. code=0. cmdToRun='"C:\opendj\lib\opendj_service.exe" start "C:\opendj"'.
2022/09/28 13:23:49: (pid=4304) Attempting to get the service name assuming command to run is '"C:\opendj\lib\opendj_service.exe" start "C:\opendj"'.
2022/09/28 13:23:49: (pid=4304) Successfully opened the Service Control Manager.
2022/09/28 13:23:49: (pid=4304) The service name was found to be 'OpenDJ Server'.
2022/09/28 13:23:49: (pid=4304) Service 'OpenDJ Server' is enabled.
2022/09/28 13:23:49: (pid=4304) main returning 0.
start-ds.bat: finished
2022/09/28 13:23:49: (pid=7552) waitForProcess: was successful
2022/09/28 13:23:49: (pid=7552) waitForProcess exitCode: 0
2022/09/28 13:23:49: (pid=7552) doStartApplication: waited properly for process end.
2022/09/28 13:23:49: (pid=7552) doStartApplication: exit code of script: 0
2022/09/28 13:23:49: (pid=7552) Determining if the server is running.
2022/09/28 13:23:49: (pid=7552) When determining whether the server is running, the lock file name is 'C:\opendj\locks\server.lock'.
2022/09/28 13:23:49: (pid=7552) Able to open the lock file 'C:\opendj\locks\server.lock'.
2022/09/28 13:23:49: (pid=7552) Able to lock 'C:\opendj\locks\server.lock', so the server is not running.
2022/09/28 13:23:49: (pid=7552) doStartApplication: server not running.
2022/09/28 13:23:49: (pid=7552) ERROR: serviceMain: doStartApplication() failed
2022/09/28 13:23:49: (pid=7552) Updating the service status. statusToSet=1 win32ExitCode=1066 serviceExitCode=-1 checkPoint=0 waitHint=0
2022/09/28 13:23:49: (pid=7552) serviceMain returning.
2022/09/28 13:23:49: (pid=7552) serviceMain
2022/09/28 13:23:49: (pid=7552) When determining the service bin path, the module file name is 'C:\opendj\lib\opendj_service.exe'.
2022/09/28 13:23:49: (pid=7552) Attempting to get the service name assuming command to run is '"C:\opendj\lib\opendj_service.exe" start "C:\opendj"'.
2022/09/28 13:23:49: (pid=7552) Successfully opened the Service Control Manager.
2022/09/28 13:23:49: (pid=7552) Deregistering the Event Log.
2022/09/28 13:23:49: (pid=7552) main returning 0.

Screenshots

image

Additional context
Also tried with OpenDJ 4.5, openDJ 4.4.
Same issue

@NikyMandl NikyMandl changed the title OpenDJ 4.5.1 not Starting as Windows Service on Windows 11 21H2 OpenDJ 4.5 not Starting as Windows Service on Windows 11 21H2 Sep 28, 2022
@vharseko
Copy link
Member

please run from cmd

java.exe -Xrs -server -Dorg.opends.server.scriptName=start-ds org.opends.server.core.DirectoryServer --configFile C:\opendj\config\config.ldif --windowsNetStart'

@NikyMandl
Copy link
Author

NikyMandl commented Jul 13, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants