Discussion:
[Firebird-devel] Connecting to Firebird on different ports: something is wrong.
Martijn Tonies
2003-11-28 08:00:04 UTC
Permalink
Hi developers,

I'm running Fb 1.5, RC7 on two machines, my local machine and
a remote server.

On the local machine, I'm running it next to InterBase 7.1, and so
Fb runs on port 3055 via the config parameter:
RemoteServicePort = 3055

On the remote server, it runs on default port 3050.

I can connect to the local server via the syntax
MARTIJN\3055:e:\...path to database.dat

Fine.

However, I cannot connect to the remote server, using syntax:
MEDIA:c:\...path.dat

And I cannot use it as MEDIA\3050:c:\... either.

However, if I remove the "RemoteServicePort" line from the
fb config, I'm able to connect to the remote server again.

Am I doing something wrong here? I thought that the parameter
should work on the SERVER only and not influence the client,
right?

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
Martijn Tonies
2003-11-28 08:05:07 UTC
Permalink
Post by Martijn Tonies
Hi developers,
I'm running Fb 1.5, RC7 on two machines, my local machine and
a remote server.
On the local machine, I'm running it next to InterBase 7.1, and so
RemoteServicePort = 3055
On the remote server, it runs on default port 3050.
I can connect to the local server via the syntax
MARTIJN\3055:e:\...path to database.dat
Make that: MARTIJN/3055
Post by Martijn Tonies
Fine.
MEDIA:c:\...path.dat
With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
Arno Brinkman
2003-11-28 09:07:02 UTC
Permalink
Hi Martijn,
Post by Martijn Tonies
I'm running Fb 1.5, RC7 on two machines, my local machine and
a remote server.
On the local machine, I'm running it next to InterBase 7.1, and so
RemoteServicePort = 3055
On the remote server, it runs on default port 3050.
I can connect to the local server via the syntax
MARTIJN\3055:e:\...path to database.dat
Fine.
MEDIA:c:\...path.dat
And I cannot use it as MEDIA\3050:c:\... either.
However, if I remove the "RemoteServicePort" line from the
fb config, I'm able to connect to the remote server again.
Am I doing something wrong here? I thought that the parameter
should work on the SERVER only and not influence the client,
right?
I can confirm that there's something wierd going on with local-server and
remote-server connects both running on different ports. By me it seems that
using a old fbclient.dll doesn't have the problem, but a recently build
fbclient.dll (or RC-7) has the problem.

Maybe someone can tell more about this?


Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird links :
http://www.firebirdsql.com
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/


Nederlandse firebird nieuwsgroep :
news://80.126.130.81
Dmitry Yemanov
2003-11-28 12:23:03 UTC
Permalink
Martijn,
Post by Martijn Tonies
Am I doing something wrong here? I thought that the parameter
should work on the SERVER only and not influence the client,
right?
No, it's designed to be used in both server and client. All remote-subsystem
settings are configurable for the client too. Ability to specify a port
number in the connection string is just an extra way to do the same. Note
that it's impossible to specify port number in the connection string for
Named Pipes and IPC/XNET - only via firebird.conf.


Dmitry
Martijn Tonies
2003-11-28 12:35:10 UTC
Permalink
Hi Dmitry,
Post by Dmitry Yemanov
Post by Martijn Tonies
Am I doing something wrong here? I thought that the parameter
should work on the SERVER only and not influence the client,
right?
No, it's designed to be used in both server and client. All
remote-subsystem
Post by Dmitry Yemanov
settings are configurable for the client too. Ability to specify a port
number in the connection string is just an extra way to do the same. Note
that it's impossible to specify port number in the connection string for
Named Pipes and IPC/XNET - only via firebird.conf.
Well, that might be great and all... but then how are you supposed to
connect to a remote server on a different port then, if fbclient is
forcing itself to the port defined for your local firebird server? And
why is this "as designed"? I've changed "firebird.conf", this is a
server config file, right?

--
Martijn
Arno Brinkman
2003-11-28 13:04:03 UTC
Permalink
Hi Dmitry,
Post by Dmitry Yemanov
Post by Martijn Tonies
Am I doing something wrong here? I thought that the parameter
should work on the SERVER only and not influence the client,
right?
No, it's designed to be used in both server and client. All
remote-subsystem
Post by Dmitry Yemanov
settings are configurable for the client too. Ability to specify a port
number in the connection string is just an extra way to do the same. Note
that it's impossible to specify port number in the connection string for
Named Pipes and IPC/XNET - only via firebird.conf.
Hmmm, but should connection-string not be prefered against firebird.conf
setting?
This way i can never connect to both remote server and local FB1.5 (and
future versions) if both have a different port which change will be very
high if i'm running Interbase/FB1.5/FB2.0 on the remote server and ofcourse
a local-server on my develop machine.

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird links :
http://www.firebirdsql.com
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/


Nederlandse firebird nieuwsgroep :
news://80.126.130.81
Dmitry Yemanov
2003-11-28 14:01:02 UTC
Permalink
Arno,
Post by Arno Brinkman
Hmmm, but should connection-string not be prefered against
firebird.conf setting?
Yes, it should. If it doesn't, then it's a bug. I will look at this issue
over the weekend.


Dmitry
Dmitry Yemanov
2003-11-28 14:03:02 UTC
Permalink
Martijn,
Post by Martijn Tonies
Well, that might be great and all... but then how are you supposed to
connect to a remote server on a different port then, if fbclient is
forcing itself to the port defined for your local firebird server?
I tend to agree it becomes tricky...
Post by Martijn Tonies
And
why is this "as designed"? I've changed "firebird.conf", this is a
server config file, right?
It's also a client config file. And always was. Even in FB1 some config
options are client-only.


Dmitry
Martijn Tonies
2003-11-28 17:31:02 UTC
Permalink
Hi,
Post by Dmitry Yemanov
Post by Martijn Tonies
Well, that might be great and all... but then how are you supposed to
connect to a remote server on a different port then, if fbclient is
forcing itself to the port defined for your local firebird server?
I tend to agree it becomes tricky...
"tricky" ... How about "nearly impossible". Really, as a Firebird user
and developer that uses multiple instances, I have no idea why the
client is forcing itself to use a non-default port (that is, without
defining
the port in the "services" file).
Post by Dmitry Yemanov
Post by Martijn Tonies
And
why is this "as designed"? I've changed "firebird.conf", this is a
server config file, right?
It's also a client config file. And always was. Even in FB1 some config
options are client-only.
And before Fb1?

--
Martijn
Martijn Tonies
2003-12-02 06:45:03 UTC
Permalink
Hi,

I'm surprised that I - apparently - am pretty much the only one
that sees this as a problem. Is there anyone out there who thinks
that the client should NOT read firebird.conf to find it's default
port? (let alone, disable all others).

I say: the client should use the port defined by "fb_db" in the
"services" file, use 3050 by default, or use the connect string.
That's it. That's all there is to it.

--
Martijn
Post by Martijn Tonies
Post by Dmitry Yemanov
Post by Martijn Tonies
Well, that might be great and all... but then how are you supposed to
connect to a remote server on a different port then, if fbclient is
forcing itself to the port defined for your local firebird server?
I tend to agree it becomes tricky...
"tricky" ... How about "nearly impossible". Really, as a Firebird user
and developer that uses multiple instances, I have no idea why the
client is forcing itself to use a non-default port (that is, without
defining
the port in the "services" file).
Post by Dmitry Yemanov
Post by Martijn Tonies
And
why is this "as designed"? I've changed "firebird.conf", this is a
server config file, right?
It's also a client config file. And always was. Even in FB1 some config
options are client-only.
And before Fb1?
--
Martijn
Nando Dessena
2003-12-02 07:33:05 UTC
Permalink
Martijn et al,

MT> I say: the client should use the port defined by "fb_db" in the
MT> "services" file, use 3050 by default, or use the connect string.
MT> That's it. That's all there is to it.

Here's my understanding: as things stand currently(*), perhaps the sequence should be

1) connection string
2) fb_db in the services file
3) firebird.conf
4) default to 3050

(*) in the future, I would like to see a client library that does not
use firebird.conf at all, i. e. use a special fbclient.conf or, even
better, go without a config file and refer to the connection string
for nondefault settings.

Ciao
--
Nando mailto:***@dedonline.com
Dmitry Yemanov
2003-12-02 07:33:06 UTC
Permalink
Martijn,
Post by Martijn Tonies
I'm surprised that I - apparently - am pretty much the only one
that sees this as a problem. Is there anyone out there who thinks
that the client should NOT read firebird.conf to find it's default
port? (let alone, disable all others).
I say: the client should use the port defined by "fb_db" in the
"services" file, use 3050 by default, or use the connect string.
That's it. That's all there is to it.
The connection string must override any other settings. Currently it's not
the case and this is a bug. I already have it fixed, but want to perform
some additional testing before committing.

As for the firebird.conf, there was an intention to use it on the client
side, to have all remote settings to be configured by default (for all
connections). But since both TCP/IP and NamedPipe ports can be specified in
the connection string, probably this idea isn't so useful. Okay, I see no
problems ignoring remote settings on the client side. But what about IPC
connections? If you change the memory map name (e.g. for compatibility with
IB6), you won't be able to connect locally from fbclient.dll. Should the
client IPC code use firebird.conf or not?


Dmitry
Martijn Tonies
2003-12-02 07:52:02 UTC
Permalink
Hi Dmitry,
Post by Dmitry Yemanov
Post by Martijn Tonies
I'm surprised that I - apparently - am pretty much the only one
that sees this as a problem. Is there anyone out there who thinks
that the client should NOT read firebird.conf to find it's default
port? (let alone, disable all others).
I say: the client should use the port defined by "fb_db" in the
"services" file, use 3050 by default, or use the connect string.
That's it. That's all there is to it.
The connection string must override any other settings. Currently it's not
the case and this is a bug. I already have it fixed, but want to perform
some additional testing before committing.
Ah, good! I found a bug in RC7 :-) ... I hope the override also goes
for port 3050 (so this won't get filtered out or something).
Post by Dmitry Yemanov
As for the firebird.conf, there was an intention to use it on the client
side, to have all remote settings to be configured by default (for all
connections).
Hmm, the problem here is, that I have a local server running
on 3055 and a remote one on 3050. The remote connections
worked fine (with all my tools) until I installed the local server,
as the connection now defaults to 3055. This a bit confusing.
Post by Dmitry Yemanov
But since both TCP/IP and NamedPipe ports can be specified in
the connection string, probably this idea isn't so useful. Okay, I see no
problems ignoring remote settings on the client side. But what about IPC
connections? If you change the memory map name (e.g. for compatibility with
IB6), you won't be able to connect locally from fbclient.dll. Should the
client IPC code use firebird.conf or not?
I understand why this can be needed. I think I agree with Nando here:
"fbclient.conf" would perhaps be better?

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
Dmitry Yemanov
2003-12-02 08:15:01 UTC
Permalink
Post by Martijn Tonies
Ah, good! I found a bug in RC7 :-) ...
Good work, Martijn <g>
Post by Martijn Tonies
I hope the override also goes for port 3050
(so this won't get filtered out or something).
Yes, certainly.
Post by Martijn Tonies
Hmm, the problem here is, that I have a local server running
on 3055 and a remote one on 3050. The remote connections
worked fine (with all my tools) until I installed the local server,
as the connection now defaults to 3055. This a bit confusing.
Agree.
Post by Martijn Tonies
"fbclient.conf" would perhaps be better?
In the future, ple-e-e-ase ;-)

But what solution should we prefer for v1.5? Lookup in firebird.conf if no
port/service is specified in the connection string (as it was intended in
v1.5)? Or ignore firebird.conf settings (keep v1.0 behaviour)? If the
latter, what should we do with IPC? Since you've started this thread, I'd
like to see the answers ;-) Or at least thoughts/comments...


Dmitry
Martijn Tonies
2003-12-02 08:55:00 UTC
Permalink
Hi Dmitry,
Post by Dmitry Yemanov
Post by Martijn Tonies
I hope the override also goes for port 3050
(so this won't get filtered out or something).
Yes, certainly.
Post by Martijn Tonies
Hmm, the problem here is, that I have a local server running
on 3055 and a remote one on 3050. The remote connections
worked fine (with all my tools) until I installed the local server,
as the connection now defaults to 3055. This a bit confusing.
Agree.
Post by Martijn Tonies
"fbclient.conf" would perhaps be better?
In the future, ple-e-e-ase ;-)
Sure.
Post by Dmitry Yemanov
But what solution should we prefer for v1.5? Lookup in firebird.conf if no
port/service is specified in the connection string (as it was intended in
v1.5)? Or ignore firebird.conf settings (keep v1.0 behaviour)? If the
latter, what should we do with IPC? Since you've started this thread, I'd
like to see the answers ;-) Or at least thoughts/comments...
I never worked with IPC, so I don't think I can judge that. Is it used
a lot?

As for 1.5 via TCP/IP, my personal preference would be:

- \port syntax, if not defined:
- fb_db in services file, if not defined:
- 3050

Why in this order?

1) if you do not use a \port, you assume default or defined port
2) if not found in services file, you assume default port, which
still is 3050

So, if people install next to IB, or use multiple Fbs in some kind
of weird environment, it's pretty easy for them to:
- override default 3050 (simply by editting services file)
- select different (non default) ports by adding the \port syntax

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
Nando Dessena
2003-12-02 08:21:00 UTC
Permalink
Martijn et al,

MT> "fbclient.conf" would perhaps be better?

I think so, but I guess not at this stage?

There are other things the client library reads from firebird.conf, as
Dmitry has pointed out. If I had a vote, I'd cast it for using
firebird.conf in 1.5 (with the fix Dmitry has done) and research new
paths for 1.6+.

Ciao
--
Nando mailto:***@dedonline.com
Bjoern Reimer
2003-12-02 07:40:06 UTC
Permalink
Hello

MT> I'm surprised that I - apparently - am pretty much the only one
MT> that sees this as a problem. Is there anyone out there who thinks
MT> that the client should NOT read firebird.conf to find it's default
MT> port? (let alone, disable all others).

MT> I say: the client should use the port defined by "fb_db" in the
MT> "services" file, use 3050 by default, or use the connect string.
MT> That's it. That's all there is to it.

You're right, Martijn!

The client might use the port form firebird.conf as second choice, but
of course the connection string should win the race!


Bj=F6rn

--=20
Bj=F6rn Reimer -- RRZE
Tel: +49-9131 - 85-27809
Fax: +49-9131 - 302941
Martensstr. 1 / 2.021
D - 9 1 0 5 8 Erlangen
www.rrze.uni-erlangen.de
Dimitry Sibiryakov
2003-12-03 02:11:01 UTC
Permalink
Post by Nando Dessena
Here's my understanding: as things stand currently(*), perhaps the sequence should be
1) connection string
2) fb_db in the services file
3) firebird.conf
4) default to 3050
I'd say that firebird.conf should be used before services for the
sake of "multi-instance" installations. This way client can get
instance-depended port number and other settings.

SY, Dimitry Sibiryakov.
Nando Dessena
2003-12-03 05:54:06 UTC
Permalink
Dimitry,

D> I'd say that firebird.conf should be used before services for the
D> sake of "multi-instance" installations. This way client can get
D> instance-depended port number and other settings.

I agree that's better.

1) connection string
2) firebird.conf
3) fb_db in the services file
4) default to 3050

Still I would like the client to abandon firebird.conf in a future
release.

Ciao
--
Nando mailto:***@dedonline.com
Paul Reeves
2003-12-03 06:49:04 UTC
Permalink
Post by Nando Dessena
Still I would like the client to abandon firebird.conf in a future
release.
So would I - but for different reasons. A client install of Firebird
presents users with a bewildering array of options in the .conf file, and
almost none of them are relevant to the client. It all needs to be broken
out into separate files according to install type and platform type.

The supplied .conf file should represent the type of installation as far as
possible. We shouldn't be putting Unix entries into the Win32 install and
vice-versa. Likewise, the commented example entries ought to reflect the
installation type. Too often we see examples that, say, are for Windows
Superserver, while the user has just installed Classic on Linux.

None of this is difficult to fix, but it is going to have to wait til after
1.5.


Paul
--
Paul Reeves
http://www.ibphoenix.com
Supporting users of Firebird and InterBase
Claudio Valderrama C.
2003-12-01 09:41:05 UTC
Permalink
Post by Arno Brinkman
Martijn,
Post by Martijn Tonies
Am I doing something wrong here? I thought that the parameter
should work on the SERVER only and not influence the client,
right?
No, it's designed to be used in both server and client. All
remote-subsystem settings are configurable for the client too.
Ability to specify a port number in the connection string is just an
extra way to do the same. Note that it's impossible to specify port
number in the connection string for Named Pipes and IPC/XNET - only
via firebird.conf.
Does this limitation come from the unfortunate election of solidus (/) as
the port separator? At the time I proposed either @ or #, the former was
taken for IPX/SPX and the latter apparently wasn't found attractive. But we
know don't support Netware protocol and it would be nice to disambiguate the
parsing of the connection string. Just my personal opinion.

C.
Thomas Steinmaurer
2003-12-02 07:21:04 UTC
Permalink
Post by Martijn Tonies
I'm surprised that I - apparently - am pretty much the only one
that sees this as a problem. Is there anyone out there who thinks
that the client should NOT read firebird.conf to find it's default
port? (let alone, disable all others).
I say: the client should use the port defined by "fb_db" in the
"services" file, use 3050 by default, or use the connect string.
That's it. That's all there is to it.
I guess I have to agree here with Martijn. So, the current
behaviour would mean, that we can't connect to a remote
server from a server that is listening on a different port?

For example. I'm sitting on the server with Firebird 1.5
running on port 3055. How can I connect from that server
to a remote server listening on port 3060?

It seems that specifying the port in the connect string
gets ignored, when RemoteServicePort is defined.

Or am I totally wrong here?


Thanks for any clarification.

Thomas
Dmitry Yemanov
2003-12-03 00:27:06 UTC
Permalink
Martijn,
Post by Martijn Tonies
I'm surprised that I - apparently - am pretty much the only one
that sees this as a problem. Is there anyone out there who thinks
that the client should NOT read firebird.conf to find it's default
port? (let alone, disable all others).
I say: the client should use the port defined by "fb_db" in the
"services" file, use 3050 by default, or use the connect string.
That's it. That's all there is to it.
The connection string must override any other settings. Currently it's not
the case and this is a bug. I already have it fixed, but want to perform
some additional testing before committing.

As for the firebird.conf, there was an intention to use it on the client
side, to have all remote settings to be configured by default (for all
connections). But since both TCP/IP and NamedPipe ports can be specified in
the connection string, probably this idea isn't so useful. Okay, I see no
problems ignoring remote settings on the client side. But what about IPC
connections? If you change the memory map name (e.g. for compatibility with
IB6), you won't be able to connect locally from fbclient.dll. Should the
client IPC code use firebird.conf or not?


Dmitry
Loading...