Java binds to serversocketchannel, but linux says

“no”.

netstat -nl shows no servers listening on the bound port (8080). All things in netstat have been verified as being “not the JVM”. HTTP connects fail (as if nothing listening).

I was making changes to a bit of user code and uploading the new JAR that handles a particular webpage when suddenly it all stopped working. I suspect this is exactly the same problem that has been plaguing the jgf.org server the past month or so, whereby it just goes “offline” for no reason, with no exceptions, no errors, nothing, and a restart some hours later of the JVM (triggers a re-bind to network interface) fixes everything.

24 hours ago (give or take 10 hours) I did install and upgrade some unrelated Debian packages, so there’s a small chance that I accidentally upgraded some core packages then too - but why would it take a day or so for something to break? I’d restarted the JVM 20 times in that time.

Just to take the piss further, ICMP ping is failing (even with firewall - which doesn’t block ICMP - turned to accept all protocols on all ports) and global DNS for jgf.org, which runs on this server, is not responding either. It would seem that those are problems with the network or ISP that owns the netblock, or with Agency9 who own the LAN segment, but… the “your web server gets unbound” seems to be something unrelated.

Unless, perhaps, the ISP has some evil backdoor for de-binding port servers !!! I have root access, so should be able to deal with everything…if I knew what to look for.

Help! Any and all appreciated, no matter how obvious. Maybe I missed something trivial?

One other thing: I sent one email from the email server, approx an hour or so before this died. If it hadn’t been dieing for no reason at all in the previous month I would think that was the culprit (something complex to do with emails - perhasps the ISP decided to attack ths erver because they don’t like email) but because of the same symptoms previously I believe it is unrelated.

I have a NAT server for home that does basically the same thing. It’s based on old Red Hat 7.2, kernel 2.4…

Maybe it’s some bug in the kernel or in a daemon? Only because I wasn’t running Java or email on the NAT box.

Beats me. Run tcpdump just to verify that you are indeed receiving a packet on 8080, then reboot I guess. That’s what did it for me. (I think my problems were due to my ISP not renewing DHCP leases properly, but I could never prove it.)

Only other ideas: tear down apps until it starts working (PING is in the kernel I think. It should ALWAYS work, if you are able to receive a packet at all. tcpdump should help here.) Then start adding the apps back until it fails, then debug.

[quote]“no”.
Just to take the piss further, ICMP ping is failing (even with firewall - which doesn’t block ICMP - turned to accept all protocols on all ports) and global DNS for jgf.org
[/quote]
Turned out to be a mismatch between what the firewall used to be, what I thought it still was, and what it had actually become on a recent uncsdheculed reboot…

Ah. Well, tcpdump will find out stuff like you’re not actually getting a packet you thought you were.