gitblit icon indicating copy to clipboard operation
gitblit copied to clipboard

Gitblit server occasionally stops responding to SSH connections on port 29418

Open dbywalec opened this issue 9 years ago • 6 comments

Having upgraded to Gitblit 1.7.1 we are experiencing the following problem: Gitblit server occasionally stops responding to SSH connections on port 29418. This usually occurs once per day, once a couple of days.

In the server log one can find the following exception: 2016-01-13 13:18:56 [WARN ] Caught IOException while accepting incoming connection from /0:0:0:0:0:0:0:0:29418: The specified network name is no longer available.

java.io.IOException: The specified network name is no longer available.

at sun.nio.ch.Iocp.translateErrorToIOException(Iocp.java:309)
at sun.nio.ch.Iocp.access$700(Iocp.java:46)
at sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:399)
at java.lang.Thread.run(Thread.java:745)

The last successful SSH session gets opened and closed just before this exception. No following SSH connections are possible any more. It seems as the socket accepting thread dies and the processing chain gets broken, preventing other following connection from processing.

Interestingly, other Gitblit services such as HTTPS, GIT, main page are operational.

The /0:0:0:0:0:0:0:0:29418 has suggested me that IPv6 might have been involved. I double checked the server set-up (Windows Server 2008 R2 (6.1)). The only existing Ethernet interface is bound to IPv4 only, no IPv6 is configured whatsoever.

I can bet the problem comes from way beneath Gitblit, and Gitblit is not to be blamed.

However I am considering some improvement in Gitblit alone, perhaps some exception handler, so that it is able to recover from such situation and be able to server following connections.

I would appreciate your comments and/or suggestions.

Dariusz

dbywalec avatar Jan 13 '16 15:01 dbywalec

It may worth to raise this question on Apache SSHD issue tracker [1].

  • [1] https://issues.apache.org/jira/browse/SSHD

davido avatar Jan 16 '16 08:01 davido

https://issues.apache.org/jira/projects/SSHD/issues/SSHD-786

masc3d avatar Nov 30 '17 23:11 masc3d

Yes, it seems fixed in 1.7.0 and the latest Gitblit version contains sshd-core-1.0.0. It might be possible to replace it by 1.7.0. Maybe mina-core also needs to be upgraded to 2.0.16 then to satisfy dependency.

mkotsbak avatar Nov 01 '18 10:11 mkotsbak

I think there is pending PR that updated SSHD in Gitblit?

davido avatar Nov 01 '18 11:11 davido

Yes, it seems fixed in 1.7.0 and the latest Gitblit version contains sshd-core-1.0.0. It might be possible to replace it by 1.7.0. Maybe mina-core also needs to be upgraded to 2.0.16 then to satisfy dependency.

sshd-core-2.1.0 is the latest and it works well for us.

masc3d avatar Nov 01 '18 11:11 masc3d

Yes I see two: https://github.com/gitblit/gitblit/pull/1272 https://github.com/gitblit/gitblit/pull/1216

but it seems like the prosject is not maintained and then no PR merged...

mkotsbak avatar Nov 01 '18 12:11 mkotsbak