WebRequest returns undocumented code 1009 with error 5203 for one domain only

Hello. In a newly installed terminal, WebRequest() returns 1009 and GetLastError() returns 5203 for one domain. Another terminal on the same VPS reaches the same domain without any problem. I tested with a simple GET script on a live chart, and the results are below.


Terminal A (build 6295, newly installed):
  my-server.example, 2 URLs     res=1009  err=5203  no body, no headers, 0-16 ms
  www.google.com, https/http    res=200

Terminal B (build 6230, same VPS):
  All of the above              res=200

Clean install of build 6296 (Windows Server 2019, another VPS, 10 other terminals running):
  my-server.example             res=200

On the failing VPS, Invoke-WebRequest in PowerShell returns 200 for the same domain. The domain has an IPv4 address only. The real domain name is replaced here, and I can share it by private message if needed.


I have three questions:

1. What does the return code 1009 mean? I could not find it in the documentation.

2. Is there a log or a setting that shows why the terminal fails for one host only?

3. Was anything changed in the WebRequest connection handling between builds 6230 and 6295?


I posted this topic in the Japanese forum by mistake first, and I cannot delete it myself. Moderators may remove it: https://www.mql5.com/ja/forum/520099

Thank you for your help.

Ta Hai Shen Yuan:

Hello. In a newly installed terminal, WebRequest() returns 1009 and GetLastError() returns 5203 for one domain. Another terminal on the same VPS reaches the same domain without any problem. I tested with a simple GET script on a live chart, and the results are below.


On the failing VPS, Invoke-WebRequest in PowerShell returns 200 for the same domain. The domain has an IPv4 address only. The real domain name is replaced here, and I can share it by private message if needed.


I have three questions:

1. What does the return code 1009 mean? I could not find it in the documentation.

2. Is there a log or a setting that shows why the terminal fails for one host only?

3. Was anything changed in the WebRequest connection handling between builds 6230 and 6295?


I posted this topic in the Japanese forum by mistake first, and I cannot delete it myself. Moderators may remove it: https://www.mql5.com/ja/forum/520099

Thank you for your help.

What OS is running on the Terminal returning 1009 ?

What's that ?

my-server.example
Alain Verleyen #:

What OS is running on the Terminal returning 1009 ?

What's that ?

Thank you for your reply.

The terminal returning 1009 runs on Windows Server 2019 (OS build 17763). It is on the same VPS as Terminal B, which works with build 6230.

The name my-server.example is a placeholder. I replaced the real domain because it is my own server and I prefer not to publish it here. I will send you the real domain by private message.

Forum on trading, automated trading systems and testing trading strategies

MQL5 VPS synchronization fails – Error 1009 (TLS certificate verify failed, -188)

Sergey El, 2026.11.12 14:19

Please complete the following steps and check whether the issue persists:

  1. Update Windows: Install the latest available Windows updates and restart your computer.
  2. Update MetaTrader: Update your MetaTrader terminal to build 6314 or newer, then restart the terminal.

1009 is a terminal error, not an HTTP status, and 5203 is ERR_WEBREQUEST_REQUEST_FAILED: it dies in the terminal's TLS stack, no headers arrive. That matches the 6294+ SNI regression. The same build works on another host, build 6230 works on yours. Update to 6314+, or roll back to 6231.

Thank you all for your help.

One user set up the terminal again this morning, and WebRequest to my domain works now. The terminal is still on build 6295, the same build that returned 1009 before. So the build itself does not seem to be the cause, and I do not know what changed.

The other user still gets the same failure on a new terminal with build 6296. If anyone knows what terminal state could cause 1009 for one host only, I would appreciate any hints.