Jump to content

aristeo

Members
  • Posts

    157
  • Joined

  • Last visited

  • Days Won

    3

aristeo last won the day on July 18 2019

aristeo had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

aristeo's Achievements

Active Member

Active Member (3/4)

5

Reputation

  1. I'm trying to implement Server-Sent Events (SSE) in HyperServer. I need to be able to make a GET request to a specific node. I plan to capture this request within the onHTTPCommand event of the ServerModule. How can I make this GET request to a specific node, given that I already know its port?
  2. It turns out this is a Cloudflare issue. We have Cloudflare acting as a proxy, and intermittently it strips out the Content-Length header (verified in the IIS logs). This is very strange behavior, as it only happens occasionally. The absence of the Content-Length header causes a failure in the uniGUIISAPI.pas unit of uniGUI, specifically in the PrepareRequest procedure: SetLength(sBuf, ECB.cbTotalBytes); System.Move(ECB.lpbData^, sBuf[1], ABytes); Since the correct size of sBuf cannot be determined, this results in an access violation. Once I know what to do on the Cloudflare side to address this, I’ll share it here.
  3. Another potentially important detail is that the server where the application is hosted is behind a Cloudflare proxy.
  4. From an AWS Service
  5. Could the URL referer header be causing the problem? The error seems to occur when the request is made from a different domain than the one the application is hosted on. I mention this because I don't think it's possible to access headers in the OnHttpCommand event in uniGUI.
  6. Initially, we thought the error was occurring during a HyperServer deployment. The error appeared in the HyperServer DLL log, but not in the logs of the individual nodes. Subsequently, we deployed the application as an ISAPI module (not HyperServer), and the same error also occurred. In both cases, the error happens randomly, and if the same request is re-tried just seconds later, it's processed correctly. This seems to be an issue with how uniGUI handles requests to its endpoints. Specifically, this is a POST request with a body. We are not using headers because it appears that uniGUI doesn't allow it.
  7. The issue is not related to HyperServer. When deployed as ISAPI, the same error appears in the log as with the HyperServer library. It’s quite strange, because when the error occurs, retrying the request a few seconds later does not produce any error.
  8. {"jwt": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJDQUkgU2lzdGVtYXMgSW5mb3Jtw6F0aWNvcyBTLkwuIiwiZXhwIjoxNzU0NDc1OTgzLCJuYmYiOjE3NTQzODkyODMsImlhdCI6MTc1NDM4OTU4MywicHJ1ZWJhcyI6IlMiLCJhcGlrZXkiOiJEQzY4RUYzMi02MUIzLTRCMjAtQTJFQy1FNEIzRDNFMjM4MTYiLCJpZF9zaWYiOiIwMiIsIm51bWVyb19pbnN0YWxhY2lvbiI6IjQxQTY2RDU4NjA0MjRENDNBNzUxNEVGRDgxNzQzMDQwIn0.Ml-TR-4eWNZ1HUspK79BZiRCcOVDRlhI2_uDRLrMfVOVpkfsDBftsCzOFMf5VC1cpcE-PLRrP6Wtjuw4ohBLpg","url": "https://facturacion.api-caisoft.es/caifacweb/webapp/caifacweb.dll"}
  9. 1.95.0.1603
  10. The code works well in most cases. When it fails, I believe the request does not reach the node, since nothing appears in the node logs. I also think, although I’m not completely sure, that this happens when requests are made from a location different from the server where the application is hosted. if SameText(ARequestInfo.URI, '/facturas/enviar') then begin loStream := ARequestInfo.PostStream; if Assigned(loStream) then begin loStream.Position := 0; var jBody := TJSONObject(TJSONObject.ParseJSONValue(UTF8Decode(ReadStringFromStream(loStream)))); try enviaAEAT('bearer ' + jBody.GetValue<string>('jwt'), jBody.GetValue<string>('url')); finally FreeAndNil(jBody); end; end; Handled := True; end
  11. In our web application, we need certain endpoints, which we capture in the OnHttpCommand event of the UniServerModule. However, we are experiencing a problem where, randomly, when this endpoint is called, the Hyperserver log shows the following errors. caifacweb.dll: 000024F0: 10:48:33 [DeployNewBinary()]:New binary <caifacweb.dep> deployed. caifacweb.dll: 0000171C: 12:24:41 [HttpExtensionProc[]]:EAccessViolation : Access violation at address 06294C4B in module 'caifacweb.dll'. Write of address 00000008 : Addr: $06294C4B caifacweb.dll: 00002528: 12:26:26 [HttpExtensionProc[]]:EAccessViolation : Access violation at address 06294C4B in module 'caifacweb.dll'. Write of address 00000008 : Addr: $06294C4B
  12. Hello randomly our isapi hyperserver restarts once a day when there are active sessions, and the log that is recorded is this. How could we solve this? caicontaweb.dll: 00001688: 17:47:33 []:>--------------------------------------------------------------< caicontaweb.dll: 00001688: 17:47:33 []:Starting Server. Module Handle: 0000000000400000 caicontaweb.dll: 00001688: 17:47:33 [TUniServerModule]:Server First Init. caicontaweb.dll: 00001688: 17:47:33 [TUniServerModule]:Start Path = C:\inetpub\wwwroot\caicontaweb\WebApp\ caicontaweb.dll: 00001688: 17:47:33 [TUniHyperServer]:InitInterceptor caicontaweb.dll: 00001688: 17:47:33 []:Transport.PoolSize: 750 caicontaweb.dll: 00001688: 17:47:33 [TUniHyperNodeManager]:Orphaned Node #7 found. caicontaweb.dll: 00001688: 17:47:33 [TUniHyperNodeManager]:Orphaned Node #5 found. caicontaweb.dll: 00001688: 17:47:33 [TUniHyperNodeManager]:Orphaned Node #0 found. caicontaweb.dll: 00001688: 17:47:33 [TUniHyperNodeManager]:Orphaned Node #3 found. caicontaweb.dll: 00001688: 17:47:33 [TUniHyperNodeManager]:Orphaned Node #2 found. caicontaweb.dll: 00001688: 17:47:33 [TUniHyperNodeManager]:Orphaned Node #1 found. caicontaweb.dll: 00001688: 17:47:33 [TUniHyperNodeManager]:Orphaned Node #6 found. caicontaweb.dll: 00001688: 17:47:33 [TUniHyperNodeManager]:Orphaned Node #4 found. caicontaweb.dll: 00001688: 17:47:33 []:Server Started. Module Handle: 0000000000400000 caicontaweb.dll: 00001468: 17:48:04 [HttpExtensionProc[172.71.134.186]]:EUniHyperServerException : TUniHyperServer.HandleHTTPRequest(), Node:[1], EIdReadTimeout, Read timed out. : Addr: $05FC8D45 caicontaweb.dll: 00000B54: 17:48:07 [HttpExtensionProc[172.71.134.186]]:EUniHyperServerException : TUniHyperServer.HandleHTTPRequest(), Node:[1], EIdReadTimeout, Read timed out. : Addr: $05FC8D45 caicontaweb.dll: 00000914: 17:48:14 []:Terminating ISAPI Server. Module Handle: 0000000005C40000 caicontaweb.dll: 00000914: 17:48:14 [TUniServerModule]:Shutting Down Server. caicontaweb.dll: 00000914: 17:48:14 [TUniHyperServer]:Terminating... caicontaweb.dll: 00000914: 17:48:14 [TUniHyperNodeManager]:Terminating... No notificarme Compartir Escalate Resolver esta incidencia Cancel request Compartido con
  13. google calendar

  14. We are making periodic requests from outside to verify that a web application is ok. For this we have an endpoint implemented in the OnHTTPCommand event. Is it possible to somehow make that request to the persistentNode? What would the URL be? Thanks
×
×
  • Create New...