Difference between revisions of "Troubleshooting"

From GExtension Wiki
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 26: Line 26:
 
'''I lost my superadmin group on the web'''
 
'''I lost my superadmin group on the web'''
 
*To regrant the rank, you need a server which is connected with GExtension. Run this command in the console: ''gex_setgroup <steamid64> superadmin 0''
 
*To regrant the rank, you need a server which is connected with GExtension. Run this command in the console: ''gex_setgroup <steamid64> superadmin 0''
 +
*As an alternative, you can use this SQL command: UPDATE gex_users SET groups = '{"bundle_0":"superadmin"}' WHERE steamid64 = '<steamid64>';
 
'''The console ist not working'''
 
'''The console ist not working'''
 
*Add -condebug to the start parameters of your Garry's Mod server. '''IMPORTANT:''' Make sure to delete/move the console.log file from time to time. Otherwise, the file may gets too big and creates lags.
 
*Add -condebug to the start parameters of your Garry's Mod server. '''IMPORTANT:''' Make sure to delete/move the console.log file from time to time. Otherwise, the file may gets too big and creates lags.
Line 32: Line 33:
 
'''Warning: curl_exec() has been disabled for security reasons in ...'''
 
'''Warning: curl_exec() has been disabled for security reasons in ...'''
 
*Your hoster does not allow cURL. Switch to another one.
 
*Your hoster does not allow cURL. Switch to another one.
'''My users complete the Steam login, but do not get logged in'''
+
'''My users complete the Steam login, but do not get logged in / usernames and avatars do not get refreshed'''
*Make sure that you configured http/https correctly in the config.php
+
*Make sure that you configured http/https and Steam API key correctly in the config.php
 
'''session_start(): open(..., O_RDWR) failed: Permission denied (13)'''
 
'''session_start(): open(..., O_RDWR) failed: Permission denied (13)'''
 
*You webserver can't access the session path. Check php.ini and permissions.
 
*You webserver can't access the session path. Check php.ini and permissions.
Line 46: Line 47:
 
'''"TeamSpeak3_Adapter_ServerQuery_Exception: invalid file path" when opening the Teamspeak viewer'''
 
'''"TeamSpeak3_Adapter_ServerQuery_Exception: invalid file path" when opening the Teamspeak viewer'''
 
*You probably have an icon on your Teamspeak server that does not exist in the file system anymore. This sometimes happens when a Teamspeak server is being moved. You can solve the problem by deleting (all/the affected) icons and adding them again.
 
*You probably have an icon on your Teamspeak server that does not exist in the file system anymore. This sometimes happens when a Teamspeak server is being moved. You can solve the problem by deleting (all/the affected) icons and adding them again.
 +
'''Fatal error: Uncaught Error: Call to undefined function bcsub()'''
 +
* The PHP bcmath module is missing and must be installed.
 +
'''I removed the "super" permission from the superadmin group and now I don't have access anymore'''
 +
*Run the following SQL command: UPDATE gex_groups SET permissions = '["super"]' where groupname = "superadmin";
 +
'''When I try to connect a discord account, it says that the username cannot be found in the guild'''
 +
*Make sure that the ''Server Members Intent'' option is enabled at [https://discord.com/developers/applications/ Discord Apps -> Bot]
  
 
==Lua==
 
==Lua==
Line 73: Line 80:
 
*Your groups are not configured correctly. You can only ban a user if: The users permission level is lower than yours, The ban-length does not exceed the maximal ban length, You have the bans_add permission
 
*Your groups are not configured correctly. You can only ban a user if: The users permission level is lower than yours, The ban-length does not exceed the maximal ban length, You have the bans_add permission
 
'''[GExtension] Error while executing Query: FUNCTION JSON_VALID does not exist'''
 
'''[GExtension] Error while executing Query: FUNCTION JSON_VALID does not exist'''
*Your MySQL/MariaDB Server version is too old. At least MySQL 5.7 or MariaDB 10.2.3 is required.
+
*Your MySQL/MariaDB Server version is too old. At least MySQL 5.7 or MariaDB 10.2.3 is required. It is strongly recommended to use an up-to-date server version. However, if you can't update your MySQl server you can replace the file lua/gextension/server/sv_rewards.lua with [https://pastebin.com/raw/17FvBtdp this]. '''WARNING:''' This has an impact on the performance and may not work good when there are many active rewards.

Latest revision as of 22:45, 9 November 2021

You have a problem with GExtension? The most common problems with their solutions are listed here.

MySQL

PLEASE do not create support tickets for MySQL related problems. We can't say you much more than written here. Contact your hoster instead.

"Access denied for user 'mysqluser'@'123.12.31.123' (using password: YES)"

  • You are using a MySQL user that doesn't has access. This is caused by wrong password, not whitelisted IP or insufficient permissions for the database.

"Can't connect to local MySQL server through socket"

  • Make sure that you used the correct IP (if you are using localhost, the MySQL server needs to be on the same machine as your GMOD/Web server)
  • You may used "localhost" as IP. Try 127.0.0.1, the IP or your hostname instead. If the problem persists, try entering the socket path in the config. The default is "/var/lib/mysql/mysql.sock", but may differs by hoster.

"Can't connect to MySQL server on '...'"

  • You may entered a wrong ip/hostname or the mysql server does not allow remote connections.

"Unknown MySQL server host '...'"

  • If you are using a MySQL IP like *.mysql.db or similar: This is a custom hostname created by your (web)hoster. They will not work on your GMOD server. Ask for the correct IP and make sure that remote connections are allowed. If not: you entered an invalid IP/hostname or the MySQL server does not accept remote connections.

"Connection refused"

  • Make sure you entered the correct IP/hostname of your MySQL server. Your MySQL server must also be reachable by your webserver and GMOD server (allow remote connections). Contact the hoster of your MySQL server, if you still have problems.


Web

SELF HOSTING: If your webserver is not configured correctly, we will provide you information about what is wrong, NOT how to fix it. Use google or rent a webserver if you are not able to fix it yourself.

"Could not update" + permission error / Warning: fopen(...): failed to open stream: Permission denied

"Servers" tab doesn't show status of my servers

  • Make sure that your servers have the correct time.

I lost my superadmin group on the web

  • To regrant the rank, you need a server which is connected with GExtension. Run this command in the console: gex_setgroup <steamid64> superadmin 0
  • As an alternative, you can use this SQL command: UPDATE gex_users SET groups = '{"bundle_0":"superadmin"}' WHERE steamid64 = '<steamid64>';

The console ist not working

  • Add -condebug to the start parameters of your Garry's Mod server. IMPORTANT: Make sure to delete/move the console.log file from time to time. Otherwise, the file may gets too big and creates lags.

Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set in ...

  • Set safe_mode = Off in your php.ini file (only if you are hosting a webserver yourself) and make sure that all OpenBaseDir options are disabled (sometimes need to be set to "none"). Ask your hoster if you do not have access to it or switch to an other one.

Warning: curl_exec() has been disabled for security reasons in ...

  • Your hoster does not allow cURL. Switch to another one.

My users complete the Steam login, but do not get logged in / usernames and avatars do not get refreshed

  • Make sure that you configured http/https and Steam API key correctly in the config.php

session_start(): open(..., O_RDWR) failed: Permission denied (13)

  • You webserver can't access the session path. Check php.ini and permissions.

Notice: date_default_timezone_set(): Timezone ID '...' is invalid in ...

  • You entered an invalid timezone in your config.php, see PHP docs for an overview. Examples: Europe/Berlin, America/New_York

Notice: session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5/sessions) failed: Permission denied (13) in ...

  • The webserver does not have access to the specified session folder. Ask or switch your hoster if you are renting a webserver.

Fatal error: Uncaught Error: Class 'XYZ' not found in ...

  • You are missing the PHP class XYZ. This class (f.e. ZipArchive) is maybe included in a required PHP module that isn't installed on your webserver.

The sign-in through Steam is not working

  • Make sure that the SteamAPI key in the config.php is correct.

"TeamSpeak3_Adapter_ServerQuery_Exception: invalid file path" when opening the Teamspeak viewer

  • You probably have an icon on your Teamspeak server that does not exist in the file system anymore. This sometimes happens when a Teamspeak server is being moved. You can solve the problem by deleting (all/the affected) icons and adding them again.

Fatal error: Uncaught Error: Call to undefined function bcsub()

  • The PHP bcmath module is missing and must be installed.

I removed the "super" permission from the superadmin group and now I don't have access anymore

  • Run the following SQL command: UPDATE gex_groups SET permissions = '["super"]' where groupname = "superadmin";

When I try to connect a discord account, it says that the username cannot be found in the guild

Lua

The most issues can be solved by just taking a look into the SERVER console:

My server doesn't show up in the server list

  • Make sure to look at the server list in the settings. If the server doesn't show up, it's most likely a mysql issue. Make sure your credentials are correct and check the server log for [GExtension] related stuff.

GExtension is not initialized/Could not initialize

  • Take a look in the SERVER-console for errors. You may forgot to assign your server to a serverbundle or the mysql connection failed.

You need to have tmysql4 or mysqloo installed

  • You do not have a mysql module installed. See MySQL

Users are losing their groups on the server

  • You need to navigate to Admin -> Settings -> Groups and create all groups you have in GMOD with the EXACT SAME name.

I lost my group on the server

  • You most likely forgot to also set you a rank for the serverbundle. Navigate to Search -> Your Pofile and click on the pencil. Please note that the name of the web and gmod groups has to be the same (case sensitive!!!).

There are lags on my server

  • Make sure that your console.log file isn't too big. You should make a cronjob to clear it every day.

Some (DarkRP) commands (like /advert or /ooc) don't work anymore

  • Disable the ChatTags in the Lua config.

My admins can't ban users (permission error)

  • Make sure that theire group has the correct permissions and that they have a HIGHER permission level than the user they want to ban. You may also want to check if there are any ban-time limitations set in the group settings.

"[Error] addons/gextension/lua/gextension/server/sv_mysql.lua:53: Module not found!"

  • You did not install the mysql module correctly (you most likely forgot to upload the libmysql file). See MySQL

"[Error] addons/gextension/lua/gextension/server/sv_mysql.lua:35: Couldn't load module library!"

  • You did not install the mysql module correctly. See MySQL.

I receive a permission error when trying to ban/warn a user

  • Your groups are not configured correctly. You can only ban a user if: The users permission level is lower than yours, The ban-length does not exceed the maximal ban length, You have the bans_add permission

[GExtension] Error while executing Query: FUNCTION JSON_VALID does not exist

  • Your MySQL/MariaDB Server version is too old. At least MySQL 5.7 or MariaDB 10.2.3 is required. It is strongly recommended to use an up-to-date server version. However, if you can't update your MySQl server you can replace the file lua/gextension/server/sv_rewards.lua with this. WARNING: This has an impact on the performance and may not work good when there are many active rewards.