FAQ
When I use REST api, I met a problem as following is the bug report:
Exception in thread "main"
com.sun.jersey.api.client.ClientHandlerException: java.net.SocketException:
Unexpected end of file from server
at
com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:151)
at com.sun.jersey.api.client.Client.handle(Client.java:648)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:507)
at NeoRemoteTest.main(NeoRemoteTest.java:27)
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1064)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
at
com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:249)
at
com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149)
... 5 more

It's a simple connection problem. Sometimes I can connect to
localhost:7474/db/data but sometimes I can't. then the exception is above;
Is it a bug? can't keep connection in long time?

Another problem is that how can I accept long data? The case is that when i
query a larger graph with REST api, I always can't get returned data. the
exception is
OutOfMemory: Java Heap Space.
Anyone knows the solutions?

--

Search Discussions

  • Michael Hunger at Dec 10, 2012 at 8:46 am
    Can you provide details how you access the remote API?

    Am 10.12.2012 um 09:22 schrieb ChengQian:
    When I use REST api, I met a problem as following is the bug report:
    Can you share the code that you use?
    Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: java.net.SocketException: Unexpected end of file from server
    at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:151)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
    at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:507)
    at NeoRemoteTest.main(NeoRemoteTest.java:27)
    Caused by: java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1064)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
    at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:249)
    at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149)
    ... 5 more

    It's a simple connection problem. Sometimes I can connect to localhost:7474/db/data but sometimes I can't. then the exception is above;
    Is it a bug? can't keep connection in long time?
    Another problem is that how can I accept long data? The case is that when i query a larger graph with REST api, I always can't get returned data. the exception is
    OutOfMemory: Java Heap Space.
    Anyone knows the solutions?
    Do you have a full stacktrace here? Do you set X-Stream:true, what kind of query are you running?
    --
    --
  • ChengQian at Dec 10, 2012 at 9:12 am
    A simple connection code:

             private static final String
    ROOT_URI="http://localhost:7474/db/data/";
      public static void main(String[] args){
    WebResource resource=Client.create()
    .resource(ROOT_URI);
      ClientResponse response=resource.get(ClientResponse.class);
      System.out.println(String.format("Get ON [%s],status code
    [%d]",ROOT_URI,response.getStatus()));
      }

            It runs a long time and then report the exception I mentioned
    在 2012年12月10日星期一UTC+8下午4时46分23秒,Michael Hunger写道:
    Can you provide details how you access the remote API?

    Am 10.12.2012 um 09:22 schrieb ChengQian:
    When I use REST api, I met a problem as following is the bug report:
    Can you share the code that you use?
    Exception in thread "main"
    com.sun.jersey.api.client.ClientHandlerException: java.net.SocketException:
    Unexpected end of file from server
    at
    com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:151)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at
    com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
    at
    com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at
    com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:507)
    at NeoRemoteTest.main(NeoRemoteTest.java:27)
    Caused by: java.net.SocketException: Unexpected end of file from server
    at
    sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
    at
    sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
    at
    sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1064)
    at
    java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
    at
    com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:249)
    at
    com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149)
    ... 5 more

    It's a simple connection problem. Sometimes I can connect to
    localhost:7474/db/data but sometimes I can't. then the exception is above;
    Is it a bug? can't keep connection in long time?
    Another problem is that how can I accept long data? The case is that
    when i query a larger graph with REST api, I always can't get returned
    data. the exception is
    OutOfMemory: Java Heap Space.
    Anyone knows the solutions?
    Do you have a full stacktrace here? Do you set X-Stream:true, what kind of
    query are you running?
    --
    --
  • Michael Hunger at Dec 10, 2012 at 10:08 am
    Can you try to set the accept header to application/json ?

    Can you check your servers logfiles in data/log and data/graph.db/messages.log for any exceptions on the server side?

    Thanks,

    Michael

    Am 10.12.2012 um 10:05 schrieb ChengQian:
    A simple connection code:

    private static final String ROOT_URI="http://localhost:7474/db/data/";

    public static void main(String[] args){
    WebResource resource=Client.create()
    .resource(ROOT_URI);

    ClientResponse response=resource.get(ClientResponse.class);

    System.out.println(String.format("Get ON [%s],status code [%d]",ROOT_URI,response.getStatus()));

    }

    It runs a long time and then report the exception I mentioned
    在 2012年12月10日星期一UTC+8下午4时46分23秒,Michael Hunger写道:
    Can you provide details how you access the remote API?

    Am 10.12.2012 um 09:22 schrieb ChengQian:
    When I use REST api, I met a problem as following is the bug report:
    Can you share the code that you use?
    Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: java.net.SocketException: Unexpected end of file from server
    at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:151)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
    at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:507)
    at NeoRemoteTest.main(NeoRemoteTest.java:27)
    Caused by: java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1064)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
    at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:249)
    at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149)
    ... 5 more

    It's a simple connection problem. Sometimes I can connect to localhost:7474/db/data but sometimes I can't. then the exception is above;
    Is it a bug? can't keep connection in long time?
    Another problem is that how can I accept long data? The case is that when i query a larger graph with REST api, I always can't get returned data. the exception is
    OutOfMemory: Java Heap Space.
    Anyone knows the solutions?
    Do you have a full stacktrace here? Do you set X-Stream:true, what kind of query are you running?
    --

    --
    --
  • ChengQian at Dec 11, 2012 at 1:33 am
    Yeah,I've tried that but it didn't work.
    I check the log file and it only says: Failed to start Neo Server on port
    [7474], reason [null]

    在 2012年12月10日星期一UTC+8下午6时08分47秒,Michael Hunger写道:
    Can you try to set the accept header to application/json ?

    Can you check your servers logfiles in data/log and
    data/graph.db/messages.log for any exceptions on the server side?

    Thanks,

    Michael

    Am 10.12.2012 um 10:05 schrieb ChengQian:

    A simple connection code:

    private static final String ROOT_URI="
    http://localhost:7474/db/data/";
    public static void main(String[] args){
    WebResource resource=Client.create()
    .resource(ROOT_URI);
    ClientResponse response=resource.get(ClientResponse.class);
    System.out.println(String.format("Get ON [%s],status code
    [%d]",ROOT_URI,response.getStatus()));
    }

    It runs a long time and then report the exception I mentioned
    在 2012年12月10日星期一UTC+8下午4时46分23秒,Michael Hunger写道:
    Can you provide details how you access the remote API?

    Am 10.12.2012 um 09:22 schrieb ChengQian:
    When I use REST api, I met a problem as following is the bug report:
    Can you share the code that you use?
    Exception in thread "main"
    com.sun.jersey.api.client.ClientHandlerException: java.net.SocketException:
    Unexpected end of file from server
    at
    com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:151)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at
    com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
    at
    com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at
    com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:507)
    at NeoRemoteTest.main(NeoRemoteTest.java:27)
    Caused by: java.net.SocketException: Unexpected end of file from server
    at
    sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
    at
    sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
    at
    sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1064)
    at
    java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
    at
    com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:249)
    at
    com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149)
    ... 5 more

    It's a simple connection problem. Sometimes I can connect to
    localhost:7474/db/data but sometimes I can't. then the exception is above;
    Is it a bug? can't keep connection in long time?
    Another problem is that how can I accept long data? The case is that
    when i query a larger graph with REST api, I always can't get returned
    data. the exception is
    OutOfMemory: Java Heap Space.
    Anyone knows the solutions?
    Do you have a full stacktrace here? Do you set X-Stream:true, what kind
    of query are you running?
    --
    --



    --
  • Michael Hunger at Dec 11, 2012 at 2:29 am
    Can you try to start the server with bin/neo4j console ?

    To see any issues.

    Michael

    Am 11.12.2012 um 02:33 schrieb ChengQian:
    Yeah,I've tried that but it didn't work.
    I check the log file and it only says: Failed to start Neo Server on port [7474], reason [null]

    在 2012年12月10日星期一UTC+8下午6时08分47秒,Michael Hunger写道:
    Can you try to set the accept header to application/json ?

    Can you check your servers logfiles in data/log and data/graph.db/messages.log for any exceptions on the server side?

    Thanks,

    Michael

    Am 10.12.2012 um 10:05 schrieb ChengQian:
    A simple connection code:

    private static final String ROOT_URI="http://localhost:7474/db/data/";

    public static void main(String[] args){
    WebResource resource=Client.create()
    .resource(ROOT_URI);

    ClientResponse response=resource.get(ClientResponse.class);

    System.out.println(String.format("Get ON [%s],status code [%d]",ROOT_URI,response.getStatus()));

    }

    It runs a long time and then report the exception I mentioned
    在 2012年12月10日星期一UTC+8下午4时46分23秒,Michael Hunger写道:
    Can you provide details how you access the remote API?

    Am 10.12.2012 um 09:22 schrieb ChengQian:
    When I use REST api, I met a problem as following is the bug report:
    Can you share the code that you use?
    Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: java.net.SocketException: Unexpected end of file from server
    at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:151)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
    at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:507)
    at NeoRemoteTest.main(NeoRemoteTest.java:27)
    Caused by: java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1064)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
    at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:249)
    at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149)
    ... 5 more

    It's a simple connection problem. Sometimes I can connect to localhost:7474/db/data but sometimes I can't. then the exception is above;
    Is it a bug? can't keep connection in long time?
    Another problem is that how can I accept long data? The case is that when i query a larger graph with REST api, I always can't get returned data. the exception is
    OutOfMemory: Java Heap Space.
    Anyone knows the solutions?
    Do you have a full stacktrace here? Do you set X-Stream:true, what kind of query are you running?
    --

    --

    --
    --
  • ChengQian at Dec 11, 2012 at 4:27 am
    no, in my computer, the bin/neo4j console command doesn't work but the
    server works well before. recently it occurs that problem.
      If I restart the computer, it then works well again. That's very strange.

    在 2012年12月11日星期二UTC+8上午10时29分51秒,Michael Hunger写道:
    Can you try to start the server with bin/neo4j console ?

    To see any issues.

    Michael

    Am 11.12.2012 um 02:33 schrieb ChengQian:

    Yeah,I've tried that but it didn't work.
    I check the log file and it only says: Failed to start Neo Server on port
    [7474], reason [null]

    在 2012年12月10日星期一UTC+8下午6时08分47秒,Michael Hunger写道:
    Can you try to set the accept header to application/json ?

    Can you check your servers logfiles in data/log and
    data/graph.db/messages.log for any exceptions on the server side?

    Thanks,

    Michael

    Am 10.12.2012 um 10:05 schrieb ChengQian:

    A simple connection code:

    private static final String ROOT_URI="
    http://localhost:7474/db/data/";
    public static void main(String[] args){
    WebResource resource=Client.create()
    .resource(ROOT_URI);
    ClientResponse response=resource.get(ClientResponse.class);
    System.out.println(String.format("Get ON [%s],status code
    [%d]",ROOT_URI,response.getStatus()));
    }

    It runs a long time and then report the exception I mentioned
    在 2012年12月10日星期一UTC+8下午4时46分23秒,Michael Hunger写道:
    Can you provide details how you access the remote API?

    Am 10.12.2012 um 09:22 schrieb ChengQian:
    When I use REST api, I met a problem as following is the bug report:
    Can you share the code that you use?
    Exception in thread "main"
    com.sun.jersey.api.client.ClientHandlerException: java.net.SocketException:
    Unexpected end of file from server
    at
    com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:151)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at
    com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
    at
    com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at
    com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:507)
    at NeoRemoteTest.main(NeoRemoteTest.java:27)
    Caused by: java.net.SocketException: Unexpected end of file from server
    at
    sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
    at
    sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
    at
    sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1064)
    at
    java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
    at
    com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:249)
    at
    com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149)
    ... 5 more

    It's a simple connection problem. Sometimes I can connect to
    localhost:7474/db/data but sometimes I can't. then the exception is above;
    Is it a bug? can't keep connection in long time?
    Another problem is that how can I accept long data? The case is that
    when i query a larger graph with REST api, I always can't get returned
    data. the exception is
    OutOfMemory: Java Heap Space.
    Anyone knows the solutions?
    Do you have a full stacktrace here? Do you set X-Stream:true, what kind
    of query are you running?
    --
    --



    --



    --
  • ChengQian at Dec 10, 2012 at 9:47 am
    Maybe the port 7474 is already in use? But when I change the port in
    neo4j-server properties file and restart server. it still doesn't work.

    --
  • ChengQian at Dec 11, 2012 at 7:33 am
    I may know the reason. When I use some queries which may take much space in
    memory or even result in outofmemory exception. Then the server down.
    Does anyone meet the same problem? Or how can I solve it?

    --
  • Reihane Boghrati at Mar 19, 2014 at 8:15 pm
    Hi Cheng,

    I think I may have the same problem, I'm wondering if you found any
    solution for that?
    On Monday, December 10, 2012 11:29:37 PM UTC-8, ChengQian wrote:

    I may know the reason. When I use some queries which may take much space
    in memory or even result in outofmemory exception. Then the server down.
    Does anyone meet the same problem? Or how can I solve it?
    --
    You received this message because you are subscribed to the Google Groups "Neo4j" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupneo4j @
postedDec 10, '12 at 8:22a
activeMar 19, '14 at 8:15p
posts10
users3
websiteneo4j.org
irc#neo4j

People

Translate

site design / logo © 2017 Grokbase