Failed to connect to server (setup)

moksanity
Posts: 5
Joined: Wed Apr 11, 2018 5:23 pm

Failed to connect to server (setup)

Post by moksanity » Wed Apr 11, 2018 5:33 pm

So, this is my first time using a lot of these programs, so I have no doubt I messed up somewhere along the line, but I'm having trouble figuring out exactly where. I'm getting an error when I run Windower to try and launch, getting the error "Failed to connect to server!" from xiloader. I've attached a screenshot of the error and a screenshot of my xiloader settings. Any help pointing me in the right direction would be appreciated. If you need any more info or screenshots let me know and I'll grab em. Thanks!

Image

Image

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: Failed to connect to server (setup)

Post by whasf » Wed Apr 11, 2018 8:00 pm

i'm guessing a firewall is blocking, or the lobby (connect) server isn't running?
-- Whasf

moksanity
Posts: 5
Joined: Wed Apr 11, 2018 5:23 pm

Re: Failed to connect to server (setup)

Post by moksanity » Wed Apr 11, 2018 8:18 pm

How can I tell if the server is running? I've run Connect/Game/Search as admin. They flash on screen for a moment and then go away. I sort of get the impression that means they aren't running, but I also don't know if that just means they're running in the background. Do I need to have another program open when I run them, or do they run independently?

Sorry, I'm brand new at this and I'm not sure what I'm looking for.

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: Failed to connect to server (setup)

Post by whasf » Wed Apr 11, 2018 9:41 pm

look at the log files they create in the logs folder, they shouldn't go away when you start them. That means something is wrong
-- Whasf

moksanity
Posts: 5
Joined: Wed Apr 11, 2018 5:23 pm

Re: Failed to connect to server (setup)

Post by moksanity » Wed Apr 11, 2018 9:46 pm

Okay, they're all returning the same error of "Unknown database 'dspdb'".

Sorry I'm a complete potato at this stuff, I really appreciate you taking time to help me out.

Avatarati
Posts: 53
Joined: Mon Jun 30, 2014 2:51 pm

Re: Failed to connect to server (setup)

Post by Avatarati » Thu Apr 12, 2018 12:33 am

Make sure MySQL is running.

If it's not, that's most likely your problem. Open Start -> MySQL Notifier. Then right click on the icon in the system tray, and select 'Start the MySQL Server'.

If it is running already, double-check your config files in the root directory of 'darkstar'. Make sure all files have the correct database name that you set up in MySQL (default is dspdb), the correct user/pass, and port (default is 3306 unless you specified another port during setup).

Hope this helps.

moksanity
Posts: 5
Joined: Wed Apr 11, 2018 5:23 pm

Re: Failed to connect to server (setup)

Post by moksanity » Thu Apr 12, 2018 3:51 am

Okay, I've verified MySQL is running. I have MySQL Workbench open and it says "dspdb" is Running.

All my conf files have the same text:

mysql_host: 127.0.0.1
mysql_port: 3306
mysql_login: root
mysql_password: <password>
mysql_database: dspdb

The first two (login and map servers) keep closing as soon as they open, but the search server remains open. However, it throws this at me:

[SQL] Unknown database 'dspdb'
[Error] cant connect
[SQL] Unknown database 'dspdb'
[SQL] DB error - MySQL server has gone away

I feel like I missed a big step somewhere along the way, but I went back over Building the Server twice now and am still getting the same results =/

Also, if it helps, under the darkstar\conf file path the folder and three config files all have a red ! over them, rather than a green check like the rest of the files. Unsure if that's important or not.

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: Failed to connect to server (setup)

Post by whasf » Thu Apr 12, 2018 7:49 am

It's not finding your database, either you didn't really name it "dspdb" or it doesn't exist at all.
-- Whasf

Avatarati
Posts: 53
Joined: Mon Jun 30, 2014 2:51 pm

Re: Failed to connect to server (setup)

Post by Avatarati » Thu Apr 12, 2018 2:13 pm

If you named it dspdb, and you have MySQL running, the only thing left I can think of is two things:

1) Did you import all sql files? There's a batch script in the setup guide you can use.

2) Are you running this locally or on a production server? Default IP is 127.0.0.1, which shouldn't be an issue if you're running this on the same PC as the client. If you're running it on a remote server, make sure to update zone_settings.sql with the correct external IP.

Also, firewall settings like whasf said. Make sure the appropriate ports are allowed through, both TCP and UDP side (also in guide).

moksanity
Posts: 5
Joined: Wed Apr 11, 2018 5:23 pm

Re: Failed to connect to server (setup)

Post by moksanity » Thu Apr 12, 2018 2:46 pm

I got it to work! In fact, I'm in game and playing right now! :)

So, you both were absolutely correct, I did not create a database. I was unaware I had to do it through the command line and missed that step entirely. I went back, created it, and everything went smoothly from there.

Thanks for helping me get my hands on some good old nostalgia. I appreciate all the help!

Post Reply