Closed MrDave1999 closed 3 years ago
Have you tried adding some logging? Also please note that server log is showing the logs from server_log.txt. By default SampSharp does not log to the server_log.txt file. You could enable this using RedirectConsoleOutput()
on your GameModeBuilder in your Program.cs
.
I already put the RedirectConsoleOutput()
but it still doesn't show any logs. The only thing that appears on the panel is that the server is running but not responding. This problem has happened to me in several hosting companies such as Ultra-Host and freesamp.ga (Both offer GNU/Linux
hosts).
Could you show me your code in your Program.Main
method?
main code:
using SampSharp.Core;
using System.IO;
using System.Reflection;
namespace CaptureTheFlag
{
public class Program
{
public static void Main(string[] args)
{
new GameModeBuilder()
.RedirectConsoleOutput()
.UseEncoding(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "codepages"+ Path.DirectorySeparatorChar + "cp1252.txt"))
.Use<GameMode>()
.Run();
}
}
}
I've added a little more logging in this plugin build:
https://github.com/ikkentim/SampSharp/suites/1656544896/artifacts/30779327
could you try using this build of the plugin?
It is also a possibility that it gets stuck because the specified path to the codepages file does not exist. you could try commenting out that line (.UseEncoding(...)
) and see if it at least runs on the server.
I tested the plugin you sent and the following came out:
SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team
[00:27:53] filterscripts = "" (string)
[00:27:53]
[00:27:53] Server Plugins
[00:27:53] --------------
[00:27:53] Loading plugin: libSampSharp.so
[00:27:53] Loaded.
[00:27:53] Loaded 1 plugins.
[00:27:54]
[00:27:54] Filterscripts
[00:27:54] ---------------
[00:27:54] Loaded 0 filterscripts.
[00:27:54] Filterscript 'empty.amx' loaded.
[00:27:54]
[00:27:54] SampSharp Plugin
[00:27:54] ----------------
[00:27:54] v0.10.0, (C)2014-2020 Tim Potze
[00:27:54]
[00:27:54] [SampSharp:INFO] Initializing .NET runtime...
[00:27:54] [SampSharp:INFO] Starting game mode host...
It hangs, only that comes out. Therefore, the server is not responding.. PD: I did the test with an empty gamemode (with nothing).
Did you find a solution?
@MrCreepTon I did not find a solution. Apparently the problem is the hosting provider. Because I have a friend who works perfectly for him on Ubuntu.
It's been a long time and I have come to this conclusion: The server is not responding because possibly the provider has not installed some dependencies (like libicu and libssl) to run the gamemode successfully. I say this because I just bought an Ubuntu 18.04 VPS and it worked great.
As far as I see the "simplest" solution is to buy your own Linux VPS and manage it manually, unless you tell your provider to install the libicu and libssl dependencies.
The server is not responding, any idea why? It hangs and is never seen online. The host uses Ubuntu 18.04 as the operating system.