[ovirt-devel] sslStompReactor just created once, may cause engine failed to connect to new node

pengyixiang yxpengi386 at 163.com
Mon Dec 25 01:26:52 UTC 2017


hello, everyone!
     I use ScenarioClient to call vdsm-jsonrpc-client, but I find after my engine connected to one node, I new a node, then the certs(engine.p12) is changed,

but engine can not connected to new node, at last, I find the problem in there [1],  and I think rpc's certs to node that is still old, so I try to changed code to [2],
then repeat the test way, it works well, the ovirt's engine doesn't meet the trouble and how did you do? client is created like this [3].









[1]   https://github.com/oVirt/vdsm-jsonrpc-java/blob/078233e60c24f8b8525b3bf5fb1c5ab9f1c4e0f4/client/src/main/java/org/ovirt/vdsm/jsonrpc/client/reactors/ReactorFactory.java#L76



[2]  

private static Reactor getSslStompReactor(ManagerProvider provider) throws ClientConnectionException {
//        if (sslStompReactor != null) {
//            return sslStompReactor;
//        }
synchronized (ReactorFactory.class) {
//            if (sslStompReactor != null) {
//                return sslStompReactor;
//            }
try {
sslStompReactor = new SSLStompReactor(provider.getSSLContext());
            } catch (IOException | GeneralSecurityException e) {
throw new ClientConnectionException(e);
            }
        }
return sslStompReactor;
    }

[3] 
public ScenarioClient(String hostname, int port) throws ClientConnectionException {
this.reactor = ReactorFactory.getReactor(ProviderFactory.getProvider(), ReactorType.STOMP);
final ReactorClient client = this.reactor.createClient(hostname, port);
    client.setClientPolicy(new DefaultStompConnectionPolicy());
this.worker = ReactorFactory.getWorker(PARALLELISM);
this.jsonClient = this.worker.register(client);
this.jsonClient.setRetryPolicy(new DefaultStompClientPolicy());
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/devel/attachments/20171225/c8fff102/attachment.html>


More information about the Devel mailing list