egebilecen / PZServerDiscordBot

A Project Zomboid Discord Bot written in C# using Discord.NET to manage and execute commands on Project Zomboid Server.
GNU General Public License v3.0
62 stars 11 forks source link

Autostart does not work. #63

Closed KokoPZ closed 1 year ago

KokoPZ commented 1 year ago

Update in workshop mode and Autostart does not work.

Check only 62 modes applied to the server. The total number of modes applied is 102.

egebilecen commented 1 year ago

Hey, could you share the log file? It's called pzbot.log.

KokoPZ commented 1 year ago

pzbot.log

Other people are experiencing a similar condition.

KokoPZ commented 1 year ago

Server.ini files

WorkshopItems=2694448564;2725216703;2111645536;2392709985;2719592131;2759024505;1961346558;2753894806;2335368829;2282429356;2139339494;2256623447;2756490460;2616986064;2544353492;2605507108;873020165;2776633989;2769995104;515555911;2485028088;2423906082;2434425002;503640135;2711057211;2286124931;2875848298;2625625421;2590662055;2289454303;2617575303;2674541310;2637692469;2845810596;2901962885;2746736222;2877551501;2732594572;2893027547;2877685881;1922750845;2907607479;2673713236;2908614026;1510950729;2725378876;2487022075;2072147750;2765438437;1651019937;2184990011;2732270391;2792714394;2657661246;2757712197;2169435993;2313387159;2699856770;2852867235;2847298893;2553809727;2786499395;2619072426;2809719515;2780594299;1949441990;2725360009;2423266708;566115016;1915420850;2883397918;1299328280;2880299874;2829551796;2905045337;1414568604;2903135820;2721945297;2859296947;2821065054;2910102806;2867431511;2920043469;2920562859;2917464068;2704811006;2918886125

87 modes are in use.

egebilecen commented 1 year ago

There isn’t any issue appearing in logs. Mod update checker is working without any issues as a server currently running this bot. Also did you shutdown the server? That is when server auto starter works. And it’s not immediately. Schedule would run in 10 seconds.

KokoPZ commented 1 year ago

I think I said it wrong.

Even if you update your personal mode files to the workshop, It does not recognize and does not restart.

Automated server restart schedule does not work.

The workshop ID for Mode is 2920562859 and does not restart after updating.

It does not recorded in the pzbot.log file log.

MaximusPT commented 1 year ago

Hi all,

Execute command: !server_cmd checkModsNeedUpdate and if needed: !restart_server

Cya


Exception: System.ArgumentNullException Message: Value cannot be null. Parameter name: s Stack trace: at System.IO.StringReader..ctor(String s) at Newtonsoft.Json.Linq.JToken.Parse(String json, JsonLoadSettings settings) at SteamWebAPI.d3.MoveNext() in C:\Documents\Programming\C#\PZServerDiscordBot\src\Bot\Util\SteamWebAPI.cs:line 80 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Schedules.<>cDisplayClass4_0.<b__0>d.MoveNext() in C:\Documents\Programming\C#\PZServerDiscordBot\src\Bot\Schedules\WorkshopItemUpdateChecker.cs:line 52 Date: 22/01/2023 20:58:50 UTC Bot Version: v1.9.0 Exception occured in ScheduleItem callback function. ScheduleItem: WorkshopItemUpdateChecker (THIS IS AN INNER EXCEPTION, NUMBER 1)

egebilecen commented 1 year ago

I think I said it wrong.

Even if you update your personal mode files to the workshop, It does not recognize and does not restart.

Automated server restart schedule does not work.

The workshop ID for Mode is 2920562859 and does not restart after updating.

It does not recorded in the pzbot.log file log.

Well that mod doesn't appear in log so either your server location is in different directory than bot uses or steam doesn't return information about it. Did you setup custom path for your server?

egebilecen commented 1 year ago

Hi all,

Execute command: !server_cmd checkModsNeedUpdate and if needed: !restart_server

Cya

Exception: System.ArgumentNullException

Message: Value cannot be null. Parameter name: s Stack trace: at System.IO.StringReader..ctor(String s) at Newtonsoft.Json.Linq.JToken.Parse(String json, JsonLoadSettings settings) at SteamWebAPI.d3.MoveNext() in C:\Documents\Programming\C#\PZServerDiscordBot\src\Bot\Util\SteamWebAPI.cs:line 80 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Schedules.<>cDisplayClass4_0.d.MoveNext() in C:\Documents\Programming\C#\PZServerDiscordBot\src\Bot\Schedules\WorkshopItemUpdateChecker.cs:line 52 Date: 22/01/2023 20:58:50 UTC Bot Version: v1.9.0 Exception occured in ScheduleItem callback function. ScheduleItem: WorkshopItemUpdateChecker (THIS IS AN INNER EXCEPTION, NUMBER 1)

Hey, please share log file as attachment.

KokoPZ commented 1 year ago

해당 모드는 로그에 표시되지 않으므로 서버 위치가 봇이 사용하는 것과 다른 디렉토리에 있거나 Steam이 이에 대한 정보를 반환하지 않습니다. 서버의 사용자 정의 경로를 설정했습니까?

installation locationis of the chat bot is C:\Program Files (x86)\Steam\steamapps\common\Project Zomboid Dedicated Server

jun1024 commented 1 year ago

I think I said it wrong.

Even if you update your personal mode files to the workshop, It does not recognize and does not restart.

Automated server restart schedule does not work.

The workshop ID for Mode is 2920562859 and does not restart after updating.

It does not recorded in the pzbot.log file log.

I looked up into this log file and there are '[22-01-2023 17:59:10 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...' logs for every time it tried to restart. It looks like the bot recognized backup progress is running for some reason, so scheduled restart has skipped.

egebilecen commented 1 year ago

해당 모드는 로그에 표시되지 않으므로 서버 위치가 봇이 사용하는 것과 다른 디렉토리에 있거나 Steam이 이에 대한 정보를 반환하지 않습니다. 서버의 사용자 정의 경로를 설정했습니까?

installation locationis of the chat bot is C:\Program Files (x86)\Steam\steamapps\common\Project Zomboid Dedicated Server

Well, logs aren’t showing any problem. Two things comes to my mind, either your server directory located somewhere else or you did change server name which caused new ini file to be created. If that’s the case, delete the old ini file.

egebilecen commented 1 year ago

I think I said it wrong. Even if you update your personal mode files to the workshop, It does not recognize and does not restart. Automated server restart schedule does not work. The workshop ID for Mode is 2920562859 and does not restart after updating. It does not recorded in the pzbot.log file log.

I looked up into this log file and there are '[22-01-2023 17:59:10 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...' logs for every time it tried to restart. It looks like the bot recognized backup progress is running for some reason, so scheduled restart has skipped.

It's not related to backup as logs shows no sign of !backup_server used.

KokoPZ commented 1 year ago

I solved it.

The Mode Update Manager works fine when Remove other server.inifiles.

Thank you.

egebilecen commented 1 year ago

No problem. :)