Subject Re: INET/inet_error: connect errno = 111 - absolutely expected?
Author Smarts Broadcast Systems
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 11:49 AM 9/01/2008, you wrote:
> >There are a number of messages in this group and other resources
> >concerning the ``INET/inet_error: connect errno = 111'' message in the
> >{interbase,firebird}.log. It's not covered, per se, in the
> >firebirdsql.org FAQ.
>
> Not surprising - INET/inet_error signals only an error received from
> the network layer. Firebird doesn't have any way to interpret network
> errors, so they're just "for information only". Often an INET error
> is preceded or followed by an error message from the engine or the
> remote interface, although not always. Many, if not most, network
> errors are benign from Firebird's POV. Error 111 does tend to be a
> bit of a showstopper, though. ;-)

Helen and others interested in SuperServer behavior on Linux and Solaris:

Just to satisfy my own curiosity on this matter, I examined the source
code that comprises ``fbmgr.bin'' and added a few additional debugging
calls when it executes. I realize that this is getting close to
territory more suited for developers but those here in the support
group may find it interesting. On Linux, errno 111 is (ECONNREFUSED)
connection refused. Over on Solaris the errno code for that state is 146.

Anyway, when invoked with the ``-start'' flag, ``fbmgr.bin'' (or via
its wrapper script, ``fbmgr'') first calls a routine to check if the
server is up via the native API function of ``isc_service_attach()''.
If the server is NOT already running (which, of course, would be the
normal case at startup), the code then starts the server by forking
``fbguard''.

In short, the connection refused situation occurs at startup because
``fbmgr.bin'' is first checking whether the server is already running
(to prevent starting multiple instances) by trying to attach to it.
Thus a logfile shows this duo on Linux and Solaris respectively at
startup:

peecee (Client) Wed Jan 9 18:54:47 2008
INET/inet_error: connect errno = 111
peecee (Client) Wed Jan 9 18:54:47 2008
/usr/local/firebird2/bin/fbguard: guardian starting bin/fbserver

ultra30 (Client) Wed Jan 9 18:56:23 2008
INET/inet_error: connect errno = 146
ultra30 (Client) Wed Jan 9 18:56:23 2008
/opt/firebird2/bin/fbguard: guardian starting bin/fbserver

My only astonishment, Helen, is that you don't see it in your
``firebird.log'' file (presuming you're running SS on a *nix platform).