Linux/troubleshooting

From GameCPWiki

Jump to: navigation, search

Contents

Trobuleshoot your server

Pages are blank

If you have blank pages there are usually 1 of 2 things going wrong.

  1. there is a template error (hard to find), this can be GameCPs fault or yours if you have changed the templates
  2. there is an error, not shown, preventing pages from loading

Check your web-servers error_log (default: /var/log/httpd/error_log)

This information is very important when tracking down bugs and problems.


Users cannot ftp

Run:

cat /etc/shells | grep /sbin/nologin

If it isnt there run:

echo /sbin/nologin >> /etc/shells

Restart your ftpd.

the no bash feature has been removed in GameCP rev 1200 and above

Manage Maps Troubleshooting

Maps are not showing up

Enable GameCP Debugging then navigate to Manage Users, locate the user and Switch to User.

Navigate to Manage Maps.

With debugging enabled you will see the final location of the user map directory and the main games map directory, you will need to use these directorys in conjunction with the dirdiff script to help debug why items are not showing prorperly:

User map directory: /home/quake/.q3a/baseq3/
Main map directory: /usr/local/games/quake3/baseq3/

Installed Maps simply does a ls -x1 on the users map directory, Available Maps calls the dirdiff script to find the diffrent files from both directorys, it will only display files that are in the main map directory and not in the user map directory

# Replace /home/quake/.q3a/baseq3/ with your user map directory
ls -x1 /home/quake/.q3a/baseq3/


Install Troubleshooting

AllowUsers in sshd_config

GameCP currently is unable to support sshd configurations using AllowUsers. You can use this feature but requires editing the sshd_config manually before adding users to add the new user name.

To fix this error edit your sshd_config and remove any AllowUser lines ie:

nano /etc/ssh/sshd_config

AllowUsers admin
AllowUsers root

Remove those lines and restart sshd.

/etc/init.d/sshd restart


Alternative you can do lines like

AllowUsers *@127.0.0.1

Replace 127.0.0.1 with the master server ip of your gamecp install.

Machine Troubleshooting

Manage Machines - FAILED (root key)

This is one of the most common errors with GameCP.

Please review the detailed page, Repair Root Keys, on how to repair root keys when they have FAILED.


System stats arent displayed correctly.

This can be due to several reasons, be sure your system has `vmstat` installed.

You may need to edit the /usr/local/gcp/bin/sysinfo script on your server.

If your stats are working but are slightly off edit this script, locate at the bottom:

echo "${MEMINFO[24]}::${MEMINFO[25]}::${MEMINFO[27]}::${MEMINFO[36]}::${MEMTOTAL[1]}::${LOADINFO[1]}"

Change it to:

echo "${MEMINFO[25]}::${MEMINFO[26]}::${MEMINFO[28]}::${MEMINFO[37]}::${MEMTOTAL[1]}::${LOADINFO[1]}"

It seems some systems have upped by a number.

New User Troubleshooting

Users game files do not exist

  1. Enable GameCP Debugging in GameCP Settings > General
  2. Create a new user with the same game you were having problems with.
  3. On the page locate the titles - click the title that says "Creating user and services"
  4. Locate "DEBUGGING SSH Installing Game Files"

This is the command that GameCP uses to copy the users files.

  1. Login to your master servers root ssh
  2. Copy and paste the debugging ssh command into your terminal

By running the debug command in ssh you will see exactly what GameCP does.

Use this to locate the problem or error you may be having.


Common Problems

  • Incorrect game setup
  • Missing files/archives
  • Incorrect permissions, users need to access the install

User already exists on the machine, please manually remove the user

  1. Remove the user from the machine you are attempting to install on.
  2. Select Existing user for Server Install when you manually add the user in GameCP.

User does not exist after it was attempted to be created

One common cause of this error in past versions of GameCP was incorrect data paramaters, to verify this login as root via ssh onto the machine that is causing this error and cat the GameCP backend data file to verify the contents:

# Valid result
[root@ns1 tmp]# cat /usr/local/gcp/bin/data
DISTRO=1
MAINDIR=/usr/local/gcp
# Invalid result
[root@ns1 tmp]# cat /usr/local/gcp/bin/data
DISTRO=1\nMAINDIR=/usr/local/gcp

If this is not the cause of your problems them something else is going wrong, you will need to Enable Debugging and try to add the user again.

Debugging output will show you the commands being ran to add your user, locate the addgame command, copy the entire text box and paste this into a root ssh window on your master server, look for any errors or problems.

Install type is existing, user needs to be on the machine first

  1. Add the user to the machine you are attempting to install on.
  2. Select Install for Server Install when you manually add the user in GameCP

Key user of: [user] does not match apache user of: [user]

You will need to locate your apache user, this is not always the same on each system, to detect who is running apache you can scan the running processes to find httpd or apache:

ps aux | grep apache
ps aux | grep httpd
# Result
apache    2248  0.0  1.6 30064 16272 ?       S    Jul17   0:05 /usr/sbin/httpd

Verify that the process is for apache (ie /usr/sbin/httpd), the name on the far left will be your apache user.

The error message will tell you to manually chown the key and print out a line however the following lines will automatically correct all keys, login as root to your master server and type the following:

chown -R <apache user>:root /usr/local/gcp/primary
Personal tools
download
communication