I want to make modules call each other. As the guide mentioned, the ‘simple-vertx’ project is aimed to call ‘hello-vertx’. . I have to mention that I have already configured the ‘docker.service’ file , and Okapi is started by the commond ’ java -Dokapiurl=“http://:9130$OKAPIHOST” -jar xxxx.jar dev ', and my ‘hostname’ is ‘liucxPC’ rather than ‘localhost’.
First I run ‘runhello.sh’, and then ‘runsimple.sh’, these 2 modules are successfully deployed and enabled for ‘testlib’ tenant. The ‘/hello’ interface runs well, but when I send GET request to ‘/simple’ interface with ‘X-Okapi-Tenant:testlib’ header , a message of “Hello failed with java.nio.channels.UnresolvedAddressException” returned. Meanwhile the okapi’s console reports the similar informations, but with ‘Thread bolcked’ before the message “OkapiClient exception: java.nio.channels.UnresolvedAddressException : null”.
Then I tried to call ‘xxx.xxx.x.xx:9132/simple’ directly where the ‘/simple’ runs, this time Okapi console records a NullPointerException at the line 48 of the ‘OkapiClient’.
What could be the causes of these situations? Or did I make something wrong with Okapi? I think maybe this have some relationship with ‘Vert.x’.
//============!!!=============================!!!================================
The vertx project can not be blocked. How to debug my own ‘vert.x module’ on my IDE? And how did the devlopers of Okapi do this?
//============!!!=============================!!!===============================
pic1 and pic 2: while excuting the ‘runsimple.sh’ ,during ‘Checking that it works’, Okapi records thread blocked
1
2
pic3 : I wonder why this happened, so I called ‘9132/simple’ directly
It is obviously both module have been deployed successfully, simple-vertx module runs well and be able to make a call to hello-vertx. I think the trouble maybe during the call between simple-vertx and hello-vertx.