Debian5-lenny 配置Hudson时遇到的问题

来源:互联网 发布:linux系统移植 刘刚 编辑:程序博客网 时间:2024/05/21 12:44

在Hudson上配置Email时,总是提示“Must issue a STARTTLS command first”,Google了一下,需要在启动时加上参数‘-Dmail.smtp.starttls.enable="true"’,由于我的Hudson是通过apt-get install hudson下载下来的,所以在/etc/default/hudson下配置,输入命令:#vim /etc/default/hudson,然后加上JAVA_ARGS='-Dmail.smtp.starttls.enable="true"',保存,重启Hudson,命令:#/etc/init.d/hudson restart,试着发一下邮件,结果还是不行,不过这次是提示“Can't send command to SMTP host ....... Case By : trustAnchors parameter must be non-empty ......”,无奈,再次Google,最后终于看到某篇文章,在此贴出原文:


How to fix Java on Debian Lenny

This post was previously about getting Amazon ec2 API tools working on Debian Lenny when seeing something like this:

user@computer:$ ec2-describe-instances
Unexpected error:
javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1611)

After number of comments it looked as a generic solution to java related problems so I’ve change the title.

Here is how to fix it Java on Lenny:

user@computer:$ apt-get install openjdk-6-jre
mkdir /tmp/java 
cd /tmp/java
wget http://ftp.de.debian.org/debian/pool/main/c/ca-certificates-java/ca-certificates-java_20100412_all.deb
ar xf ca-certificates-java_20100412_all.deb
tar -zxvf data.tar.gz 
cd /usr/lib/jvm/java-6-openjdk/jre/lib/security/ 
mv cacerts cacerts.PREVIOUS 
cp /tmp/java/usr/share/ca-certificates-java/cacerts /usr/lib/jvm/java-6-openjdk/jre/lib/security/cacerts

If you get 404 when running wget go here and download latest package.

该文章出处:

http://www.krzywanski.net/archives/546


按照上面的做法,终于解决了问题!

原创粉丝点击