Jump to content

Weird issue with Apache & Source Dedicated Server (Ubuntu Server)

Apologies if this turns into an essay.

 

I'm trying to set up a dedicated server for a group of mates so we can all have a game together like we used to. So I have the game server running, that took me less than 10 minutes and went without issue but as a bit of a learning project I decided to try and get a stats tracker working. Now to be upfront, getting this thing running is 100% unnecessary however I feel like its a bit of a personal fight now since I spent 8 hours yesterday fighting with various issues, I overcome all of them and the thing still doesn't work.

 

I should add that I know this is possible to get working, I've found post from a few months ago from people still running this stack.

 

I'll explain how it works and my process before I go into details about the issue.

 

Its all built on Ubuntu Server running as a VM on my NAS. The dedicated server runs as a process, that's working perfectly and has a plugin for logging the server actions (kills, deaths, point captures, bombs planted etc etc) it needs to a separate file (that as far as I can tell) is also working perfectly. These logs get reported to port 27500 by the server using an additional cvar and the server logs show its reporting to port 27500.

 

The next layer is a Perl script that runs a daemon on the server and listens to port 27500 for the logs. Again as far as I can tell this is also working perfectly, I've added the script to crontab to run once every 5 minutes (as instructed by the installation guide) to make sure it hasn't stopped running. The server isn't logging any issues with this AFAICT.

 

The final layer is where all my issues started. Got Apache, mySQL & PHP installed, all configured and I even got everything secured using certbot. PhpMyAdmin was my next step which took me over an hour, not because its particularly difficult but because I didn't know you had to disable mySQLs secure password plugin BEFORE making an account and assigning permissions otherwise PhpMyAdmin cannot connect, and that's also working great.

 

Next I created a User & DB for the web interface, assigned DB permissions and tried to import the SQL tables. This is where things got pretty rough and I spent 2 hours bug hunting and Google trawling but I even found out why. The SQL table file was written for an older version of mySQL and I had to edit a config file to enable a legacy feature. Once I did that all tables imported correctly.

 

I then installed the web interface files onto Apache, added the DB info to the config.php and it seemed like everything was good to go. Then I discovered another issue that took me another hour to fix. Again the PHP for the web interface was written for an older version of PHP and some of the pages didn't work correctly, I found some kind person had fixed the relevant files and uploaded them the github and after installing them bam, my mission was complete, or so I thought.

 

For whatever reason the web interface cannot see that the server is running, at all. I've tried using 127.0.0.1 (you cannot use localhost, the site will only accept an IP), 192.168.1.44 - the IP of the server on my network, 192.168.1.1 - my router (I know this won't but but I was frustrated) and even my current public IP which is reported by the server. The site accepts the details then goes to the server page and shows that the server is down.

 

I'm really frustrated with the entire thing now, since everything is literally on the same box, UFW is disabled, my NAS firewall is disabled and my Router firewall is forwarding the server I see no reason why Apache cannot see SRCDS is running?

 

Help.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

18 minutes ago, Master Disaster said:

For whatever reason the web interface cannot see that the server is running, at all. I've tried using 127.0.0.1 (you cannot use localhost, the site will only accept an IP), 192.168.1.44 - the IP of the server on my network, 192.168.1.1 - my router (I know this won't but but I was frustrated) and even my current public IP which is reported by the server. The site accepts the details then goes to the server page and shows that the server is down.

 

I'm really frustrated with the entire thing now, since everything is literally on the same box, UFW is disabled, my NAS firewall is disabled and my Router firewall is forwarding the server I see no reason why Apache cannot see SRCDS is running?

Quick question: do you have NAT-reflection enabled on the router and you have verified it's working?

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

23 minutes ago, WereCatf said:

Quick question: do you have NAT-reflection enabled on the router and you have verified it's working?

Honestly I have no idea, this is the first time i've heard of that at all.

 

I go do some Googling 🙂

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×