Oisou
March 28, 2024, 8:33pm
1
OS Name/Version: Windows 10 Pro
Product Name/Version: AMP Release “Callisto” v2.5, built 22/03/2024 17:32
Problem Description:
We’re debugging LUA scripts on our server, the instance console does not output everything a srcds should output.
Is there some configuration I have to do to make that console output EVERYTHING?
Steps to reproduce:
Run server
Test some lua scripts that give errors
No Errors in AMP Instance Console.
Actions taken to resolve so far:
Checked all of configuration, found nothing so far.
Mike
March 28, 2024, 9:25pm
2
You’d have to use Docker mode so that the Linux version of the server is in use. Gmod uses a fake console on Windows that isn’t readable by other applications so AMP relies on the srdcs UDP logger plus RCON instead.
Oisou
March 30, 2024, 10:32am
3
I moved to a linux server, and It still doesn’t show everything.
For example here’s the output from Instance console:
03/30/2024 - 11:24:27: Lua Error: [ERROR] gamemodes/helix/gamemode/core/libs/thirdparty/sv_mysql.lua:572: [mysql] SQL Callback Error! gamemodes/helix/gamemode/core/libs/thirdparty/sv_mysql.lua:572: [mysql] SQL Callback Error! lua/includes/extensions/table.lua:106: bad argument #1 to 'pairs' (table expected, got nil) 1. error - [C]:-1 2. Execute - gamemodes/helix/gamemode/core/libs/thirdparty/sv_mysql.lua:572 3. Create - gamemodes/helix/gamemode/core/libs/sh_character.lua:88 4. func - gamemodes/helix/gamemode/core/libs/sh_character.lua:997 5. unknown - lua/includes/extensions/net.lua:38
11:27:46
03/30/2024 - 11:27:46: Lua Error: [ERROR] gamemodes/helix/gamemode/core/libs/thirdparty/sv_mysql.lua:572: [mysql] SQL Callback Error! gamemodes/helix/gamemode/core/libs/thirdparty/sv_mysql.lua:572: [mysql] SQL Callback Error! lua/includes/extensions/table.lua:106: bad argument #1 to 'pairs' (table expected, got nil) 1. error - [C]:-1 2. Execute - gamemodes/helix/gamemode/core/libs/thirdparty/sv_mysql.lua:572 3. Create - gamemodes/helix/gamemode/core/libs/sh_character.lua:88 4. func - gamemodes/helix/gamemode/core/libs/sh_character.lua:997 5. unknown - lua/includes/extensions/net.lua:38
And here’s one from an SSH Console:
[LOG] test test used command '/PlyWhitelist test overwatch'.
[LOG] test test used command '/PlyWhitelist test metropolice'.
[LOG] test test used command '/PlyWhitelist test administrator'.
Created character '2' for Oisou.
[LOG] Oisou created the character 'UU-C11://CP.UNION-RCT.08358'
L 03/30/2024 - 11:27:46: Lua Error:
[ERROR] gamemodes/helix/gamemode/core/libs/thirdparty/sv_mysql.lua:572: [mysql] SQL Callback Error!
gamemodes/helix/gamemode/core/libs/thirdparty/sv_mysql.lua:572: [mysql] SQL Callback Error!
lua/includes/extensions/table.lua:106: bad argument #1 to 'pairs' (table expected, got nil)
1. error - [C]:-1
2. Execute - gamemodes/helix/gamemode/core/libs/thirdparty/sv_mysql.lua:572
3. Create - gamemodes/helix/gamemode/core/libs/sh_character.lua:88
4. func - gamemodes/helix/gamemode/core/libs/sh_character.lua:997
5. unknown - lua/includes/extensions/net.lua:38
[ERROR] gamemodes/helix/gamemode/core/libs/thirdparty/sv_mysql.lua:572: [mysql] SQL Callback Error!
gamemodes/helix/gamemode/core/libs/thirdparty/sv_mysql.lua:572: [mysql] SQL Callback Error!
lua/includes/extensions/table.lua:106: bad argument #1 to 'pairs' (table expected, got nil)
1. error - [C]:-1
2. Execute - gamemodes/helix/gamemode/core/libs/thirdparty/sv_mysql.lua:572
3. Create - gamemodes/helix/gamemode/core/libs/sh_character.lua:88
4. func - gamemodes/helix/gamemode/core/libs/sh_character.lua:997
5. unknown - lua/includes/extensions/net.lua:38
03/30/2024 - 11:27:46: Lua Error:
[ERROR] gamemodes/helix/gamemode/core/libs/thirdparty/sv_mysql.lua:572: [mysql] SQL Callback Error!
gamemodes/helix/gamemode/core/libs/thirdparty/sv_mysql.lua:572: [mysql] SQL Callback Error!
lua/includes/extensions/table.lua:106: bad argument #1 to 'pairs' (table expected, got nil)
1. error - [C]:-1
2. Execute - gamemodes/helix/gamemode/core/libs/thirdparty/sv_mysql.lua:572
3. Create - gamemodes/helix/gamemode/core/libs/sh_character.lua:88
4. func - gamemodes/helix/gamemode/core/libs/sh_character.lua:997
5. unknown - lua/includes/extensions/net.lua:38
[LOG] Oisou loaded the character 'UU-C11://CP.UNION-RCT.08358'
[LOG] UU-C11://CP.UNION-RCT.08358 entered observer.
[LOG] UU-C11://CP.UNION-RCT.08358 exited observer at their location.
[LOG] UU-C11://CP.UNION-RCT.08358 used command '/CharSetLanguage UNION english give'.
[LOG] [ENGLISH - IC] UU-C11://CP.UNION-RCT.08358: Hi.
[LOG] UU-C11://CP.UNION-RCT.08358 entered observer.
[LOG] UU-C11://CP.UNION-RCT.08358 exited observer at their location.
[LOG] UU-C11://CP.HELIX-SqL.72425 used command '/CharSetName UU-C11://CP.UNION-RCT.0835 UU-C11://CP.HELIX-SqL.72425'.
[LOG] UU-C11://CP.HELIX-SqL.72425 used command '/Dispatch unrest procedure'.
[LOG] [ENGLISH - IC] UU-C11://CP.HELIX-SqL.72425: Hi.
[LOG] [ENGLISH - IC] UU-C11://CP.HELIX-SqL.72425: 1.
Mike
March 30, 2024, 10:47am
4
You can try using log 1
to show more log output, but lua messages not being logged properly is a bug in gmod itself.
opened 02:45AM - 22 Jun 14 UTC
Currently there are several ways to log what happens on the server. The "-condeb… ug" parameter creates a file called "console.log" and contains the exact console output including any errors. This is all in plain text and does not have color.
Some people use "log 1" to log their servers, however, this is not an exact console log, while some people might want to achieve that result. I'm currently trying to create a remote console viewer (so not sending commands, only receiving the console's output) and the difference in output (real console, and the received UDP packets) is quite big.
![example](http://i.imgur.com/RKzjniB.png)
To add up to that, currently Lua errors are not captured by "log 1".
I'd like to request a change where "log 1" actually creates a 1-1 copy of the console, just like -condebug does. In that case, UDP packets would contain the exact information that is shown in the console and it would be completely possible to create a remote console viewer. Since packets are sent, I'd also like to ask for a feature where the color of the line is sent in the first 3-4 bytes, so that the output does not have to be parsed to look like the actual console.
Gmod like other source games uses a fake console which means applications that actually read the output as opposed to merely displaying it have a hard time. AMP uses the source UDP logger to get its data.
If you started the server outside of AMP and redirected the output (srcds ..... > output.txt
) you would also find that the output file doesn’t contain those messages.
Oisou
March 30, 2024, 10:57am
5
So there is no possible way to show every output from tmux in HTTP Instance console?
Because, like I’ve said, once I log into the amp user on Linux, do tmux a, it shows EVERYTHING related to the server, including but not limited to chat etc.
AMP Instance Console shows only some information (that Is also included in tmux)
Mike
March 30, 2024, 12:08pm
6
It’s not I’m afraid because tmux multiplexes an entire terminal. So fake consoles are able to show their output but AMP can’t see it. Nor can applications that use redirection.
There may be a way around this using condebug but I’m not sure how that’ll work.
Oisou
March 30, 2024, 12:33pm
7
Meh, that’s unfortunate.
-condebug saves all of output to a txt file, we need to see everything in real time instead.
Maybe in the future we’ll see a terminal emulator of some sorts in AMP so it’ll make it possible.
Thank you for your help
Mike
March 30, 2024, 12:34pm
8
Other panels work by continuously reading the console.txt file. There is a trick I can do using a FIFO stream with a matching name as a way to avoid polling and get data in real time.
system
Closed
April 29, 2024, 12:35pm
9
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.