EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-15 08:48 PM . Last Modified: 2023-05-02 11:47 PM
Hi,
I am running the Csharp sample utility "SetInternalPoint" provided by Steve Beadle on GitHub (@https://github.com/GeoSCADA/Utilities-and-Examples/blob/main/SetInternalPoint/Program.cs).
The program compiles and executes without problems but when it reaches:
"connection.Connect(node)"
it always hangs and times out without any response from the API.
I am running GeoSCADA Expert 2021 Version 6.84.9269.1 on Windows 10 Enterprise (10.0.19045).
Both GeoSCADA and Visual Studio are running in a single VMWare VM. This is a development machine only.
I have disabled all firewalls and virus scanners in VM. I can ping localhost and 127.0.0.1. Default Port 5481 is assigned to GeoSCADA.
My thinking is that there are no issues with the sample code but I'm wondering if there could be a setting required in GeoSCADA or Windows to allow this API call?
Thanks
Mike
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-17 07:29 AM
That is exactly it! .Net and Framework are not compatible (thanks Microsoft!)
I guess we will release Geo SCADA with .Net some time in the future, but now you need to use Framework.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-15 09:39 PM
It might be worth showing the results of doing something like a TCPing for 127.0.0.1:5481 if these are the configs you still have in your .NET application.
I can't recall anymore if a Trial licence allows .NET / remote connections. You can normally engage with your local Schneider rep to get some short duration licences which would provide more complete functionality.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-16 03:10 AM
An unlicensed Geo SCADA server has one Data Access user license. If you have another app connecting up then you hit the limit. This includes using the OPC UA Server, which consumes a Data Access user license.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-16 03:32 AM
Thanks Bevan. My GeoSCADA server IP address is 192.168.18.5. Below screenshot shows port 5481 is active and responsive using both the NIC and local loopback (127.0.0.1).
I initially opened a case with Schneider Tech Support but they later said the Client API is not in their scope and all support is via this forum. They did however mention 2 important things:
1. They could run the program on their test server and it worked fine.
2. The license should not affect the API call and it should work even with the demo license.
In my case I've tried it with several licenses including a development license. All have the same symptoms.
Any suggestions much appreciated.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-16 04:01 AM
It could well be a license issue, but I did also try it using our Server Dongle which has 256 Data Access Client
limit.
I also noticed that when I run the program in Visual Studio the Data Access Client does actually increase from 0 to 1. I guess this means that GeoSCADA is atleast getting the API call, but for whatever reason decides not to respond, or maybe it responds but the response gets lost or blocked by something else.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-16 04:02 AM
"it always hangs and times out without any response from the API."
What is the exception info?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-16 04:07 AM
After 30 seconds it returns "Unable to communicate with Geo SCADA server." and exits the program.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-16 04:12 AM
Please check the server log DB_nnn.log at the time of connection - any clues there.
I'm sure this will be a head-slapping 'oh, now I know' moment when the issue is found!
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-16 04:38 AM . Last Modified: 2023-03-16 04:40 AM
Nothing immediate pops out from the log files. Below are snippets of the log at the time of API call, and also when it 'times-out'.
At time of API Call the log file shows:
---------------------------------------------------------------------------
16-MAR-2023 11:31:20.938 33CC [LUS] Lock usage, 0.4229%, over the last second (diagnostic)
16-MAR-2023 11:31:21.171 1B1C [SVR] Accepted connection 12 from 127.0.0.1:51453 to 127.0.0.1:5481 on socket 0x520...
16-MAR-2023 11:31:21.171 1B1C [SVR] ... Connection 12: Selecting FD_READ | FD_CLOSE on socket 0x520
16-MAR-2023 11:31:21.206 1B1C [SVR] ... Connection 12: Type 22, client version 6.84.8269, (Uncompressed,Floating License,NetFx,Include Checksums)
16-MAR-2023 11:31:21.206 1B1C [PL10] Parent link created
16-MAR-2023 11:31:21.206 1B1C [SVR] ... Connection 12: Selecting FD_WRITE | FD_CLOSE on socket 0x520
16-MAR-2023 11:31:21.206 1B1C [SVR] ... Connection 12: Server version 6.84.8269
16-MAR-2023 11:31:21.206 1B1C [SVR] ... Connection 12: Selecting FD_READ | FD_CLOSE on socket 0x520
16-MAR-2023 11:31:21.206 1B1C [PL10] Attaching to socket 0x520
16-MAR-2023 11:31:21.206 1B1C [PL10] Changed to state 'Connecting'
16-MAR-2023 11:31:21.206 1B1C [PL10] Changed to state 'Selecting protocol version'
16-MAR-2023 11:31:21.206 1B1C [PL10] Adding to comms thread 7 (thread ID 12680, 0x3188)
16-MAR-2023 11:31:21.213 3188 [PL10] Peer supports protocol versions 1 to 2, selected protocol version 2
16-MAR-2023 11:31:21.213 3188 [PL10] Changed to state 'Selecting connection features'
16-MAR-2023 11:31:21.221 3188 [PL10] Selected encryption type: TLS
16-MAR-2023 11:31:21.221 3188 [PL10] Changed to state 'Setting up encryption'
16-MAR-2023 11:31:21.235 3188 [PL10] Supported algorithms: AES_128 AES_256 RC4 3DES DES MD5 SHA1 SHA_256 SHA_384 SHA_512 RSA_SIGN DH_EPHEM ECDH_EPHEM DSS_SIGN ECDSA
16-MAR-2023 11:31:21.324 3188 [PL10] TLS handshake complete
16-MAR-2023 11:31:21.324 3188 [PL10] TLS connection: Protocol = TLS 1.2, Cipher = AES_256/256, Hash = SHA_384/0, Key exchange = ECDH_EPHEM/384
16-MAR-2023 11:31:21.324 3188 [PL10] Changed to state 'Connected'
16-MAR-2023 11:31:21.414 3188 [PL10] Creating virtual link PL10:CL1
16-MAR-2023 11:31:21.414 3188 [SVR] Incoming virtual connection on link PL10:CL1...
16-MAR-2023 11:31:21.414 3188 [SVR] ... Type 1, client version 6.84.8269 (Uncompressed,Floating License)
16-MAR-2023 11:31:21.415 3188 [SCX] Server link attached to link PL10:CL1
16-MAR-2023 11:31:21.415 3188 [SVR] ... Virtual link PL10:CL1: Confirmed, link version 6.84.8269, client name 'IP 127.0.0.1, Session 1'
16-MAR-2023 11:31:21.415 3188 [SVRTHR] 1 AddClient from 127.0.0.1:51453, link is [SCX] L01#07
16-MAR-2023 11:31:21.415 3188 [SCX] L01#07 QP Created
16-MAR-2023 11:31:21.415 3188 [PL10] Created local link CL1 paired with remote link CL1
16-MAR-2023 11:31:21.942 33CC [LUS] Lock usage, 0.4345%, over the last second (diagnostic)
16-MAR-2023 11:31:22.035 2D98 [LOGIC] OnSchedule() 1 programs to process
16-MAR-2023 11:31:22.531 179C [SVRTHR] 2 Timeout
16-MAR-2023 11:31:22.531 31FC [SVRADVTHR] 2 Timeout
16-MAR-2023 11:31:22.531 05D0 [SVRADVTHR] 1 Timeout
16-MAR-2023 11:31:22.531 1EF0 [SVRTHR] 1 Timeout
16-MAR-2023 11:31:22.960 33CC [LUS] Lock usage, 0.4345%, over the last second (diagnostic)
16-MAR-2023 11:31:23.977 33CC [LUS] Lock usage, 0.4355%, over the last second (diagnostic)
16-MAR-2023 11:31:24.007 2D98 [LOGIC] OnSchedule() 1 programs to process
16-MAR-2023 11:31:24.998 33CC [LUS] Lock usage, 0.4353%, over the last second (diagnostic)
16-MAR-2023 11:31:26.014 2D98 [LOGIC] OnSchedule() 1 programs to process
16-MAR-2023 11:31:26.014 33CC [LUS] Lock usage, 0.4351%, over the last second (diagnostic)
16-MAR-2023 11:31:27.029 33CC [LUS] Lock usage, 0.4341%, over the last second (diagnostic)
At time of "Unable to communicate with Geo SCADA Server" timeout, the log file shows:
------------------------------------------------------------------------------------------------------------------------------
16-MAR-2023 11:33:16.004 2D98 [LOGIC] OnSchedule() 1 programs to process
16-MAR-2023 11:33:16.816 33CC [LUS] Lock usage, 0.1994%, over the last second (diagnostic)
16-MAR-2023 11:33:17.521 179C [SVRTHR] 2 Timeout
16-MAR-2023 11:33:17.521 05D0 [SVRADVTHR] 1 Timeout
16-MAR-2023 11:33:17.522 1EF0 [SVRTHR] 1 Timeout
16-MAR-2023 11:33:17.522 31FC [SVRADVTHR] 2 Timeout
16-MAR-2023 11:33:17.817 33CC [LUS] Lock usage, 0.2117%, over the last second (diagnostic)
16-MAR-2023 11:33:18.005 2D98 [LOGIC] OnSchedule() 1 programs to process
16-MAR-2023 11:33:18.594 2D98 [LOGIC] OnSchedule() 2 programs to process
16-MAR-2023 11:33:18.830 33CC [LUS] Lock usage, 0.2123%, over the last second (diagnostic)
16-MAR-2023 11:33:19.841 33CC [LUS] Lock usage, 0.2122%, over the last second (diagnostic)
16-MAR-2023 11:33:20.017 2D98 [LOGIC] OnSchedule() 1 programs to process
16-MAR-2023 11:33:20.210 1EF0 [SCXIcon] L01#01 Poll()
16-MAR-2023 11:33:20.863 33CC [LUS] Lock usage, 0.2126%, over the last second (diagnostic)
16-MAR-2023 11:33:21.428 3188 [PL10] Virtual close with no error
16-MAR-2023 11:33:21.428 1EF0 [SVRTHR] 1 Connection 7 (link PL10:CL1) closed
16-MAR-2023 11:33:21.428 1EF0 [SCX] L01#07 Closing down
16-MAR-2023 11:33:21.428 3188 [PL10] *** Socket 0x520 closed with error: 2745 -> An established connection was aborted by the software in your host machine.
16-MAR-2023 11:33:21.428 3188 [PL10] Changed to state 'Failed'
16-MAR-2023 11:33:21.428 3188 [PL10] Virtual close with error code: 0x80072745
16-MAR-2023 11:33:21.428 3188 [PL10] Closing socket 0x520
16-MAR-2023 11:33:21.429 1EF0 [SCX] L01#07 QP Deleted
16-MAR-2023 11:33:21.429 1EF0 [SCX] L01#07 Deleting
16-MAR-2023 11:33:21.867 33CC [LUS] Lock usage, 0.1978%, over the last second (diagnostic)
16-MAR-2023 11:33:22.006 2D98 [LOGIC] OnSchedule() 1 programs to process
16-MAR-2023 11:33:22.519 31FC [SVRADVTHR] 2 Timeout
16-MAR-2023 11:33:22.519 179C [SVRTHR] 2 Timeout
16-MAR-2023 11:33:22.519 1EF0 [SVRTHR] 1 Timeout
16-MAR-2023 11:33:22.519 05D0 [SVRADVTHR] 1 Timeout
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-16 06:05 AM
I assume ViewX and (say) the Server Status tools both work on this PC?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-16 06:37 AM
Yes that's right, both ViewX and Server Status tools work fine on this PC (VMWare VM).
However please note the above screenshots were taken while running using the Server Dongle which actually has zero ViewX Client licenses.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-16 08:35 AM
[A server dongle has client-side client licenses. You can check these in the Configure Connections tool, licensing button].
I can't work out what is going on, maybe a visual studio issue. Perhaps try the Python sample?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-16 06:24 PM
I ended up re-installing Visual Studio and now it's working. Rolling eyes in disbelief. I wish I had something more concrete to report back with but this one seems to be one of those odd-ball glitches.
Thanks for all your help!
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-17 05:25 AM
As a follow up I think I've now found the real culprit. Whilst the ClearscadaClient.DLL can be added as a reference in a .NET6 Core application the functions doesn't work properly, it only seems to work in .NET Framework 4.8 applications (like the sample apps on GitHub).
This threw a spanner in the works for me since the rest of my code is written and targets .NET 6.
Have you come across this before Steve? Does it sound plausible?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-17 07:29 AM
That is exactly it! .Net and Framework are not compatible (thanks Microsoft!)
I guess we will release Geo SCADA with .Net some time in the future, but now you need to use Framework.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-17 09:17 PM
Whilst this would be a problem, I'm not convinced it's the original problem.
It would have thrown an exception about being unable to load the .NET Framework DLL's required (or that the class type couldn't be found).
Since your application needs to know how to host the appropriate framework/core DLLs, and if you picked a .NET Core application then it's not built with the knowledge of how to load .NET Framework DLLs.
I've run into this problem in other packages before. Normally it breaks during build. But if you mess around with behind the scenes configurations you can get it to build, but it wouldn't run. First attempt to instantiate a class from an opposing library breaks things.
Glad to hear it's solved though 🙂
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-22 08:51 PM
Thanks Bevan. I did give it a decent attempt to try and get the Clearscada.Client.dll to work in .NET 6 and it did seem to partly work in that it does send the connect request to GeoSCADA but it then seems to get confused in handlng the response and it just hangs and eventually times out. My gut feeling is that there is some subtle difference in how this dll behaves in .NET 6 and .NET Framework 4.8. In 'most' cases the compiler will fail to compile if the target framework is different but not in all cases.
Stacks of other people have encountered similar issues in various forums with various dll's. Frustrating for everyone, and I guess the reason why Microsoft even today don't have a migration tool to migrate to .NET 6 and above.
These days everyone is using .NET because it covers all platforms (windows, linux, android etc) whereas .NET Framework 4.8 is not being developed any longer and is for the Windows platform only. I believe it will still be supplies with the Microsoft OS but won't be supported after next year.
Thanks all for the advice and help.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.