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

Start-DS and Stop-DS have unpredictable behaviours #72

Open
Marsonge opened this issue Jun 25, 2019 · 8 comments
Open

Start-DS and Stop-DS have unpredictable behaviours #72

Marsonge opened this issue Jun 25, 2019 · 8 comments
Assignees

Comments

@Marsonge
Copy link
Member

Describe the bug
When trying to start the domain server using start-ds.bat, or to stop the server either as a Windows service or with stop-ds.bat, the behaviour is unpredictable.
Stopping the Windows service or using stop-ds.bat will not kill the server, despite stop-ds.bat exiting with 0.

To Reproduce
Steps to reproduce the behavior:

  1. Install OpenDJ as a Windows service.
    1a. During installation, the starting of the server works unpredictably. It often fails to start, despite start-ds.bat exiting with 0.
  2. Start the Windows service using net start.
  3. Stop the Windows service.
  4. Check using Task Manager: OpenDJ is still running, despite the Windows service being at Stopped.
  5. Run stop-ds.bat.
  6. Check using Task Manager: OpenDJ is still running, despite stop-ds.bat exiting with 0.

Environment:

  • OS: Windows
  • Version 4.4.2
  • AdoptOpenJDK 8_212
@maximthomas
Copy link
Contributor

@Marsonge Hi, I've just reproduced this problem. Trying to find the cause...

@maximthomas
Copy link
Contributor

@Marsonge I think there are couple of reasons, causing this OpenDJ as Windows service issues:

  1. If your OpenDJ instance location configured in separate folder than OpenDJ via instance.loc, service wrapper can't find servier.lock file
  2. Service account don't have access to OpenDJ instance folder

Source file for service wrapper is here:
https://github.com/OpenIdentityPlatform/OpenDJ/blob/master/opendj-server-legacy/src/build-tools/windows/service.c

I'll try to fix it, as soon as I can, but still have no time yet.

@anilj
Copy link

anilj commented Aug 13, 2019

I see something related on Solaris also. I have to ^C and then it prompts for certificate trust. In the end it throws an access error.


$ bin/stop-ds
Stopping Server...

^CThe server is using the following certificate:
    Subject DN:  CN=hostname1, O=Administration Connector RSA Self-Signed Certificate
    Issuer DN:  CN=hostname1, O=Administration Connector RSA Self-Signed Certificate
    Validity:  Sat Aug 10 00:45:39 UTC 2019 through Fri Aug 05 00:45:39 UTC 2039
Do you wish to trust this certificate and continue connecting to the server?
Please enter "yes" or "no":yes
The entry ds-task-id=cd161aa4-4aee-4af5-9204-dd1e1d88fb97,cn=Scheduled Tasks,cn=Tasks cannot be added due to insufficient access rights

@maximthomas
Copy link
Contributor

@anilj I don't think there's an issue with certificate, the problem is with interaction OpenDJ service wrapper and OpenDJ itself. Because OpenDJ starts successfully, if you start and stop manually

@vharseko
Copy link
Member

vharseko commented Sep 17, 2019

@maximthomas try add in all (Unix/windows) stop scripts

-X | —trustAll Trust all server SSL certificates.

https://cdn.rawgit.com/wiki/OpenIdentityPlatform/OpenDJ/docbkx/webhelp/man-pages/stop-ds-1.html

@maximthomas
Copy link
Contributor

Done, but there's no effect

@maximthomas
Copy link
Contributor

@Marsonge Hello may be it's too late, but are you still facing the issue?

@Marsonge
Copy link
Member Author

@maximthomas Hey! Haven't been working with OpenDJ for about 7 months now. I was still facing the issue back then. I ended up working around them using Powershell and find-ldif to check whether the server was running or not programatically.

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

No branches or pull requests

4 participants