Need Help with ProductCheckOnStartup

19:38:24 INF] Job Initialized
[19:38:25 FTL] Error: Unsuccessful () low level call on GET: /_cluster/health?pretty=true&error_trace=true

Audit trail of this API call:

- [1] ProductCheckOnStartup: Took: 00:00:00.1116282
- [2] ProductCheckFailure: Node: https://abcd.com:9200/ Exception: PlatformNotSupportedException Took: 00:00:00.0959442
- [3] PingFailure: Node: https://abcd.com:9200/ Exception: PlatformNotSupportedException Took: 00:00:00.0010391

OriginalException: Elasticsearch.Net.ElasticsearchClientException: Failed to ping the specified node. Call: unknown resource

---> Elasticsearch.Net.PipelineException: Failed to ping the specified node.
---> System.PlatformNotSupportedException: The information requested is unavailable on the current platform.
at System.Net.NetworkInformation.StringParsingHelpers.ParseActiveTcpConnectionsFromFiles(String , String )
at System.Net.NetworkInformation.LinuxIPGlobalProperties.GetActiveTcpConnections()
at Elasticsearch.Net.Diagnostics.TcpStats.GetActiveTcpConnections()
at Elasticsearch.Net.Diagnostics.TcpStats.GetStates()
at Elasticsearch.Net.HttpConnection.RequestAsync[TResponse](RequestData requestData, CancellationToken cancellationToken)
at Elasticsearch.Net.RequestPipeline.PingAsync(Node node, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Elasticsearch.Net.RequestPipeline.PingAsync(Node node, CancellationToken cancellationToken)
at Elasticsearch.Net.Transport1.PingAsync(IRequestPipeline pipeline, Node node, CancellationToken cancellationToken) at Elasticsearch.Net.Transport1.PingAsync(IRequestPipeline pipeline, Node node, CancellationToken cancellationToken)
at Elasticsearch.Net.Transport`1.RequestAsync[TResponse](HttpMethod method, String path, CancellationToken cancellationToken, PostData data, IRequestParameters requestParameters)
--- End of inner exception stack trace ---

Audit exception in step 2 ProductCheckFailure:

System.PlatformNotSupportedException: The information requested is unavailable on the current platform.
at System.Net.NetworkInformation.StringParsingHelpers.ParseActiveTcpConnectionsFromFiles(String , String )
at System.Net.NetworkInformation.LinuxIPGlobalProperties.GetActiveTcpConnections()
at Elasticsearch.Net.Diagnostics.TcpStats.GetActiveTcpConnections()
at Elasticsearch.Net.Diagnostics.TcpStats.GetStates()
at Elasticsearch.Net.HttpConnection.RequestAsync[TResponse](RequestData requestData, CancellationToken cancellationToken)
at Elasticsearch.Net.RequestPipeline.ProductCheckAsync(Node node, CancellationToken cancellationToken)

Audit exception in step 3 PingFailure:

System.PlatformNotSupportedException: The information requested is unavailable on the current platform.
at System.Net.NetworkInformation.StringParsingHelpers.ParseActiveTcpConnectionsFromFiles(String , String )
at System.Net.NetworkInformation.LinuxIPGlobalProperties.GetActiveTcpConnections()
at Elasticsearch.Net.Diagnostics.TcpStats.GetActiveTcpConnections()
at Elasticsearch.Net.Diagnostics.TcpStats.GetStates()
at Elasticsearch.Net.HttpConnection.RequestAsync[TResponse](RequestData requestData, CancellationToken cancellationToken)
at Elasticsearch.Net.RequestPipeline.PingAsync(Node node, CancellationToken cancellationToken)

Request:

<Request stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>

Response:

[19:38:25 INF] Failed to retrieve cluster health:
[19:38:25 INF] Application started. Press Ctrl+C to shut down.
[19:38:25 INF] Hosting environment: NonProd
[19:38:25 INF] Content root path: /home/ndxppuser

to add context to the above issue, I have a .net 6 console app which has been deployed in Linux x64 using Kubernetes and Windows VM. Windows Vm is working as expected but linuxx64 throws the above error, firewall is checked and open.
What does PlatformNotSupportedException means - it is not supported in Linux runtime ?

Audit trail of this API call:

- [1] ProductCheckOnStartup: Took: 00:00:00.1116282
- [2] ProductCheckFailure: Node: https://abc.com:9200/ Exception: PlatformNotSupportedException Took: 00:00:00.0959442
- [3] PingFailure: Node: https://abc.com:9200/ Exception: PlatformNotSupportedException Took: 00:00:00.0010391

Which version of Elasticsearch is your cluster running?

@Priyam_Mozumder What Linux version are you deploying to? Looking at the stack trace, this exception comes from the .NET runtime libraries, not our code. It suggests that the .NET runtime does not support the current platform.

Looking at the runtime code, I can see that in .NET 6, it may throw this exception due to this line of code. .NET expects to read from some files to get required networking information.

Changes were made to the code in .NET 7 which may resolve your issue. If not, you should check that a) Microsoft supports the Linux version for .NET and b) ensure that your image contains the networking files on Linux that Microsoft depend on. In restricted environments such as a container with limited access, shared hosting, chroot and other forms of sandbox, .NET process may not have read permissions on procfs files, while the file may exist.

Our library may call this code path for the TCP information when DebugMode is enabled or you explicitly configure the client to collect TCP statistics. You could try disabling that setting to validate if it triggers this issue.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.