I’m using the JetS3t toolkit to connect to S3 from my Java app. This has worked fine in the past, and works fine with my current code on my Linux server, where the code runs.
But lately when I try to run the same code on my Mac I get this exception:Caused by:
org.jets3t.service.S3ServiceException: Request Error: java.net.SocketException: Invalid
argument GET '/' on Host 's3.amazonaws.com'
at org.jets3t.service.S3Service.getBucket(S3Service.java:1911)
...
Caused by: java.net.SocketException: Invalid argument
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:150)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:312)
...
Does anyone have any idea what might be causing this?
Check if you can get a newer version of Java installed on your Mac. There are lots of issues if you search the net about Java, sockets and OSX including the problem you listed.
What version of Java is currently installed (
java -version) and what version of OSX are you running?