Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run with ssl configuration #845

Closed
sff2578 opened this issue Sep 23, 2016 · 4 comments
Closed

Unable to run with ssl configuration #845

sff2578 opened this issue Sep 23, 2016 · 4 comments
Labels

Comments

@sff2578
Copy link

sff2578 commented Sep 23, 2016

My mongodb is set up to sslRequired, but i couldn't make it work
the command is
./bin/ycsb load mongodb -s -P workloads/workloada -p recordcount=10000 -threads 16 -p mongodb.url="mongodb://user:pass@localhost:27017/database?ssl=true" -p mongodb.auth="true"
and the output is like

com.mongodb.MongoSocketWriteException: Exception sending message
at com.mongodb.connection.InternalStreamConnection.translateWriteException(InternalStreamConnection.java:462) ~[mongo-java-driver-3.0.3.jar:na]
at com.mongodb.connection.InternalStreamConnection.sendMessage(InternalStreamConnection.java:205) ~[mongo-java-driver-3.0.3.jar:na]
at com.mongodb.connection.CommandHelper.sendMessage(CommandHelper.java:89) ~[mongo-java-driver-3.0.3.jar:na]
at com.mongodb.connection.CommandHelper.executeCommand(CommandHelper.java:32) ~[mongo-java-driver-3.0.3.jar:na]
at com.mongodb.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:83) ~[mongo-java-driver-3.0.3.jar:na]
at com.mongodb.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:43) ~[mongo-java-driver-3.0.3.jar:na]
at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:115) ~[mongo-java-driver-3.0.3.jar:na]
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:127) ~[mongo-java-driver-3.0.3.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_111]
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:963) ~[na:1.7.0_111]
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1342) ~[na:1.7.0_111]
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:719) ~[na:1.7.0_111]
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122) ~[na:1.7.0_111]
at com.mongodb.connection.SocketStream.write(SocketStream.java:75) ~[mongo-java-driver-3.0.3.jar:na]
at com.mongodb.connection.InternalStreamConnection.sendMessage(InternalStreamConnection.java:201) ~[mongo-java-driver-3.0.3.jar:na]
... 7 common frames omitted
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:482) ~[na:1.7.0_111]
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:944) ~[na:1.7.0_111]
... 12 common frames omitted
01:22:19.658 [cluster-ClusterId{value='57e4e63bf7492366ba513b75', description='null'}-localhost:27017] DEBUG org.mongodb.driver.cluster - Updating cluster description to {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketWriteException: Exception sending message}, caused by {javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake}, caused by {java.io.EOFException: SSL peer shut down incorrectly}}]
01:22:20.174 [cluster-ClusterId{value='57e4e63bf7492366ba513b75', description='null'}-localhost:27017] DEBUG org.mongodb.driver.connection - Closing connection connectionId{localValue:2}

thanks

@allanbank
Copy link
Collaborator

SSL peer shut down incorrectly

That error usually means that the server is not expecting SSL or did not like something in the initial handshake message. Was there an error in the servers log?

@sff2578
Copy link
Author

sff2578 commented Sep 26, 2016

@allanbank i'll check when i'm able to, but now i remember, when logging to the database, i need to ass --ssl --sslAllowInvalidCertificates options, does this have anything to do with the error? Thanks

@rainmanwy
Copy link

How about your JDK version.
https://github.com/escline/InstallCert

You may have a try this. I have met same problem before. And fix with this way

@risdenk
Copy link
Collaborator

risdenk commented Jan 19, 2017

Closing due to no update.

@risdenk risdenk closed this as completed Jan 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants