ApacheDS WINDOWS上安装后服务启动失败

INFO   | jvm 1    | 2022/11/21 20:47:46 | java.nio.file.NoSuchFileException: C:\Windows\system32\config\systemprofile\AppData\Local\Temp\tempks2198018802773906173ks
INFO   | jvm 1    | 2022/11/21 20:47:46 |     at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79)
INFO   | jvm 1    | 2022/11/21 20:47:46 |     at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
INFO   | jvm 1    | 2022/11/21 20:47:46 |     at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
INFO   | jvm 1    | 2022/11/21 20:47:46 |     at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:230)
INFO   | jvm 1    | 2022/11/21 20:47:46 |     at java.nio.file.Files.newByteChannel(Files.java:361)
INFO   | jvm 1    | 2022/11/21 20:47:46 |     at java.nio.file.Files.createFile(Files.java:632)
INFO   | jvm 1    | 2022/11/21 20:47:46 |     at java.nio.file.TempFileHelper.create(TempFileHelper.java:138)
INFO   | jvm 1    | 2022/11/21 20:47:46 |     at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:161)
INFO   | jvm 1    | 2022/11/21 20:47:46 |     at java.nio.file.Files.createTempFile(Files.java:897)
INFO   | jvm 1    | 2022/11/21 20:47:46 |     at org.apache.directory.server.core.security.CertificateUtil.createTempKeyStore(CertificateUtil.java:318)
INFO   | jvm 1    | 2022/11/21 20:47:46 |     at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:219)
INFO   | jvm 1    | 2022/11/21 20:47:46 |     at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:152)
INFO   | jvm 1    | 2022/11/21 20:47:46 |     at org.apache.directory.server.wrapper.ApacheDsTanukiWrapper.start(ApacheDsTanukiWrapper.java:175)
INFO   | jvm 1    | 2022/11/21 20:47:46 |     at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
STATUS | wrapper  | 2022/11/21 20:47:48 | <-- Wrapper Stopped

解决方案:

在apacheds安装的目录下ApacheDS\instances\default新建一个tmp文件夹,然后在

ApacheDS\conf下wrapper.conf文件最下面一行新增一行:

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

其中tmp可以修改成别的

参考:

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.

链接:

windows-7-x64 - 启动Apache DS时出现问题 - Thinbug

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值