PDA

View Full Version : Dedicated Server Workaround



phos4us
05-02-2018, 07:39
Though Elmo touches on the -selectds launch function at the following link, it doesn't seem to be widely understood. http://forum.projectcarsgame.com/showthread.php?55698-Troubleshooting-Project-CARS-2-Dedicated-Server&p=1432481&viewfull=1#post1432481

Though based on anecdotal evidence, I believe the -selectds option gets around all of the major bugs/issues plaguing dedicated servers right now, and provides an easy to use method for setting up dedicated server sessions. I have used it for several months and have yet to see a weather or live track sync problem for a variety of weather or time of day transitions and multiclass racing. The server seems more stable than using the standard config and rotate files and disconnects are rare. The catch is that this procedure doesn't work for a rotating server and the -selectds launch method overwrites your ability to set up p2p sessions. Applets and API interfaces are not necessary with this method and will only induce issues.

The procedure is as follows:

1) Setup your server.config file like the one in the following link. Replace the server and admin passwords, names, and the max number of players for your server (everything I have bookended with **). These changes will disable the rotate file and give server control to the host.
https://drive.google.com/open?id=1bHbOMQck-q00Qi1jITLzCxBclJofcn_d

2) In Steam, open up the PC2 properties, select launch options, and type -selectds into the field. Seperate this entry from other entries with a space.

The remaining steps apply to each session you want to set up:

3) Make sure to update "GridSize" and "MaxPlayers" in the server.cfg file to the maximum allowed for the track you intend to run. You will induce errors if you try to run a track with smaller capacity than your config file.

4) Restart the game if you have played in any other online lobbies in this session. This is important. It appears that players can carry weather with them into another online session from a previous session.

5) Open the "create online event" menu and configure the lobby as desired. I recommend that the password for the lobby match the config file, though the config file seems to have precedence. All sessions will take place on the date selected for the race, but you can set qualifying and practice session times for after the race time without inducing errors.

6) Select "Start"

5) instead of launching a lobby as P2P, a menu of all active dedicated servers will appear. Choose your server from the list and enter the password from the config file. If your server doesn't show up, refresh the list several times. If that doesn't work, restart your server and restart the game. Repeat until your server appears.

6) Your dedicated server lobby will open as configured.

7) Important-every player who joins must do so from a fresh game session if they have played in any other online lobbies or they risk bringing the weather from that lobby with them (but only for them). This is a known issue with weather failing to sync across player sessions, particularly in p2p lobbies. Players can bring weather with them. Patch 4 is supposed to have a fix for this, but it seems to be avoidable with this workaround.

8) Enjoy

I can't stress enough the importance of starting/joining the server from a fresh game session as this alone seems to cause most of the syncing problems. This method allows anyone to setup a server session without needing admin rights to the server, provided the server is running and not timed-out.

rocho
06-02-2018, 00:37
Sorry to say this, but I think that after so many steps necessary for a dedicated server to work, the step 8 is impossible.

phos4us
06-02-2018, 03:40
Sorry to say this, but I think that after so many steps necessary for a dedicated server to work, the step 8 is impossible.

Some folks never pass up an opportunity to whinge I guess. I literally explained how to make it work with a method that is easier than setting up a server in any of the other traditional methods. At this point all you have to do is copy a file onto your server and change 3-ish fields, insert one option to your launch options, and update 2 numbers before you start a session on a track with a capacity less than 32. That's about as easy as setting up a dedicated server gets. If you can't get your participants to take the easy step of restarting the game before entering a dedicated session, then you need to find a better crowd to race with.

Apologies for eliminating something to complain about. Maybe try complaining about SMS failing to understand the customer and clearly/timely communicating how to get PC2 to work properly when the feature was released with patch 3? Hopefully that replenishes your bundle of grievances.

Drizute
06-02-2018, 16:17
Aaaah but thats Sooooo HAaaarrrd, cant you just set it up for me so I dont have to do anything, and it just works and I dont have to change anything and it doesn't cost money and wont break and is a single button that pushes itself coz me actually having to get off my ass and push said button may tax me beyond the control of the xanax coma im in........

Go get im Phos......

rocho
06-02-2018, 16:26
Some folks never pass up an opportunity to whinge I guess. I literally explained how to make it work with a method that is easier than setting up a server in any of the other traditional methods. At this point all you have to do is copy a file onto your server and change 3-ish fields, insert one option to your launch options, and update 2 numbers before you start a session on a track with a capacity less than 32. That's about as easy as setting up a dedicated server gets. If you can't get your participants to take the easy step of restarting the game before entering a dedicated session, then you need to find a better crowd to race with.

Apologies for eliminating something to complain about. Maybe try complaining about SMS failing to understand the customer and clearly/timely communicating how to get PC2 to work properly when the feature was released with patch 3? Hopefully that replenishes your bundle of grievances.
I sincerely thank you for your effort to simplify setting DS sessions, but I still think that the whole process should be easier and error-free. Don't take it as something personal.

F1_Racer68
06-02-2018, 17:22
Mods, can this please be stickied?

@Phos4us, thanks for taking the time to post this.

GTsimms
06-02-2018, 18:08
Mods, can this please be stickied?

@Phos4us, thanks for taking the time to post this.

done

neslane
06-02-2018, 22:02
Oh man, thanks... this is saving our lifes! :D

One question to the dedicated system: If i create the session with the DS i am becoming the admin, because i "connected" first i think. If i leave the server someone other becomes admin. Is there a workaround for this? Closing the DS and create a new session is working (Thanks, no more open lobbies and everyone must leave etc......)

F1_Racer68
07-02-2018, 04:58
Thanks much @GTsimms

phos4us
10-02-2018, 07:44
Patch 1.4 seems to have killed access to my server using this or any other configuration method. I get kicked anytime I try to join or establish my server. I will continue to troubleshoot and update here when I figure out what is going on.

hophans
10-02-2018, 11:35
Patch 1.4 seems to have killed access to my server using this or any other configuration method. I get kicked anytime I try to join or establish my server. I will continue to troubleshoot and update here when I figure out what is going on.

Please respond to this as it seems all linux servers are rendered inaccessible and it might be a good idea to get the attention of sms asap.

http://forum.projectcarsgame.com/showthread.php?60851-DS-patch-4-forced-whitelist

In my case my whole racing group is closed down for racing till this is solved, and being fairly angry i try to refrain from complaining.

MortICi
10-02-2018, 21:18
Patch 1.4 seems to have killed access to my server using this or any other configuration method. I get kicked anytime I try to join or establish my server. I will continue to troubleshoot and update here when I figure out what is going on.

This might be a port/nat issue. I am gonna try to fire up a Kubuntu VM and see if i can repro.

I take it the server is running just not accepting connections? Do you see it in the server list? If so what is the server name?

Also for fixes to the configs (weather/multi-class) see my thread for info.

hophans
10-02-2018, 22:05
Let me make it plain;

The server(s) is not behind a firewall, it uses ip tables to filter traffic.
i have tested most thinkable scenarios but debug wont show any fault.
in the end i am stuck with multiple DS' over multiple servers that are not working from a single update.

it is 5 servers that went from a working state to a non working state in a simple update

MortICi
10-02-2018, 23:29
Let me make it plain;

The server(s) is not behind a firewall, it uses ip tables to filter traffic.
i have tested most thinkable scenarios but debug wont show any fault.
in the end i am stuck with multiple DS' over multiple servers that are not working from a single update.

it is 5 servers that went from a working state to a non working state in a simple update

I think Visceral has a CentOS ded server up and running, he states he is not having any issues with connectivity.

Does the server show in server list for you?
Does the server show in server list for others?
Can you join the server or does the connection get rejected?
Are the servers password protected?
Could be a permissions problem with one of the data_*.json files not being able to be written to due to permission maybe being reset? I would double check permissions on files for the DS to make sure it can write/read from all necessary locations.

Would you mind posting your server.cfg and possibly rotation_config.json file (remove passwords/usernames first). Either paste them in code block here or attach them for download, I will spin 'em up on my Windows DS and see if they work. If they work I will spin up a quick *nix VM (Kubuntu or Fedora) and try to setup a quick DS and see if it works for me.

phos4us
12-02-2018, 07:02
Does the server show in server list for you? Yes
Does the server show in server list for others? Yes
Can you join the server or does the connection get rejected? Connection gets rejected for any user
Are the servers password protected? Yes

This thread has the link to my previous config file. Using any config file existing on the server prior to patch 4 or any file edited before uploading to the server results in the server rejecting anyone who joins. Using your files or the default config file but edited on the server web interface allows me access to the server, but I get kicked within 10 minutes of being on and nobody else can see the server in the list.

MortICi
13-02-2018, 01:24
Does the server show in server list for you? Yes
Does the server show in server list for others? Yes
Can you join the server or does the connection get rejected? Connection gets rejected for any user
Are the servers password protected? Yes

This thread has the link to my previous config file. Using any config file existing on the server prior to patch 4 or any file edited before uploading to the server results in the server rejecting anyone who joins. Using your files or the default config file but edited on the server web interface allows me access to the server, but I get kicked within 10 minutes of being on and nobody else can see the server in the list.

http://forum.projectcarsgame.com/showthread.php?60851-DS-patch-4-Linux-server-unjoinable&p=1474742&viewfull=1#post1474742

Victor responded, you have to make sure all ports listed in the server.cfg (not just the steam ones) are open. If you are having a host run your servers (like he mentions EliteGamers) then its an issue on their end, they need to open the ports, you can try his trick for moving ports in the config file restarting DS and seeing if connectivity works.

Charger
13-02-2018, 02:13
Don't know why this is stickied, been using it for months, yes it creates a clean server but does not alleviate the bugs that Hophans has as he has been using it also, it also does not fix the lag and bad pings that are present in the DS at the moment.

We have been using -selectds mixed with setting dedi as a DMZ for months and it has been working perfectly, it maybe also proves us using DMZ has made it smoother as now there are port problems that are creating the fluctuating ping and lag due to the fact the dedi has been adapted to work better behind NAT's but it has had the opposite effect even using DMZ.

Using DMZ in theory opens all ports so this isn't the issue, there is a major issue with the DS at the moment and no tweaks will fix it, you are pissing in the wind, anyone who says that their DS is lag free at the moment or has no higher pings than usual is telling porkies.

phos4us
13-02-2018, 04:38
Don't know why this is stickied, been using it for months, yes it creates a clean server but does not alleviate the bugs that Hophans has as he has been using it also, it also does not fix the lag and bad pings that are present in the DS at the moment.

We have been using -selectds mixed with setting dedi as a DMZ for months and it has been working perfectly, it maybe also proves us using DMZ has made it smoother as now there are port problems that are creating the fluctuating ping and lag due to the fact the dedi has been adapted to work better behind NAT's but it has had the opposite effect even using DMZ.

Using DMZ in theory opens all ports so this isn't the issue, there is a major issue with the DS at the moment and no tweaks will fix it, you are pissing in the wind, anyone who says that their DS is lag free at the moment or has no higher pings than usual is telling porkies.

Look at the brain on Brad!

Not sure what your point is. Guess you missed that this was stickied before patch 1.4 dropped and the subsequent comments on this thread and hophans' thread regarding the issues caused by patch 1.4. I made the original post due to the lack of clarity in the published instructions. I know several leagues that weren't using -selectds and there is at least one commenter here who was helped by the OP prior to the patch. Furthermore, where did anyone make these grand claims regarding ping times? I simply stated that the server was stable and we suffered none of the disconnect issues we faced with using the full extent of the config files or P2P.

Charger
13-02-2018, 06:25
Look at the brain on Brad!

Not sure what your point is. Guess you missed that this was stickied before patch 1.4 dropped and the subsequent comments on this thread and hophans' thread regarding the issues caused by patch 1.4. I made the original post due to the lack of clarity in the published instructions. I know several leagues that weren't using -selectds and there is at least one commenter here who was helped by the OP prior to the patch. Furthermore, where did anyone make these grand claims regarding ping times? I simply stated that the server was stable and we suffered none of the disconnect issues we faced with using the full extent of the config files or P2P.

It also didn't make the joining stutter better pre patch, nor weather problems, disconnect problems we sorted with DMZ, but yes the other issues are after your post, I just can't believe that nobody knew about this until this month?

hophans
13-02-2018, 08:12
Random guessing at a bug is not the way to go. i have spend more hours than a random workday to debug the DS connection lobby issue before i found the cause and it ended up being something i would never have thought.
I am happy that people are so willing to help but just asking for random specs helps no one.

MortICi
14-02-2018, 21:09
It also didn't make the joining stutter better pre patch, nor weather problems, disconnect problems we sorted with DMZ, but yes the other issues are after your post, I just can't believe that nobody knew about this until this month?

I think weather and multi-class is all fixed (see my thread stickied above this one). I didn't think about the DMZ vs NAT configuration though.

I am not running a server behind a DMZ at the moment, I will test latency issues tonight (1Gbps fibre) connection, if there is a lag its a binary issue and something is not configured right.

Krobo
02-03-2018, 20:21
HI all < I asked this in the 3rd party apps,API thread but it sat for weeks with no reply so Im asking here to see if any of you guys might know the answer ! ;-)

I have a question regarding the on going collection of results that the data file stores ..

so far it has every thing ever done on the server from day 1 tons of results etc..

I see this line in the config: // Number of gameplay events stored on the server. Oldest ones will be discarded once the game logs more.
eventsLogSize : 10000

If I change this to a lower number will it at some point only store the selected amount ?
Ideally I would like to clear it after every Race/P/Q session so we have only the latest results stored ,as it is now the file is so big I need to compress it to download it from the server files ..lol
we are on a rented rack service DS ..
Thanks in advance ;-)

F1_Racer68
03-03-2018, 01:09
HI all < I asked this in the 3rd party apps,API thread but it sat for weeks with no reply so Im asking here to see if any of you guys might know the answer ! ;-)

I have a question regarding the on going collection of results that the data file stores ..

so far it has every thing ever done on the server from day 1 tons of results etc..

I see this line in the config: // Number of gameplay events stored on the server. Oldest ones will be discarded once the game logs more.
eventsLogSize : 10000

If I change this to a lower number will it at some point only store the selected amount ?
Ideally I would like to clear it after every Race/P/Q session so we have only the latest results stored ,as it is now the file is so big I need to compress it to download it from the server files ..lol
we are on a rented rack service DS ..
Thanks in advance ;-)

Easiest thing to do is delete the data file and then restart the DS. Simply deleting it doesn't work as there is a cached copy of it that reappears.

On a related note, have you had success with getting stats fornthe actual RACE session? I have only ever gotten stats data for Practice and Qualifying (yes, all sessions are configured to gather data).

Krobo
03-03-2018, 20:49
Easiest thing to do is delete the data file and then restart the DS. Simply deleting it doesn't work as there is a cached copy of it that reappears.

On a related note, have you had success with getting stats fornthe actual RACE session? I have only ever gotten stats data for Practice and Qualifying (yes, all sessions are configured to gather data).

OK so delete the data file & then restart the server .. I will try this ! Maybe I will test the eventsLogSize : 10000 & try adjusting it to like 500 & see if it keeps it small enough to not need to compress it !

As for the simresults YES we are getting all data now thanks to couffi' find in the server files . the fix is in this thread (http://forum.projectcarsgame.com/showthread.php?56405-No-Race-Results-in-sms_stats_data-json) ..after making thes edits we have all the data !

Emilio Sachs
11-03-2018, 11:13
Hello everyone,

I do thank a lot phos4us for his clear explanations, time and help on how to run well the dedicated server! It's amazing to see that there is no official sources from SMS in that regard. As for me, I can now run the dedicated server very finely at the same time I learnt more about settings!...

Though, I have a question and by advance, I thank any person who can bring any answer here:

It looks impossible to send invits to any steam friends from the dedicated server itself so that they can join it. So far, they have to find the lobby name by themselves through the online mode of the game to enter in.

Indeed, the"invit link" that usually exists inside a classic lobby on the upper right part of the page is missing here. Also, guys cannot join from my personal steam page too (server not responding); the same if I press maj + tab to open the overlay, looking for steam friend list, sending request to invit.

Is it really impossible to send invits?! Any reason for that missing command into the dedicated server?, cause it can cause real inconvenience...

Regards

F1_Racer68
12-03-2018, 12:03
Hello everyone,

I do thank a lot phos4us for his clear explanations, time and help on how to run well the dedicated server! It's amazing to see that there is no official sources from SMS in that regard. As for me, I can now run the dedicated server very finely at the same time I learnt more about settings!...

Though, I have a question and by advance, I thank any person who can bring any answer here:

It looks impossible to send invits to any steam friends from the dedicated server itself so that they can join it. So far, they have to find the lobby name by themselves through the online mode of the game to enter in.

Indeed, the"invit link" that usually exists inside a classic lobby on the upper right part of the page is missing here. Also, guys cannot join from my personal steam page too (server not responding); the same if I press maj + tab to open the overlay, looking for steam friend list, sending request to invit.

Is it really impossible to send invits?! Any reason for that missing command into the dedicated server?, cause it can cause real inconvenience...

Regards

The inability to send invites, or join from.friends list is a.known and documented "issue". I say "issue" because the reasoning behind this has never been explained. It is still unclear if this is intentional or unintentional.

It did work in pCARS1, but has never worked in pCARS2.

Unfortunately, joining from the in game browser is the only option for sessions run on the dedicated servers.

couffi
09-06-2018, 13:15
Can you help me .. one of my team mate can't see all the dedicated servers .. and he can't see ours..
He can see 60 dedicated lobbies in game, i can see 80..
We follow this post : http://forum.projectcarsgame.com/showthread.php?55698-Troubleshooting-Project-CARS-2-Dedicated-Server
But didn't help ..

We also open the firewall on his router ..
We put his computer into a DMZ ..
No success ..

If he connect his computer with mobile data on usb tethering he can see all the servers, so the problems didn't come from his computer or steam config..

His made a call to IPS, but they didn't see why, or they can't open TCP/UDP ports...

Help would be appreciated.. thx

F1_Racer68
09-06-2018, 14:03
Can you help me .. one of my team mate can't see all the dedicated servers .. and he can't see ours..
We follow this post : http://forum.projectcarsgame.com/showthread.php?55698-Troubleshooting-Project-CARS-2-Dedicated-Server

But didn't help ..
We open the firewall on his router ..
We put his computer into a DMZ ..
No success ..
If he connect his computer with mobile data on usb tethering he can see all the servers, so the problems didn't come from his computer or steam config..
His made a call to IPS, but they didn't see why, or they can't open TCP/UDP ports...
Help would be appreciated.. thx

One thing to double check... Make sure his online license level matches what the server is configured for. If the server is set to a higher license then he has he will not see it.

couffi
09-06-2018, 14:07
One thing to double check... Make sure his online license level matches what the server is configured for. If the server is set to a higher license then he has he will not see it.

Not bad ! But servers run without active licence, and he have a hight ranking ( one of the best driver .. )
But maybe a bug with that feature ..

couffi
09-06-2018, 16:47
So.. I tell him to enter the full name of the server in the filter section..
And it works !
He only see this one.. but able to see it now ! So strange

mino22
09-02-2019, 13:19
Is there a workaround for this? Closing the DS and create a new session is working