Skip to content

Broken Pipe with java driver 4.1.10 #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nicogiard opened this issue Mar 15, 2017 · 2 comments
Closed

Broken Pipe with java driver 4.1.10 #110

nicogiard opened this issue Mar 15, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@nicogiard
Copy link

Hi,

I'm using server 3.1.14 and java driver 4.1.10 and i got an issue when the server shutdown when a request is sent.

When i try to execute this code :

try {
    users = ArangoDB.db().query("FOR u IN User RETURN u", new MapBuilder().get(), null, User.class).asListRemaining();
} catch (ArangoDBException e) {
    Logger.error(e, "error : %s", e.getMessage())
}

Here is a StackTrace i got :

play.exceptions.JavaExecutionException: java.net.SocketException: Relais brisé (pipe)
	at play.mvc.ActionInvoker.invoke(ActionInvoker.java:231)
	at Invocation.HTTP Request(Play!)
Caused by: java.lang.RuntimeException: java.net.SocketException: Relais brisé (pipe)
	at com.arangodb.internal.velocystream.Connection.writeIntern(Connection.java:212)
	at com.arangodb.internal.velocystream.ConnectionSync.write(ConnectionSync.java:85)
	at com.arangodb.internal.velocystream.CommunicationSync.send(CommunicationSync.java:124)
	at com.arangodb.internal.velocystream.CommunicationSync.execute(CommunicationSync.java:108)
	at com.arangodb.internal.velocystream.CommunicationSync.authenticate(CommunicationSync.java:129)
	at com.arangodb.internal.velocystream.Communication.connect(Communication.java:79)
	at com.arangodb.internal.velocystream.CommunicationSync.execute(CommunicationSync.java:105)
	at com.arangodb.internal.velocystream.CommunicationSync.execute(CommunicationSync.java:1)
	at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:58)
	at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:47)
	at com.arangodb.ArangoDatabase.query(ArangoDatabase.java:237)
	at controllers.Application.index(Application.java:16)
	at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:544)
	at play.mvc.ActionInvoker.invoke(ActionInvoker.java:494)
	at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:489)
	at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:458)
	at play.mvc.ActionInvoker.invoke(ActionInvoker.java:162)
	... 1 more
Caused by: java.net.SocketException: Relais brisé (pipe)
	at java.net.SocketOutputStream.socketWrite0(Native Method)
	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
	at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
	at com.arangodb.internal.velocystream.Connection.writeIntern(Connection.java:210)
	... 17 more

After a little digging, com.arangodb.internal.velocystream.Connection.writeIntern is the only method that throws directly a RuntimeException.
Is there a reason for such a 'feature', or do you think it can be an ArangoDBException ?

because this code

try {
    users = ArangoDB.db().query("FOR u IN User RETURN u", new MapBuilder().get(), null, User.class).asListRemaining();
} catch (ArangoDBException | RuntimeException e) {
    Logger.error(e, "error : %s", e.getMessage());
}

is absurd due to the inheritance beetwen ArangoDBException and RuntimeException

Am i completely wrong or is there a misunderstanding ?
Thanks

@mvollmary mvollmary self-assigned this Mar 16, 2017
@mvollmary mvollmary added the bug label Mar 16, 2017
@mvollmary mvollmary added this to the 4.1.11 milestone Mar 16, 2017
@mvollmary
Copy link

Thanks for reporting.
Fixed it for version 4.1.11 which will be available within the next week. You can already use it with 4.1.11-SNAPSHOT.

@nicogiard
Copy link
Author

Great! Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants