I did a fairly deep dive into some new cool things in EC2 this weekend and ran into something that caught me off guard. The default Amazon AMIs come with the EC2 tools pre-loaded and ready to go. Or so I read. But, when trying to run, I was greeted with a nice stack trace:
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:1665) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1628) at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1611) at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1537) at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:83) (snipped)
Turns out it doesn't quite have everything it needs. Even though it's complaining about trustAnchors and such, all it really needs is a Java Runtime Environment..
yum install java-1.6.0-openjdk