Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple named instances on same Windows server seems to produce errors [CORE2418] #1062

Open
firebird-automations opened this issue Apr 11, 2009 · 1 comment

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Van den Wouwer Danny (dannyvdw)

I have on a Windows XP SP3 3 installations:

All installed for classic server:

* FB 2.1.1 Instance name: 211
* FB 2.1.2 Instance name: 212
and
FB 2.5.0 B1 Instance name: 250B1

Steps:
1. Start instance 211, firebird.log stays empty, all ok
2. Start instance 212, logs says:

DANNY Sat Apr 11 12:24:04 2009
XNET error: Server initialization failed

DANNY Sat Apr 11 12:24:04 2009
Database:

3. Start the third instance 250, logs says:

DANNY Sat Apr 11 12:24:53 2009
Database: XNET error: XNET server initialization failed
operating system directive CreateMutex failed
Cannot create a file when that file already exists.

DANNY Sat Apr 11 12:24:53 2009
operating system directive CreateMutex failed
Cannot create a file when that file already exists.

Second test:
1. Start instance 212, firebird.log stays empty, all ok
2. Start instance 211, logs says:

DANNY Sat Apr 11 12:26:39 2009
XNET error: Server initialization failed

DANNY Sat Apr 11 12:26:39 2009
Database:

3. Start 250, logs says:

DANNY Sat Apr 11 12:26:52 2009
Database: XNET error: XNET server initialization failed
operating system directive CreateMutex failed
Cannot create a file when that file already exists.

DANNY Sat Apr 11 12:26:52 2009
operating system directive CreateMutex failed
Cannot create a file when that file already exists.

Because of better info in logs for 250B1, i started to see on the created mutexes of each process using Process Explorer:
If you only start 211 I got following objects:
\BaseNamedObjects\firebird_trace_mutex
\BaseNamedObjects\FirebirdServerMutexFB211
\BaseNamedObjects\FIREBIRD_CONNECT_MUTEX
\BaseNamedObjects\FIREBIRD_CONNECT_MAP (Section, memory mapped file, probably guarded by mutex: \BaseNamedObjects\FIREBIRD_CONNECT_MUTEX?)

If you only start 212 I got following objects:
\BaseNamedObjects\firebird_trace_mutex
\BaseNamedObjects\FirebirdServerMutexFB212
\BaseNamedObjects\FIREBIRD_CONNECT_MUTEX
\BaseNamedObjects\FIREBIRD_CONNECT_MAP

If you only start 250 I got following objects:
\BaseNamedObjects\firebird_trace_mutex
\BaseNamedObjects\FirebirdServerMutexFB250
\BaseNamedObjects\FIREBIRD_CONNECT_MUTEX
\BaseNamedObjects\FIREBIRD_CONNECT_MAP

If I start first 211, then 212, 250 I got:
\BaseNamedObjects\firebird_trace_mutex
\BaseNamedObjects\FirebirdServerMutexFB211
\BaseNamedObjects\FIREBIRD_CONNECT_MUTEX
\BaseNamedObjects\FIREBIRD_CONNECT_MAP

If you only start 212 I got following objects:
\BaseNamedObjects\firebird_trace_mutex
\BaseNamedObjects\FirebirdServerMutexFB212

If you only start 250 I got following objects:
\BaseNamedObjects\firebird_trace_mutex
\BaseNamedObjects\FirebirdServerMutexFB250

Conclusion:
* First of all, It seems clear to me now why I got these errors. Because the first instance you start create's a mutex and a section to handle local connections through the help of a memory mapped file.
Because it seems that only one firebird server can handle local connections, it seems logically that the second and third cannot create the same mutex and section for local connections.

* But it was very confusing to see such errors in the log.

=> Maybe it is better to say in logs that another instance (here it is instance 211) that owns the right for local connections (aka Mutex and section) instead of the rather cryptic errors (in 25B1 it is already improved).

Or is this not intended this way?

@firebird-automations
Copy link
Collaborator Author

Commented by: Gabor Boros (gaborboros)

You have different config for all instances? If you want to use multiple instances modify RemoteServicePort, IpcName, RemotePipeName, CreateInternalWindow parameters on firebird.conf for all instances and don't use registry (instreg) and FIREBIRD environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant