Open adprocas opened 7 years ago
I'm unfortunately unable to test it, do you have any chance to debug it a little to see what's wrong ?
I've debugged it quite a bit. I also tested on more glassfish installations with no success. It seems related to #140 as well. It only happens when the sslContext is passed in. I walked through the code and it seems to be looping infinitely somewhere. It all seems to be happening with Netty maybe. Either way, I've decided to just use similar code to what etcd viewer is using.
If you have time, could you provide an example somewhere ? With a script to generate the certs and start an etcd instance as well so I can debug it and later on add it to the ci build ?
I'm not sure what you mean by "provide an example." I'll explain the setup.
The company I work for has a lot of different servers. Etcd was installed on one of those servers. All servers have a certificate that is used, so they are all secure. All connections need to be secure.
I have a pem file that I can provide your EtcdClient (through the Netty sslContext) in order to connect to this server, as it is needed if I want to use an SSL connection. I've tried by supplying the PEM file directly, and also by installing it locally and on the dev server I have tested this on. Again, this works in Tomcat, but not Glassfish.
When I supply the sslContext, and the certificate is installed, or I supply the PEM file, it hangs. Again, only in Glassfish. I have tested Glassfish 4.1.1 and 4.1.0, and a custom version of 4.1.0 that includes some extra libraries.
So, you would need to have a secure server somewhere. Then you would need to generate a cert for that server and test it that way.
If I can find some time I can dig further into this, but I'm not certain when I would be able to find the time, as I don't really have the time at work, and I don't have any of this set up at home.
Now that I think about it, I will check the Glassfish settings to see if maybe the port that Etcd is using is the problem. Maybe there's an issue with the port. I'll let you know what I find.
I meant that if you have time, it would be nice if you can send a PR with a failing tests case
Hey,
I have a sample app working on Tomcat, but it is failing on Glassfish. In particular, it's hanging.
I can't find anything that seems to be related in the logs.
It seems to be looping and retrying. I've tried different timeouts and retry settings, but it doesn't seem to change anything.
When I step into something that starts the ETCD connection, like the following, I can't seem to find out exactly where the issue is. I don't see it looping anywhere.
EtcdHealthResponse health = client.getHealth();
Here's the code I am using for my connection. Again, this works on tomcat just fine. It's just Glassfish that is blowing up. They're both using the same version of Java - Java 1.8.
Of course, that's wrapped in a try catch. An exception is never caught, so I'm not sure what is going on. It just hangs and the page never loads. It seems to use up like every Glassfish resource.
Also, this is for Glassfish 4.1.1 and 4.1.0.
I also have the following versions of required libraries