Issues with uoclient.cfg and possibly POL's handling of IP addresses/ports.

Bug reports and feature requests. New features can only be added to the current development version. Bug-fixes may be back-ported.

Current release: 099 / Current development: 100
Post Reply
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Issues with uoclient.cfg and possibly POL's handling of IP addresses/ports.

Post by Yukiko »

In the POL documentation for uoclient.cfg it states that uoclient.cfg is required to start and there can only one uoclient.cfg file present in the server.

Neither one of those things is true.

I removed, renamed actually, the only uoclient.cfg file present in my copy of the Modern Distro. I then launched POL and it started-up just fine.. It did not shut down and no warning was printed to the console. Obviously no listen port was printed to the console because there was no uoclient.cfg file of course. Also, obviously, with no uoclient.cfg file I could not log-in. In my never humble opinion POL should error out if this file is not present in the server.

The other issue is that the documentation clearly states that only one uoclient.cfg file is allowed, not recommended, not suggested but allowed. This also is not true. I have addressed this with both Turley and Nando. Turley explained that if it is changed now that it might break some shards that have more than one. Fair enough but not an adequate reason in my mind because it would be an easy fix for those few shards that it might break. All that would be needed is to consolidate the settings into one file. Nando's explanation was a better defense for not requiring only one instance of uoclient.cfg. He said that probably, because there are no active developers around from the days when uoclient.cfg was implemented, it was intended to be placed in packages set-up for different expansions. A good reason but if this is going to be the way it is then the documentation should be updated. Personally I think it is less confusing to have one uoclient.cfg file and have the different client's options in one place.

Tonight I decided to experiment with putting two (2) uoclient.cfg files in a server to see how it works. Here are the relevant settings from each file:

One was placed in /pol/config, the main config directory:

Code: Select all

Listener None
{
	Port			2593
	Encryption		none
	AOSResistances	0
}
The other lives in /pol/pkg/systems/accounts/config:

Code: Select all

Listener None
{
	Port		5003
	Encryption	None
	AOSResistances 0
}
Note they listen on different ports.

In my servers.cfg I have:

Code: Select all

GameServer	Distro01
{
    Name    Distro-Local-5003
    IP      127.0.0.1
    Port    5003
}

GameServer	Distro02
{
    Name    Distro-Local-2593
    IP      127.0.0.1
    Port    2593
}
Both ports are defined there as well.

POL only reported listening on port 5003:

Code: Select all

Game is active.
Listening for UO clients on port 5003 (encryption: 0,0x0,0x0)
Both "servers" showed-up in the server list but I was only able to login on port 5003 but not 2593.
So I did a little bit of experimenting and changed the IP to my LAN IP for the 2593 server and then I could login to both servers listed using either port. So I thought "maybe it's just a problem with the localhost IP." After all this would not be the first time Windows had a problem with its TCP/IP stack. I set both servers to my LAN IP and again I could only login on the client configured for port 5003. Just to be clear I used the actual IP address and not the "--lan--" setting.

Correct me if I am wrong but it is my understanding that the Internet Protocol allows multiple services to be able to access a machine on the same IP address using different ports. I do not know if this has to do with the "servers.cfg" part of POL or if it is a problem with the "uoclient.cfg" part of POL or both but this appears to be an issue, especially if someone was to set-up a login server with POL where they might be running two or more shards, say a live shard and a test shard.

This does bring-up a question with having more than one uoclient.cfg file. Because developers can have a player method script defined in that file, and there can only be one method script defined in the file, how would it work if I defined a different method script in each uoclient.cfg file or would it work at all?
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

More issues with uoclient.cfg and possibly POL's handling of IP addresses/ports.

Post by Yukiko »

Also, under Explanation in the uoclient documentation it states the Listener section is optional. This appears to be false as well.

I did some further testing and found another issue. The first thing I did was went back to a single uoclient.cfg file with the following setting for Listener:

Code: Select all

Listener None
{
	Port		5003
	Encryption	None
	AOSResistances 0
}
Obviously I was able to log-in using that port but oddly enough I was shown the other "server" configured for port 2593 in my servers.cfg file and could log-in through that one as well. However when I commented out the listener section I could not log-in. I suppose I should be clear on one point in both of my posts. By "log-in", I specifically mean I did not get to the shard selection screen. The client gave me the generic message "Couldn't connect to Ultima Online. Please try again in a few minutes."

The first thing I do not understand is why am I being shown a "server" defined with a different port than I am using to log-in. The second, and in my mind more puzzling thing is, as I am specifically setting my client port to 5003 in the client file login.cfg shouldn't POL prevent me from logging-in to the "server" defined with port 2593? To me, and I am only moderately familiar with port handling and TCP/IP protocol, this seems wrong.
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Issues with uoclient.cfg and possibly POL's handling of IP addresses/ports.

Post by Yukiko »

Regarding the Listener section being optional post above. If you define Listeners in uoclient.cfg you must set ListenPort in pol.cfg to 0. No problem. All is right with the world, at least as far as POL is concerned.

If you disable all listeners then you are supposed to define a listen port in pol.cfg.
From pol.cfg:

Code: Select all

#
# ListenPort - integer TCP port
# Default 0
# This is an optional setting.
#
ListenPort=0
If you define a ListenPort in pol.cfg you get this error upon launching POL:

Code: Select all

+----------------------------------------------------------------------+
| Option ListenPort in pol.cfg is now only for non-multithreading      |
| systems. If you still haven't done it, please read the documentation |
| on how to create a uoclients.cfg.                                    |
+----------------------------------------------------------------------+


Server Shutdown: starting client listeners
Initiating POL Cleanup....
Remaining UObjects: 1
Remaining Items: 1
Execution aborted due to: ListenPort is no longer used for multithreading programs (Multithread == 1).
I have to ask this question. Is there anyone running a POL shard using a non-multithread processor anymore. Even I don't run POL on a single thread system and I do not have the money to buy new systems. The next question I have to ask is; Why is there no warning in the documentation for pol.cfg about setting a value other than zero (0) for ListenPort will only work for single threaded hardware???

I contend that
1. ListenPort in pol.cfg is probably an obsolete setting.
2. Defining Listeners in uoclient.cfg is no longer optional.
3. Something is weird that I am able to log-in to POL on port 5003 and select a server in the servers list that is defined in servers.cfg for port 2593.

That last one could be my own misunderstanding of how POL logs someone in to a server but it just seems counter productive to even designate different ports in servers.cfg.
Post Reply