tf2td / towerdefense

Tower defense mod for Team Fortress 2
GNU General Public License v3.0
25 stars 10 forks source link

Infinite Initializing #5

Closed cph30075 closed 1 year ago

cph30075 commented 5 years ago

Hi, I managed to get the TF2 Attributes plugin working after a bit of elbow grease and the rest seem to work. After joining it just tells me to wait a moment while it initializes seemingly forever. I'm assuming the problem is the MariaDB server, as that is by far the most likely thing as I have absolutely no experience with databases. Thanks for any help.

Here's the log: l0617019.log

Here's a screenshot of the HeidiSQL GUI of the DB: mysql

HurpDurp commented 5 years ago

Have you ensured the tower defense config is being executed? That also doesn't appear to be the full server log, you should see quite a bit of tower defense debug messages (sourcemod also doesn't look like it's loaded).

cph30075 commented 5 years ago

I think it's running, though I don't know how to verify that. I think I accidentally used the wrong location for the logs, should I be picking them from tf/addons/sourcemod/logs? Sourcemod is definitely running, I've tested by punching in "sm plugins list"

HurpDurp commented 5 years ago

Are you seeing any console output from tower defense? There should be a [TD] prefix. sm plugins list should also show the tower defense plugin, and if it's loaded or not.

cph30075 commented 5 years ago

Yeah, [TD] prefixes show and the Tower Defense plugin is loaded.

HurpDurp commented 5 years ago

Can you grab all the td prefixed logs and paste them here?

cph30075 commented 5 years ago

The logs in both Sourcemod and tf do not show any [TD] prefixed stuff, so I just started my server up and copy+pasted the logs starting from when the [TD] prefix showed up. Hope it's enough. After looking at it, I'm starting to think that it's failing at "Query failed at Database_AddServer..." but that's just me.

https://pastebin.com/bzLMqeqp

Also, I've decided to add the databases.cfg just in case, minus the passwords of course. The database is hosted on the hosting machine itself, hence the localhost instead of an IP or website.

https://pastebin.com/JTcZjdV2

HurpDurp commented 5 years ago

Yep, that would indicate a database issue. Towerdefense was written for MySQL and it looks like the schema isn't directly compatible with mariadb -- you could try this configuration change here: https://www.farbeyondcode.com/Solution-for-MariaDB-Field--xxx--doesn-t-have-a-default-value-5-2720.html

You might also consider switching to mysql as there might be a few other mariadb quirks that prevent the plugin from loading.

On Wed, Jun 19, 2019, 11:33 AM Connor Hawkins notifications@github.com wrote:

The logs in both Sourcemod and tf do not show any [TD] prefixed stuff, so I just started my server up and copy+pasted the logs starting from when the [TD] prefix showed up. Hope it's enough. After looking at it, I'm starting to think that it's failing at "Query failed at Database_AddServer..." but that's just me.

https://pastebin.com/bzLMqeqp

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tf2td/towerdefense/issues/5?email_source=notifications&email_token=ABM2MQCHHK6TUQJIWGMKQIDP3JNV7A5CNFSM4HY3SML2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYCN5SA#issuecomment-503635656, or mute the thread https://github.com/notifications/unsubscribe-auth/ABM2MQGRTRTYC2XORGG3XKTP3JNV7ANCNFSM4HY3SMLQ .

cph30075 commented 5 years ago

Yeah, looks like I'll have to switch to MySQL, I punched in the listed command into my.ini, but when I started the server it still wouldn't work. I'll report back my findings once I switch to MySQL

cph30075 commented 5 years ago

It appears to sorta work. The only issue(s) is that I can join any team and go any class with any weapon (i.e. I'm not normally restricted to just the stock shotty and pistol as engineer). I can also freely build a dispenser and a teleporter (don't remember if you normally can). No metal packs spawn and I cannot start the game; the red start button does not go away and the server does not acknowledge me shooting it at all. I also cannot buy any "towers" upon further investigation.

Here's the server log: https://pastebin.com/qUpV7rrg

UPDATE: Just noticed this in the log when starting the server. It appears to not be able to load the Tower Defense plugin, citing something about upgrading the MySQL server then appears to load it again, but successfully this time

[SM] Plugin towerdefense.smx failed to reload: [1251]: Client does not support authentication protocol requested by server; consider upgrading MySQL client. [SM] Plugin towerdefense.smx reloaded successfully.

HurpDurp commented 5 years ago

So the plugin works after the reload? What version of mysql server did you install?

cph30075 commented 5 years ago

Most recent one via the Oracle download page here: https://dev.mysql.com/downloads/

Downloaded the community release for Windows 64 bit.

HurpDurp commented 5 years ago

Interesting... You could try an older MySQL version, otherwise I'll try getting my development server back up and running next week and get back to you.

It's possible that the newer version of MySQL is incompatible with the sourcemod db driver, however that seems unlikely as I don't see any other reports of it not working.

On Wed, Jun 19, 2019, 9:54 PM Connor Hawkins notifications@github.com wrote:

Most recent one via the Oracle download page here: https://dev.mysql.com/downloads/

Downloaded the community release for Windows 64 bit.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tf2td/towerdefense/issues/5?email_source=notifications&email_token=ABM2MQA3ABIMCO7UY7MNVBDP3LWNTA5CNFSM4HY3SML2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYD3FJY#issuecomment-503820967, or mute the thread https://github.com/notifications/unsubscribe-auth/ABM2MQGCXGLS7UVOBF2F4KTP3LWNTANCNFSM4HY3SMLQ .

cph30075 commented 5 years ago

Strange. I'll see if I can get an old version but it's a bit of a pain at this point. I'll report back if the older version works assuming I actually find the time to get it installed lol.

rumblefrog commented 5 years ago

The latest master schema versions seem to work fine for 10.1.40-MariaDB.

https://github.com/tf2td/towerdefense/blob/961246239fa9916e89c25a449e9cabf4c50dfb59/README.md#L16

Although, it's missing the host table within the dump.

Also td_firstone_v11b has map id of 2, but within the metal pack table, there are no coordinates for that map. I just duplicated td_firstone_v11 metal pack coordinates.

Schema patched for v11b: https://github.com/rumblefrog/towerdefense/blob/8288279faf5371fa5dcc5daaf96274683c845bce/schema/tf2td.sql#L97-L122

cph30075 commented 5 years ago

I already switched from MariaDB to MySQL, but it still doesn't work - I'll report back once I insert your patch and see if anything else starts working.

rumblefrog commented 5 years ago

Sure, let me know if it works.

@HurpDurp , any chance you have the host table schema?

HurpDurp commented 5 years ago

I think I do - though I won't have access to my PC until Monday to check. It shouldn't be too hard to rebuild in any case.

On Thu, Jun 20, 2019, 10:46 PM RumbleFrog notifications@github.com wrote:

Sure, let me know if it works.

@HurpDurp https://github.com/HurpDurp , any chance you have the host table schema?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tf2td/towerdefense/issues/5?email_source=notifications&email_token=ABM2MQEVPXEUBFYBIPFLK7TP3RFJBA5CNFSM4HY3SML2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYHKZZQ#issuecomment-504278246, or mute the thread https://github.com/notifications/unsubscribe-auth/ABM2MQBTCNX6SLTF7LN4HZDP3RFJBANCNFSM4HY3SMLQ .

HurpDurp commented 5 years ago

I've updated the schema to remove references to the host table, it is no longer used since I removed the server verification code from the plugin a while back. I started up a new server with the schema and things were working once I reloaded the map once (it was stuck on initializing briefly).

HurpDurp commented 5 years ago

Also @rumblefrog,

If you want to submit that metal pack patch as a PR I'lll accept it.

Dragonisser commented 1 year ago

Stale and not reproduceable issue.