Re: Fw: locating blocked port
On Wed, Feb 1, 2023 at 5:24 PM <debian-user@howorth.org.uk> wrote:
>
> [...]
> Begin forwarded message:
>
> Date: Wed, 1 Feb 2023 06:09:32 -0500
> From: Haines Brown <haines@histomat.net>
> To: debian-user@howorth.org.uk
> Subject: Re: locating blocked port
>
> On Tue, Jan 31, 2023 at 10:09:28PM +0000, debian-user@howorth.org.uk
> wrote:
> > Haines Brown wrote:
> > > $ jabref
> ...
> > > 15:43:56.628 [AWT-EventQueue-0] INFO net.sf.jabref.JabRefMain -
> > > Arguments passed on to running JabRef instance. Shutting down.
> >
> > The last line there seems to imply there is already another instance
> > of jabref running. Is that the case? What does
> >
> > $ ps -fe | grep jabref
> >
> > show, for example?
>
> Yes indeed. It showed two instances of jabref. I killed the processes
> and now
>
> $ ps -fe | grep jabref
> haines 3597 3160 0 06:02 pts/1 00:00:00 grep jabref
>
> So I should be able to start jabref:
>
> $ jabref
> 06:04:08.576 [AWT-EventQueue-0] WARN
> net.sf.jabref.logic.remote.server.RemoteListenerServerLifecycle -
> Port is blocked
> java.net.BindException: Address already in use
> ...
> 06:04:08.591 [AWT-EventQueue-0] INFO net.sf.jabref.JabRefMain -
> Arguments passed on to running JabRef instance. Shutting down.
>
> It seems that the jabref command i starts jabref twice. Hoewver the
> $ ps -fe command does not show them
After you kill an instance of jabref, the socket may be in a linger
state. I.e., SO_LINGER socket option in C.
https://duckduckgo.com/?q=so_linger+socket+option .
You should be able to check the source code to see if jabref is using
the option. https://docs.oracle.com/javase/7/docs/api/java/net/StandardSocketOptions.html#SO_LINGER
.
The short of it is, if the option is being used, then you should wait
about 2 minutes before you try to start the program again.
Jeff
Reply to: