IPBan icon indicating copy to clipboard operation
IPBan copied to clipboard

Version `3.0.0` fails to start as a Windows service

Open vandot opened this issue 1 year ago • 14 comments

Newest version 3.0.0 fails to start as a Windows service

Error Service Control Manager A timeout was reached (30000 milliseconds) while waiting for the IPBAN service to connect.
Error Service Control Manager The IPBAN service failed to start due to the following error: 1053

Just copying DigitalRuby.IPBan.exe and DigitalRuby.IPBanCore.xml from previous version 2.0.1 fixes it.

vandot avatar Apr 06 '25 11:04 vandot

Ran this and it installed on my Windows 11 fine as a service:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/DigitalRuby/IPBan/master/IPBanCore/Windows/Scripts/install_latest.ps1'))

Anything from the logfile.txt or event viewer you can share that might indicate the problem?

jjxtra avatar Apr 06 '25 15:04 jjxtra

same here, service is installed successfully, but when restart vm, the service not start? dont know why im running windows server 2019

heroes1412 avatar Apr 29 '25 14:04 heroes1412

Without log files or event viewer entries, I'm at a loss here. I'm unable to replicate this on several Windows Servers, including 2016, 2019, 2022, along with Windows 10 & 11.

jjxtra avatar Apr 29 '25 14:04 jjxtra

uploaded to you

heroes1412 avatar Apr 29 '25 14:04 heroes1412

logfile.txt

heroes1412 avatar Apr 29 '25 14:04 heroes1412

Looks like a problem with your ipban.config file. Can you post it?

jjxtra avatar Apr 29 '25 14:04 jjxtra

note that, ipban not start with windows, but i can manual start it (in services.msc) @@, dont know why

heroes1412 avatar Apr 29 '25 14:04 heroes1412

Have rebuilt release at https://github.com/DigitalRuby/IPBan/releases/tag/3.0.0 with latest .NET SDK. Let me know if it helps.

jjxtra avatar Apr 29 '25 15:04 jjxtra

What powershell version are you running? And is it run as admin?

jjxtra avatar Apr 29 '25 15:04 jjxtra

yes, i run powershell (admin priv) $ProgressPreference = 'SilentlyContinue'; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/DigitalRuby/IPBan/master/IPBanCore/Windows/Scripts/install_latest.ps1'))

and replace all file from above built, the service is not start when windows start. i think you need set a delay from windows start?

heroes1412 avatar Apr 29 '25 15:04 heroes1412

This line from the script sets it to automatic (delayed) start:

& sc.exe create IPBAN type= own start= delayed-auto binPath= $INSTALL_EXE DisplayName= $SERVICE_NAME

Are you seeing it created with Automatic instead of Automatic (Delayed Start)?

jjxtra avatar Apr 29 '25 16:04 jjxtra

yes, it shows "Delayed Start"

heroes1412 avatar Apr 30 '25 12:04 heroes1412

Might be worth trying 3.1.0 release to see if it works.

https://github.com/DigitalRuby/IPBan/releases/tag/3.1.0

jjxtra avatar Sep 09 '25 18:09 jjxtra