Skip to content
New issue

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

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

Already on GitHub? # to your account

Failed to create SSL #3

Open
KnowledgeGarden opened this issue Jun 6, 2018 · 22 comments
Open

Failed to create SSL #3

KnowledgeGarden opened this issue Jun 6, 2018 · 22 comments
Assignees

Comments

@KnowledgeGarden
Copy link

Here is the indication:
Jun 06, 2018 9:20:51 AM com.gentics.mesh.example.Server
INFO: Server running on port 3000
io.reactivex.exceptions.OnErrorNotImplementedException: Failed to create SSL connection
at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
...
Caused by: javax.net.ssl.SSLHandshakeException: Failed to create SSL connection
at io.vertx.core.http.impl.HttpChannelConnector.handshakeFailure(HttpChannelConnector.java:249)

From here I see this:

Most probably because the server you are talking to is not talking SSL. If you haven't specified 443 as the port then your client will be using port 80, so this would make sense.

I can say that I am running mesh localhost:8080 and it is not running on https.

@Jotschi
Copy link
Contributor

Jotschi commented Jun 6, 2018

I just tested it via:

mvn clean package
/opt/jvm/java8/bin/java -jar target/mesh-vertx-example-0.0.1-SNAPSHOT.jar 

I don't get the error. Thats really strange. Are you sure you use the latest java 8 version to run the example? If you use eclipse you may still use the old run configuration using the old java version?

@Jotschi
Copy link
Contributor

Jotschi commented Jun 6, 2018

Maybe you missed to toggle the ssl flag to false?

client = MeshRestClient.create("localhost", 8080, false, vertx);

@KnowledgeGarden
Copy link
Author

It is true that I was running with 8080, true, vertx; changed to false. Also, had to reconfigure eclipse. Now, new issue: both in eclipse and commandline:
java -jar target/mesh-vertx-example-0.0.1-SNAPSHOT.jar
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Jun 06, 2018 11:25:51 AM com.gentics.mesh.example.Server
INFO: Connecting to Gentics Mesh..
Jun 06, 2018 11:25:51 AM com.gentics.mesh.example.Server
INFO: Server running on port 3000
io.reactivex.exceptions.OnErrorNotImplementedException: Connection was closed
at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)

@KnowledgeGarden
Copy link
Author

Perhaps that has something to do with Mesh. I'm going to reboot it now.

@KnowledgeGarden
Copy link
Author

Rebooting Mesh changed nothing.

@Jotschi
Copy link
Contributor

Jotschi commented Jun 6, 2018

@KnowledgeGarden Strange. Are you using the mesh demo? The example only works with the mesh demo.

@KnowledgeGarden
Copy link
Author

Yes. It's only a week old but here is what it says on reboot:

Your Gentics Mesh version is outdated. You are using {0.19.2} but version {0.21.1} is available.

@Jotschi
Copy link
Contributor

Jotschi commented Jun 6, 2018

@KnowledgeGarden How do you start Mesh? Docker? Always make sure to use a tag in that case. Otherwise your docker env may not pull the updates.

docker run --rm -p 8080:8080 gentics/mesh-demo:0.21.1

@KnowledgeGarden
Copy link
Author

Running Mesh outside docker. Just downloaded the jar and booted it. I'll go ahead and bring down the latest and boot that.

@KnowledgeGarden
Copy link
Author

Same result on Mesh 0.21.1

@Jotschi
Copy link
Contributor

Jotschi commented Jun 6, 2018

@KnowledgeGarden I don't think this is a mesh issue. Can you post the source of your Server.java in a github gist?

@KnowledgeGarden
Copy link
Author

It's precisely what came down from github with the client switched from true to false. No other changes.

@Jotschi
Copy link
Contributor

Jotschi commented Jun 6, 2018

@KnowledgeGarden And you connect to localhost port 8080? Can you access Mesh on localhost:8080? I tried the same setup and it works without a problem. You could try to replace localhost with 127.0.0.1.

@KnowledgeGarden
Copy link
Author

The doctrine of migrating errors is in play. Now we see this:

java.lang.AbstractMethodError: io.vertx.ext.web.templ.impl.HandlebarsTemplateEngineImpl$Loader$1.content(Ljava/nio/charset/Charset;)Ljava/lang/String;
at com.github.jknack.handlebars.internal.HbsParserFactory$1.parse(HbsParserFactory.java:74)
at com.github.jknack.handlebars.cache.NullTemplateCache.get(NullTemplateCache.java:54)
at com.github.jknack.handlebars.Handlebars.compile(Handlebars.java:475)

@KnowledgeGarden
Copy link
Author

I get the same error in eclipse and in commandline; with localhost in Server.java or with 127.0.0.1

@Jotschi
Copy link
Contributor

Jotschi commented Jun 6, 2018

@KnowledgeGarden I'm clueless but I'll ask a co-worker to try the example on his mac. I think something is wrong with your setup/checkout. I'll get back to you.

@KnowledgeGarden
Copy link
Author

INFO: Connecting to Gentics Mesh..
Jun 06, 2018 12:59:41 PM com.gentics.mesh.example.Server
INFO: Server running on port 3000
Jun 06, 2018 1:00:09 PM com.gentics.mesh.example.Server
SEVERE: Error handling request {http://localhost:3000/}
java.lang.AbstractMethodError: io.vertx.ext.web.templ.impl.HandlebarsTemplateEngineImpl$Loader$1.content(Ljava/nio/charset/Charset;)Ljava/lang/String;
at com.github.jknack.handlebars.internal.HbsParserFactory$1.parse(HbsParserFactory.java:74)
at com.github.jknack.handlebars.cache.NullTemplateCache.get(NullTemplateCache.java:54)
at com.github.jknack.handlebars.Handlebars.compile(Handlebars.java:475)

And: when I try http://localhost:3000/demo/ I get this:
INFO: Server running on port 3000
java.lang.NullPointerException
at com.gentics.mesh.example.Server.lambda$handlePage$1(Server.java:87)
at io.reactivex.internal.observers.ConsumerSingleObserver.onSuccess(ConsumerSingleObserver.java:61)
at io.vertx.reactivex.core.impl.AsyncResultSingle.lambda$subscribeActual$0(AsyncResultSingle.java:41)

@Jotschi
Copy link
Contributor

Jotschi commented Jun 6, 2018

@bernhardriegler Could you please take a look and check whether you can reproduce the problem? I'm clueless.

@KnowledgeGarden
Copy link
Author

I may have a different slant on it. I did not checkout the graphql branch. I am starting over with that branch.

@KnowledgeGarden
Copy link
Author

This is just the zip download, not opened in eclipse, of the graphql branch (note, the readme for this says to checkout graphql-example branch -- doesn't exist), and I see this result:

INFO: Server running on port 3000
Jun 06, 2018 1:15:47 PM com.gentics.mesh.example.Server
SEVERE: Error handling request {http://localhost:3000/}
java.lang.AbstractMethodError: io.vertx.ext.web.templ.impl.HandlebarsTemplateEngineImpl$Loader$1.content(Ljava/nio/charset/Charset;)Ljava/lang/String;
at com.github.jknack.handlebars.internal.HbsParserFactory$1.parse(HbsParserFactory.java:74)

@Jotschi
Copy link
Contributor

Jotschi commented Jun 6, 2018

@KnowledgeGarden Use the master! - I did not know that the other branch was referenced anywhere. I'll fix the readme.

@KnowledgeGarden
Copy link
Author

That takes me back to the previous error messages. Same issue. That's the branch I am running in eclipse, but just to be sure, I'll bring it down again.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants