Centos

TOLVEN 安裝:在 ConfigPhase1 之後測試數據庫和 LDAP 連接

  • August 28, 2013

我正在嘗試安裝 tolven,並按照手冊http://wiki.tolven.org/index.php/Installation_Guide

我的linux系統資訊如下:

root@localhost:/> cat /etc/issue
**CentOS release 6.4 (Final)**
root@localhost:/> arch
**x86_64**

一切都按照手冊進行,直到步驟 7.7“在 ConfigPhase1 之後測試數據庫和 LDAP 連接”

root@localhost:/> service postgresql status
postmaster (pid  26942) is running...
root@localhost:/> 
root@localhost:/> ps aux|grep slapd
root     21160  0.0  0.2 231572 14652 ?        Ssl  21:47   0:00 slapd -f slapd.conf -h ldaps://
root     21496  0.0  0.0 103236   840 pts/1    S+   23:23   0:00 grep --color=yes slapd
root@localhost:/> 
root@localhost:/> cd /usr/local/tolven-RC1/bin
root@localhost:/> ./tpf.sh -plugin org.tolven.postgresqlmgr -testAdminDB
Please enter config directory: /usr/local/tolven-config
0 [main] INFO root  - Start log4j - Configuration: file:/usr/local/tolven-RC1/bin/tolven-log4j.xml, logFileName: /usr/local/tolven-RC1/log/tolven.log
23:21:26,024 INFO  [TPFBoot] TPF Version: 0.0.10
23:21:26,024 INFO  [TPFBoot] Loaded configDir /usr/local/tolven-config
23:21:26,034 INFO  [TPFBoot] Generated boot.properties: /tmp/tpf_4158526156312314572_boot.properties
23:21:26,044 INFO  [TolvenApplicationInitializer] logging system initialized
23:21:26,044 INFO  [TolvenApplicationInitializer] application root is /usr/local/tolven-RC1/bin
23:21:26,090 INFO  [PluginRegistryImpl] configured, stopOnError=true, isValidating=false
23:21:26,391 INFO  [PluginRegistryImpl] plug-in and fragment descriptors registered - 89
23:21:26,533 INFO  [TolvenApplicationInitializer] integrity check done: errors - 0, warnings - 0
23:21:26,533 INFO  [TolvenApplicationInitializer] application plug-in is org.tolven.command
23:21:26,564 WARN  [TolvenApplication] Remote library unavailable: tolvenRemoteClient.jar because Could not retrieve library: tolvenRemoteClient.jar
23:21:26,566 WARN  [TolvenApplication] Remote library unavailable: tolvenRemoteClient.jar because Could not retrieve library: tolvenRemoteClient.jar
23:21:26,660 INFO  [AdminAssembler] Prompt via System.in with: Enter your password: 
Enter your password: 
java.lang.RuntimeException: Could not load secret key from /usr/local/tolven-config/credentials/admin/admin-encryptedSecretKey
       at org.tolven.security.password.PasswordHolder.loadSecretKey(PasswordHolder.java:411)
       at org.tolven.security.password.PasswordHolder.loadPasswordStore(PasswordHolder.java:302)
       at org.tolven.assembler.admin.AdminAssembler.setupAdminPasswordStoreCredentials(AdminAssembler.java:425)
       at org.tolven.assembler.admin.AdminAssembler.execute(AdminAssembler.java:153)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:616)
       at org.tolven.command.TolvenApplication.execute(TolvenApplication.java:163)
       at org.tolven.command.TolvenApplication.execute(TolvenApplication.java:153)
       at org.tolven.command.TolvenApplication.startApplication(TolvenApplication.java:91)
       at org.java.plugin.boot.Boot.boot(Boot.java:346)
       at org.java.plugin.boot.Boot.main(Boot.java:243)
       at org.tolven.plugin.boot.TPFBoot.main(TPFBoot.java:112)
Caused by: java.lang.RuntimeException: Could not load keystore from /usr/local/tolven-config/credentials/admin/tolvendev-admin.jks
       at org.tolven.security.password.PasswordHolder.getKeyStore(PasswordHolder.java:124)
       at org.tolven.security.password.PasswordHolder.loadSecretKey(PasswordHolder.java:405)
       ... 13 more
Application start failed.
java.lang.RuntimeException: Could not execute: org.tolven.assembler.admin
       at org.tolven.command.TolvenApplication.execute(TolvenApplication.java:168)
       at org.tolven.command.TolvenApplication.execute(TolvenApplication.java:153)
       at org.tolven.command.TolvenApplication.startApplication(TolvenApplication.java:91)
       at org.java.plugin.boot.Boot.boot(Boot.java:346)
       at org.java.plugin.boot.Boot.main(Boot.java:243)
       at org.tolven.plugin.boot.TPFBoot.main(TPFBoot.java:112)
Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:616)
       at org.tolven.command.TolvenApplication.execute(TolvenApplication.java:163)
       ... 5 more
Caused by: java.lang.RuntimeException: Could not load encrypted SecretKey /usr/local/tolven-config/credentials/admin/admin-encryptedSecretKey
Could not load secret key from /usr/local/tolven-config/credentials/admin/admin-encryptedSecretKey
       at org.tolven.security.password.PasswordHolder.loadPasswordStore(PasswordHolder.java:305)
       at org.tolven.assembler.admin.AdminAssembler.setupAdminPasswordStoreCredentials(AdminAssembler.java:425)
       at org.tolven.assembler.admin.AdminAssembler.execute(AdminAssembler.java:153)
       ... 10 more


root@localhost:/> cat /usr/local/tolven-RC1/log/tolven.log
2013-08-25 23:21:26,024 INFO  [org.tolven.plugin.boot.TPFBoot] TPF Version: 0.0.10
2013-08-25 23:21:26,024 INFO  [org.tolven.plugin.boot.TPFBoot] Loaded configDir /usr/local/tolven-config
2013-08-25 23:21:26,034 INFO  [org.tolven.plugin.boot.TPFBoot] Generated boot.properties: /tmp/tpf_4158526156312314572_boot.properties
2013-08-25 23:21:26,044 INFO  [org.tolven.plugin.boot.TolvenApplicationInitializer] logging system initialized
2013-08-25 23:21:26,044 INFO  [org.tolven.plugin.boot.TolvenApplicationInitializer] application root is /usr/local/tolven-RC1/bin
2013-08-25 23:21:26,090 INFO  [org.tolven.plugin.registry.xml.PluginRegistryImpl] configured, stopOnError=true, isValidating=false
2013-08-25 23:21:26,391 INFO  [org.tolven.plugin.registry.xml.PluginRegistryImpl] plug-in and fragment descriptors registered - 89
2013-08-25 23:21:26,533 INFO  [org.tolven.plugin.boot.TolvenApplicationInitializer] integrity check done: errors - 0, warnings - 0
2013-08-25 23:21:26,533 INFO  [org.tolven.plugin.boot.TolvenApplicationInitializer] application plug-in is org.tolven.command
2013-08-25 23:21:26,564 WARN  [org.tolven.command.TolvenApplication] Remote library unavailable: tolvenRemoteClient.jar because Could not retrieve library: tolvenRemoteClient.jar
2013-08-25 23:21:26,566 WARN  [org.tolven.command.TolvenApplication] Remote library unavailable: tolvenRemoteClient.jar because Could not retrieve library: tolvenRemoteClient.jar
2013-08-25 23:21:26,660 INFO  [org.tolven.assembler.admin.AdminAssembler] Prompt via System.in with: Enter your password: (I tried 'tolven' here)

我無法找到錯誤的任何原因以及解決此問題的解決方案。提前感謝您的友好建議。

我想請版主為這個問題添加一個標籤**“tolven”**。

密碼應該是**“sysadmin”而不是“tolven”**

’tolven’是生成的ssl-private-key的****密碼密碼片語。 我在步驟 7.2 ‘設置環境變數’ 中犯了一個錯誤

$ cd <install-dir>/bin  
$ . ./tpfenv.sh  

我使用了 ‘./tpfenv.sh’ 而不是 ‘. ./tpfenv.sh’ 和 3 個環境變數

TOLVEN_USER、TOLVEN_PASSWORD 和 TOLVEN_CONFIG_DIR 不可用。

$ echo $TOLVEN_USER $TOLVEN_PASSWORD $TOLVEN_CONFIG_DIR  

上面的命令沒有顯示輸出

但是,如果我使用**“. ./tpfenv.sh”**,它會顯示以下輸出

admin sysadmin /usr/local/tolven-config

引用自:https://serverfault.com/questions/533712