Question

Hi I am facing an issue in starting the Apache DS. My environment is as follows. Windows 7 64 Bit

I have 2 JVM's running (32 and 64bit) I have given the 32 bit JVM for the Apache DS.

When I start the service it says "windows couldnt start ApacheDS - default service on Local computer Error 1067 The process Terminated Unexpectedly"

When I check the logs in the instances folder shows the following log

STATUS | wrapper  | 2013/07/15 15:27:55 | --> Wrapper Started as Service
STATUS | wrapper  | 2013/07/15 15:27:55 | Launching a JVM...
INFO   | jvm 1    | 2013/07/15 15:27:55 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO   | jvm 1    | 2013/07/15 15:27:55 |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
INFO   | jvm 1    | 2013/07/15 15:27:55 | 
STATUS | wrapper  | 2013/07/15 15:28:01 | <-- Wrapper Stopped

Can Someone please help me to start the Apache DS Service

Was it helpful?

Solution

Go to the

Program Files\ApacheDS\instances\default\conf

and modify the log4j.properties Change all FATAL log level to the DEBUG and restart the service. You can find what is the main reason of problem in new log files that are produced in the

Program Files\ApacheDS\instances\default\log

For example I have this problem after change the log level, I found the main error is

ERR_250_ENTRY_ALREADY_EXISTS ou=system already exists!

And this is an open issue in the ApacheDS https://issues.apache.org/jira/browse/DIRSERVER-1954

Hope this help you!

OTHER TIPS

  1. Open Installation path and go to below path or where ever you have installed your Apache DS,

  2. open C:\Program Files (x86)\ApacheDS\conf\wrapper.conf xml file in text mode

  3. find below path,

    Path to java executable

wrapper.java.command

  1. you need to update "wrapper.java.command=" with you the java installation path example as below,

wrapper.java.command=C:\Program Files\Java\jre1.8.0_221\bin\java.exe

follow above path or find the java directory and update,

you are fine to fire your ApacheDS service, go to services(or C:\Program Files (x86)\ApacheDS\Manage ApacheDS --> Double Click) find ApacheDS and start.

This isn't my solution - but I think this answer the temp directory problem with also explaining why it occurs - Please find the link and the answer below:

https://issues.apache.org/jira/browse/DIRSERVER-2007

I tested this change (since it made it into the lastest version of ApaceDS server) and it is still not working on Windows 2008 when running as a service, but the problem is not the length of the path but the ability to write the temp directory. On my system the TEMP & TMP environment variables are set to:

%SystemRoot%\TEMP for System and for User is it %USERPROFILE%\AppData\Local\Temp.

Since the ApacheDS service is running as "Local System account" I would assume it would be trying to write to %SystemRoot%\TEMP. For whatever reason (and I can think of a few) ApacheDS can't create a temp file in that folder.

I fixed by creating a tmp folder in the instance directory and added the following line to wrapper.conf:

wrapper.java.additional.6=-Djava.io.tmpdir="%INSTANCE_DIRECTORY%/tmp"

That fixed the problem. I think it would be better if ApacheDS explicitly set it's temp folder to someplace it controlled and knew it could write to. A sys admin that wanted the files somewhere else could make a symlink or change the wrapper.conf. Those temp files contain ldap data so it would be better from a security standpoint to keep them with the rest of the instance data. If the instance is going to have its own log folder it might as well have its own temp directory.

Might it be, that you have selected javas /bin folder during installation as Java root directory? If so, set it one level higher, as /bin is not the root directory.

If you have the below error all you gotta do is create a 'Temp' Directory in 'C:\Windows\system32\config\systemprofile\AppData\Local' and that's it.

C:\Windows\system32\config\systemprofile\AppData\Local\Temp\tempks1231340801626329934ks
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source)
at java.nio.file.Files.newByteChannel(Unknown Source)
at java.nio.file.Files.createFile(Unknown Source)
at java.nio.file.TempFileHelper.create(Unknown Source)
at java.nio.file.TempFileHelper.createTempFile(Unknown Source)
at java.nio.file.Files.createTempFile(Unknown Source)
at org.apache.directory.server.core.security.CertificateUtil.createTempKeyStore(CertificateUtil.java:318)
at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:219)
at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:152)
at org.apache.directory.server.wrapper.ApacheDsTanukiWrapper.start(ApacheDsTanukiWrapper.java:175)
at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)*

I got the same issue. I managed to solve that, and I succeeded. The solution is as follow:

  • Open Java settings in Control panel (Control Panel>Programs>Java on, my case, windows 7)
  • The setting screen shows up. Then click on Java tab. Click View... button
  • At the User tab, click on Find button
  • After that, you choose the folder that contains the x86 JRE.
  • Finally, click Finish to add that x86 Run-time Environment to be used by programs that need the x86 version to run. That's all. Try it.

delete file C:\Program Files (x86)\ApacheDS\instances\default\conf\config.ldif

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top