Skip to content

Help

Troubleshooting

Most problems come down to the agent not running, not finding the server or not reaching the database. Start with the doctor command.

Run the doctor

The doctor command checks the three things the agent needs: your FiveM server, the database and the connection to SwisserAI. It changes nothing, so it is always safe to run.

sudo swisser-agent doctor

On Windows and without root the command looks a little different, see Commands. Each line starts with a mark:

  • [ok]

    This part works.
  • [--]

    Not a problem, but worth knowing. For example, the database cannot create a read-only account.
  • [!!]

    This is what stops the agent. The line says what is wrong.

The agent is offline

The page shows Offline and the time of the last check-in. Check in this order:

  • Is the machine running? After a reboot, a service starts by itself. An agent started without root does not, so start it again in screen or tmux.
  • Is the service running? Run status. On Linux, sudo systemctl status swisser-agent shows it too. On Windows, look for SwisserAI Server Reports Agent in the Services app.
  • Can it reach the internet? doctor tells you. A firewall must allow outgoing HTTPS.
  • Is it updating? During an update it can be offline for a moment. If an update fails, it switches back by itself.

On Linux, the last log lines of the service help us if you contact support:

sudo journalctl -u swisser-agent -n 50

Reports show the offline time as a gap, not as zero. Nothing needs to be fixed in your data afterwards.

No FiveM server found

  • The agent must run on the machine that hosts FiveM, not on your gaming PC.
  • Without root, the agent can only see folders your user can read. Install it as root, or run it as the user that runs FiveM.
  • In a container, the agent must see the server folder. Run it in the FiveM container.
  • After fixing it, press Search again on the Connect page.

Database problems

No database connection found

The agent reads the connection from your server config, usually the mysql_connection_string for oxmysql. Make sure it is set in the server.cfg of the installation you picked, then press Search again.

The read-only account cannot be created

Your database login is not allowed to create other logins. Either give it that right (the setup page shows how under How?) and press Check again, or choose Use existing connection. On a hosted database, the host's panel usually has a user management page.

The database cannot be reached

doctor shows the reason on a [!!] line. If the database runs on another machine, that machine must allow connections from the one running the agent. Many hosting providers block that.

Collection worked and then stopped

Check the Agent and updates tab. Each kind of data shows when it was last read, and an error line if something failed. A changed database password or a script update that changed a table are the usual reasons.

The code does not work

A code works once and for 24 hours. If it expired or was used, create a new one on the Connect page with New codeand download the agent again. On Windows, keep the file name as it is, because the code is in the name.

Note

A new code makes the earlier download stop working. If you already ran the agent, you do not need a new code.

Reports look empty

  • Just connected? Reports get richer as history builds up. Questions about the last 30 days need 30 days of data.
  • Is that kind of data allowed? A question about vehicles needs Vehicles ticked under Data access.
  • Is your script read? If your banking or inventory script is not recognised, add it under Custom tables.
  • Paused? The Agent and updates tab says so. Press Resume.

Crashes are missing

  • Server health off? Crashes are only recorded while it is on.
  • No log lines? Servers without txAdmin write no log file. The timeline then has no log lines.
  • No crash dump? FXServer does not write one for every crash. When the machine runs out of memory, for example, the process is ended from outside and no dump is written.
  • Players report a crash but nothing shows? Press My server just crashed on the Crashes page.

Still stuck

Ask us on Discord, or use the report button at the bottom right of any page. Include the output of doctor. It contains no passwords.