Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stand Alone service limit on Windows Server 2012r2?
#21
(08-05-2021, 05:03 PM)JuergenS Wrote: Hello,

I am having the same problem with Http.sys.
I have the first server without a URL reservation and a few more, a few with a URL reservation.
There are two servers that abort with the same error message. I can restart it manually if I try multiple times.
All servers work according to the same scheme.
Some things are initialized between the start of main () and the call of TIWStartHSys :: Execute (), but the time between is less than 1 sec.

Unfortunately I have not been able to find a solution so far.

  Huh


I was having this exact problem frequently last year but did not see it again until recently.  Below is an error log entry from the first of four instances (1st failed, the following 3 were successful):

9/5/2021 1:14:33 AM TIWServiceWorker.Execute: [HttpSys] A call to "HttpCreateRequestQueue" failed: Cannot create a file when that file already exists
Please check if reserved URL is conflicting with some other URL reserverd for another application on the same machine.


The app is a very simple map tile server, it doesn't have any user interaction.  Last year the failed instances would actually start but not respond and had to be restarted with multiple tries.  Current failed instances do not start.

C++ Builder 10.4.2, IW 15.2.34,36
Reply
#22
(09-07-2021, 05:06 PM)MJS@mjs.us Wrote:
(08-05-2021, 05:03 PM)JuergenS Wrote: Hello,

I am having the same problem with Http.sys.
I have the first server without a URL reservation and a few more, a few with a URL reservation.
There are two servers that abort with the same error message. I can restart it manually if I try multiple times.
All servers work according to the same scheme.
Some things are initialized between the start of main () and the call of TIWStartHSys :: Execute (), but the time between is less than 1 sec.

Unfortunately I have not been able to find a solution so far.

  Huh


I was having this exact problem frequently last year but did not see it again until recently.  Below is an error log entry from the first of four instances (1st failed, the following 3 were successful):

9/5/2021 1:14:33 AM TIWServiceWorker.Execute: [HttpSys] A call to "HttpCreateRequestQueue" failed: Cannot create a file when that file already exists
Please check if reserved URL is conflicting with some other URL reserverd for another application on the same machine.


The app is a very simple map tile server, it doesn't have any user interaction.  Last year the failed instances would actually start but not respond and had to be restarted with multiple tries.  Current failed instances do not start.

C++ Builder 10.4.2, IW 15.2.34,36

This error message "A call to "HttpCreateRequestQueue" failed: Cannot create a file when that file already exists" is pretty clear about the problem: There is a conflicting name reservation on that same machine. It doesn't need to be a IW application. Anything can register a URL, stuff installed under IIS or not. 

From the command prompt type:

netsh http show urlacl

And inspect each one of them. Even better:

netsh http show urlacl > UrlReserv.txt

and a file UrlReserv.txt will be created with all the reservations. You can open the file and inspect it later (you may have dozens or even hundreds of url reservations)
Reply
#23
(09-02-2021, 03:11 PM)robAgencySoftware Wrote: Also, can you provide me with specs on the computer you tried this on? I'm also working with Amazon AWS support on this issue also just in case it has something to do with the ec2 virtual machine.

A pretty standard desktop computer: Intel Core-i7, 4-cores/8-threads, 32 Gb RAM, 2 TB SSD, Windows 10 Professional. It's not even the most recent Core-i7 processor (probably 3-4 y.o.)
Reply
#24
(09-10-2021, 06:28 AM)Alexandre Machado Wrote: This error message "A call to "HttpCreateRequestQueue" failed: Cannot create a file when that file already exists" is pretty clear about the problem: There is a conflicting name reservation on that same machine. It doesn't need to be a IW application. Anything can register a URL, stuff installed under IIS or not. 

From the command prompt type:

netsh http show urlacl

And inspect each one of them. Even better:

netsh http show urlacl > UrlReserv.txt

and a file UrlReserv.txt will be created with all the reservations. You can open the file and inspect it later (you may have dozens or even hundreds of url reservations)

If you have detailed http service state, use:
netsh http show servicestate
Reply
#25
(09-10-2021, 06:28 AM)Alexandre Machado Wrote:
(09-07-2021, 05:06 PM)MJS@mjs.us Wrote:
(08-05-2021, 05:03 PM)JuergenS Wrote: Hello,

I am having the same problem with Http.sys.
I have the first server without a URL reservation and a few more, a few with a URL reservation.
There are two servers that abort with the same error message. I can restart it manually if I try multiple times.
All servers work according to the same scheme.
Some things are initialized between the start of main () and the call of TIWStartHSys :: Execute (), but the time between is less than 1 sec.

Unfortunately I have not been able to find a solution so far.

  Huh


I was having this exact problem frequently last year but did not see it again until recently.  Below is an error log entry from the first of four instances (1st failed, the following 3 were successful):

9/5/2021 1:14:33 AM TIWServiceWorker.Execute: [HttpSys] A call to "HttpCreateRequestQueue" failed: Cannot create a file when that file already exists
Please check if reserved URL is conflicting with some other URL reserverd for another application on the same machine.


The app is a very simple map tile server, it doesn't have any user interaction.  Last year the failed instances would actually start but not respond and had to be restarted with multiple tries.  Current failed instances do not start.

C++ Builder 10.4.2, IW 15.2.34,36

This error message "A call to "HttpCreateRequestQueue" failed: Cannot create a file when that file already exists" is pretty clear about the problem: There is a conflicting name reservation on that same machine. It doesn't need to be a IW application. Anything can register a URL, stuff installed under IIS or not. 

From the command prompt type:

netsh http show urlacl

And inspect each one of them. Even better:

netsh http show urlacl > UrlReserv.txt

and a file UrlReserv.txt will be created with all the reservations. You can open the file and inspect it later (you may have dozens or even hundreds of url reservations)


Added a call to log 'netsh http show servicestate' output after starting the services from a batch file, the logs show no conflicts (if there were a conflict it should fail every time not just occasionally I would think).  The server is all IW / service / httpsys, no IIS so there shouldn't be anything being registered that I'm not doing myself.  

In my last test I started 8  instances in a row where 1 - 5 succeeded, 6 - 7 failed, then 8 succeeded.

net start ms1

netsh http show servicestate > ss1.txt
net start ms2
netsh http show servicestate > ss2.txt
net start ms3
netsh http show servicestate > ss3.txt
net start ms4
netsh http show servicestate > ss4.txt
net start ms5
netsh http show servicestate > ss5.txt
net start ms6
netsh http show servicestate > ss6.txt
net start ms7
netsh http show servicestate > ss7.txt
net start ms8
netsh http show servicestate > ss8.txt


In my code I'm initialized the SC like this:

Code:
void __fastcall TIWServerController::IWServerControllerBaseConfig(TObject *Sender)
{
  String dir = ExcludeTrailingBackslash(ExtractFileDir(Application->ExeName));

  AppName = ChangeFileExt(ExtractFileName(Application->ExeName),"").UpperCase();
  HttpSysOptions->VirtualHostNames = AppName.LowerCase()+".abc.com";
  HttpSysOptions->AddDefaultBinding = false;
  HttpSysOptions->HostWildcard = hwWeak;
}

If I put a 6 second delay between starting each next instance I don't seem to get the failures (not an option on boot up though).  It seems like some kind of timing issue, maybe the error isn't really a url reservation issue.
Reply
#26
Did some more digging, a new theory below:

>>This error message "A call to "HttpCreateRequestQueue"
>>failed: Cannot create a file when that file already exists"
>>is pretty clear about the problem: There is a conflicting
>>name reservation on that same machine...

It looks like a 'conflicting name reservation on that same machine' comes from HttpAddUrlToUrlGroup, not HttpCreateRequestQueue.  For HttpCreateRequestQueue ERROR_ALREADY_EXISTS is 'The pName parameter conflicts with an existing request queue that contains an identical name'.  Based on the output of 'netsh http show servicestate' (thanks JNP for that) pName parameter may be an IW created value like 'IW_Q_215281600' which is colliding and creating the failure.

netsh http show servicestate output:

Server session ID: EE00000220000052
    Version: 2.0
    State: Active
    Properties:
        Max bandwidth: 4294967295
        Timeouts:
            Entity body timeout (secs): 120
            Drain entity body timeout (secs): 120
            Request queue timeout (secs): 120
            Idle connection timeout (secs): 120
            Header wait timeout (secs): 120
            Minimum send rate (bytes/sec): 150
    URL groups:
    URL group ID: F40000024000004D
        State: Active
        Request queue name: IW_Q_215281600
        Properties:
            Max bandwidth: inherited
            Max connections: inherited
            Timeouts:
                Timeout values inherited
            Number of registered URLs: 2
            Registered URLs:
                HTTPS://MS8.ABC.COM:443/TILES/
                HTTP://MS8.ABC.COM:80/TILES/
Reply
#27
Please update to IW 15.2.37 and see if it still happens. If your theory is correct, it shouldn't happen anymore
Reply
#28
Did a few quick tests with .37, no problems anymore starting the multiple instances.  Thanks for the fix.
Reply
#29
Great! thanks for your test and feedback!
Reply
#30
For my curiosity, how many instances have you started ?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)