0

this is my code, i want to use jsonrpc4j(1.0 version) to get the OVSDB message

public static void main(String[] args) throws Throwable {
    JsonRpcHttpClient jsonRpcHttpClient = new JsonRpcHttpClient(new URL("http://192.168.1.177:6632"));
    String result = jsonRpcHttpClient.invoke("list_dbs", null, String.class);
    System.out.println(result);
}

but when i run this code, i get the result message:

Exception in thread "main" java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:851)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:848)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1587)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at com.googlecode.jsonrpc4j.JsonRpcHttpClient.invoke(JsonRpcHttpClient.java:153)
at com.googlecode.jsonrpc4j.JsonRpcHttpClient.invoke(JsonRpcHttpClient.java:102)
at com.googlecode.jsonrpc4j.JsonRpcHttpClient.invoke(JsonRpcHttpClient.java:120)
at com.swjtu.Test.main(Test.java:21)

please help me to solve this problem, thanks!

Smile
  • 17
  • 7
  • hAve you checked your server logs? – Scary Wombat Nov 16 '18 at 01:50
  • I need use jsonrpc 1.0 version , but i use the TCPMon get the message"{"id":"8581323758821791212","jsonrpc":"2.0","method":"get_schema","params":["Open_vSwitch"]}" the version is 2.0. So do you know use the 1.0 version? – Smile Nov 16 '18 at 03:23

0 Answers0