Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 207932 - dev-db/firebird-2.0.3.12981.0-r2: start/stop script generates wrong and improperly formatted messages
Summary: dev-db/firebird-2.0.3.12981.0-r2: start/stop script generates wrong and impro...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High minor
Assignee: William L. Thomson Jr. (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-28 17:07 UTC by Matthias Hanft
Modified: 2008-01-31 14:20 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Hanft 2008-01-28 17:07:11 UTC
Starting the firebird database server produces wrong error messages.

Starting and stopping the firebird database server generates start/stop messages which are different from all other start/stop scripts.


Reproducible: Always

Steps to Reproduce:
1. Make sure Firebird is not running
2. Run /etc/init.d/firebird start
(you get the start message, see below)
3. Run /etc/init.d/firebird stop
(you get the stop message, see below)
Actual Results:  
/etc/init.d/firebird start:
 * Starting Firebird server ...
[at this point, takes about 10-20 seconds]
check /var/log/firebird/firebird.log file for errors
can not start server                                                      [ ok ]

/etc/init.d/firebird stop:
 * Stopping Firebird server ...
server shutdown completed                                                 [ ok ]

Expected Results:  
/etc/init.d/firebird start:
 * Starting Firebird server ...                                           [ ok ]

/etc/init.d/firebird stop:
 * Stopping Firebird server ...                                           [ ok ]

In spite of the error message at start time, Firebird is started correctly.

/var/log/firebird/firebird.log:

[at start time:]
fileserver (Client)     Mon Jan 28 17:49:12 2008
        INET/inet_error: connect errno = 111

fileserver (Client)     Mon Jan 28 17:49:12 2008
        /usr/share/firebird/../../../usr/bin/fbguard: guardian starting ../../../usr/bin/fbserver

[at stop time:]
fileserver (Client)     Mon Jan 28 17:52:53 2008
        /usr/share/firebird/../../../usr/bin/fbguard: ../../../usr/bin/fbserver normal shutdown.
Comment 1 William L. Thomson Jr. (RETIRED) gentoo-dev 2008-01-28 17:48:54 UTC
What you are seeing is coming from the engine itself. Based on how it forks and such. Making changes to change how start/stop messages are displayed. Might have other consequences. I am not inclined to break things over a minor pet peeve. Off hand I don't think we have any rules about startup messages, and being consistent there.

While I agree it's ideal, implementing it might not be as practical, based on potential side effects. So unless you are having problems with start/stop. Not to likely to accept this a bug, and make changes. Likely end up closing for now as won't fix.
Comment 2 Michael Weissenbacher 2008-01-30 09:18:03 UTC
Yes, but it is a bug that was intrudoced by changing the file layout to comply to FHS. It didn't appear when all files where in /opt and it doesn't appear when using the firebird official build, even when using it with gentoo's start script.
Comment 3 William L. Thomson Jr. (RETIRED) gentoo-dev 2008-01-30 14:58:15 UTC
What are you talking about? These messages come from Firebird itself and has NOTHING to do with it being split up. The messages would be there with a binary version from upstream installed in opt.

Nothing has changed with regard to the messages on start or their formatting from when Firebird was in /opt, or since being moved out, or ever.

Firebird-2.0.3.12981-0/src/utilities/ibmgr/ibmgr.h
const USHORT MSG_SHUTOK		= 28;	// server shutdown completed
const USHORT MSG_SRVUPOK        = 32;   // server has been successfully started

Firebird-2.0.3.12981-0/src/utilities/ibmgr/srvrmgr.cpp
rs = "server shutdown completed";
rs = "server has been successfully started";

Closing this as wontfix because it's not something I can easily address is the formatting of start messages is kinda moot. No policy states one must adhere to a particular format of start/stop etc messages for init scripts on Gentoo. If there is one, I am not aware of it.
Comment 4 Matthias Hanft 2008-01-30 15:04:19 UTC
I don't complain about simple text formatting, but the message

 * Starting Firebird server ...
check /var/log/firebird/firebird.log file for errors
can not start server                                                      [ ok ]

while the server CAN be started is just a bit misleading, isn't it?!
Comment 5 William L. Thomson Jr. (RETIRED) gentoo-dev 2008-01-30 15:09:58 UTC
(In reply to comment #4)
> I don't complain about simple text formatting, but the message
> 
>  * Starting Firebird server ...
> check /var/log/firebird/firebird.log file for errors
> can not start server                                                      [ ok
> ]
> 
> while the server CAN be started is just a bit misleading, isn't it?!
>
Well the server is saying
can not start server.

Like the other messages this is coming from the engine itself not the init script or etc. Why, I have no clue, you are having other problems as well. So it's not to suprising. That it actually starts is interesting, because again that message comes from the server itself. Same one writing to log files saying things did start.

Firebird-2.0.3.12981-0/src/utilities/ibmgr/ibmgr.h
gr/ibmgr.h:const USHORT MSG_STARTERR	= 29;	// can not start server
const USHORT MSG_STARTFAIL	= 30;	// can not start server

Firebird-2.0.3.12981-0/src/utilities/ibmgr/srvrmgr.cpp
rs = "can not start server";

I think it can be started via server now, instead of mgr or guard. Not sure have to look into that. Feel free to provide patches for init script. But if you take the time to look at init script. You will see it's pretty basic.



Comment 6 William L. Thomson Jr. (RETIRED) gentoo-dev 2008-01-30 15:13:00 UTC
(In reply to comment #0)
>
> In spite of the error message at start time, Firebird is started correctly.

It's the first error that is likely your problem.
 
> /var/log/firebird/firebird.log:
> 
> [at start time:]
> fileserver (Client)     Mon Jan 28 17:49:12 2008
>         INET/inet_error: connect errno = 111
> 
> fileserver (Client)     Mon Jan 28 17:49:12 2008
>         /usr/share/firebird/../../../usr/bin/fbguard: guardian starting
> ../../../usr/bin/fbserver
> 
> [at stop time:]
> fileserver (Client)     Mon Jan 28 17:52:53 2008
>         /usr/share/firebird/../../../usr/bin/fbguard: ../../../usr/bin/fbserver
> normal shutdown.

See above and the time stamps. You get error, then an attempt on start. You can see the engine code is set to think it did not start when it starts with an error. So it's partly an upstream bug there, since the server really does start.

BUT if you correct what ever is causing that initial start up error, then more than likely that message about not being able to start the server will go away.


Comment 7 Matthias Hanft 2008-01-30 16:26:23 UTC
(In reply to comment #6)
> It's the first error that is likely your problem.
> > [at start time:]
> > fileserver (Client)     Mon Jan 28 17:49:12 2008
> >         INET/inet_error: connect errno = 111
> > fileserver (Client)     Mon Jan 28 17:49:12 2008
> >         /usr/share/firebird/../../../usr/bin/fbguard: guardian starting
> > ../../../usr/bin/fbserver
> See above and the time stamps. You get error, then an attempt on start.

This error seems to be "normal" (and not an error). On Jan 10, someone wrote in the Yahoo Firebird support group:

# 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

So there's nothing to correct at startup (while an error message for normal behaviour is not good style either). But "can not start server" is definitely wrong...
Comment 8 William L. Thomson Jr. (RETIRED) gentoo-dev 2008-01-30 16:46:30 UTC
(In reply to comment #7)
>
> This error seems to be "normal" (and not an error)

Errors on start ARE NOT NORMAL.

> On Jan 10, someone wrote in the Yahoo Firebird support group:

Next time please provide a link instead of copying and pasting. Helps to see who is commenting.

> So there's nothing to correct at startup (while an error message for normal
> behaviour is not good style either).

If you want to believe it's normal fine. But I am telling you it's not. It does not happen for me, or  for most people running Firebird on Gentoo. Others would have filed a bug about this before.

> But "can not start server" is definitel wrong...

Why are you telling me that? It's an upstream issue, I have already shown you the code where the message you are seeing comes from. It's not one I am generating. Nor a result of splitting up package, or anything Gentoo specific. So if you have a complaint take it else where. Nothing I can do to address this.

If this were your only problem. I might be able to accept the comments of some random person you pasted. But combine this with the other you are having. You have something going on locally that is abnormal. If you want to recognized that and work to debugging it locally. Nothing I can say.

You have no other test machine or etc to see if it is env related. So really not able to debug this properly yourself. Which I have even less means to help you with your problems. This bug is closed, likely should have gone with invalid vs wontfix.

If you are still unhappy with the behavior of the engine. Report it upstream. I would love to see a developer, or someone from IBPhoenix or etc,  comment about those errors being normal.






Comment 9 Matthias Hanft 2008-01-31 13:44:53 UTC
(In reply to comment #8)
> Next time please provide a link instead of copying and pasting. Helps to see
> who is commenting.

Sorry for that. It is generally an e-mail list, but a web mirror can be found at http://tech.groups.yahoo.com/group/firebird-support/

The message I had mentioned can be found at
http://tech.groups.yahoo.com/group/firebird-support/message/91547

> If you are still unhappy with the behavior of the engine. Report it upstream. I
> would love to see a developer, or someone from IBPhoenix or etc,  comment about
> those errors being normal.

I apology if this is not the correct place to discuss this sort of bugs (the people in the mailinglist sent me here). If you can point me to the correct place, I'd happy to contact a developer (or whoever will listen).
Comment 10 William L. Thomson Jr. (RETIRED) gentoo-dev 2008-01-31 14:20:36 UTC
(In reply to comment #9)
>
> Sorry for that. It is generally an e-mail list, but a web mirror can be found
> at http://tech.groups.yahoo.com/group/firebird-support/

I am familiar with the list, was on it for years. I am on the firebird-devel list.
 
> The message I had mentioned can be found at
> http://tech.groups.yahoo.com/group/firebird-support/message/91547

Yes and if you look at the response before that one from Helen Borrie. Who is a former Borland Employee, present employee of IBPhoenix, author of some books, etc.

Helen is very much an authoritative figure, and she is saying the error is not normal. She also said if you were really concerned you should take it to the firebird-devel list. She had a detailed response, but I guess it wasn't what you wanted to hear?

Aside from the from email address in the posting. In the link above the author didn't even add a signature to their email. Really need to consider the source of information you are trusting or going with.

> I apology if this is not the correct place to discuss this sort of bugs (the
> people in the mailinglist sent me here). If you can point me to the correct
> place, I'd happy to contact a developer (or whoever will listen).

Well Helen told you were to go, firebird-devel. No worries on the apology, but please don't be selective on responses. Going with a response along the lines of what you want to here. Like I have said, Helen said, for others, the error does not exist and is not normal.
 
Again that you have that error, plus many others in the logs per your other bug I am leaving open for now. You have something going on in your environment that is not correct. Thus the errors you are getting. Not sure how to be any clearer on that. What's causing them, how to correct. Not sure.