Help
  • Explore Community Expore Community
  • Get started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Brand Logo
Help
  • Explore Community Explore Community
  • Get started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
close
  • Community Home
  • Forums
    • By Topic
    • By Topic
      EcoStruxure Building
      • Field Devices Forum
      • SmartConnector Forum
      EcoStruxure Power & Grid
      • EcoStruxure Asset Advisor
      • Gateways and Energy Servers
      • Metering & Power Quality
      • Protection & Control
      APC UPS, Critical Power, Cooling and Racks
      • APC UPS Data Center & Enterprise Solutions Forum
      • APC UPS for Home and Office Forum
      EcoStruxure IT
      • EcoStruxure IT forum
      • EcoStruxure IT™ Advisor CFD
      Remote Operations
      • EcoStruxure Geo SCADA Expert Forum
      • Remote Operations Forum
      Industrial Automation
      • Alliance System Integrators Forum
      • AVEVA Plant SCADA Forum
      • CPG Expert Forum DACH
      • EcoStruxure Automation Expert / IEC 61499 Forum
      • Fabrika ve Makina Otomasyonu Çözümleri
      • Harmony Control Customization Forum
      • Industrial Edge Computing Forum
      • Industry Automation and Control Forum
      • Korea Industrial Automation Forum
      • Machine Automation Forum
      • Modicon PAC Forum
      • PLC Club Indonesia
      Schneider Electric Wiser
      • Schneider Electric Wiser Forum
      Power Distribution IEC
      • Eldistribution & Fastighetsautomation
      • Elektrik Tasarım Dağıtım ve Uygulama Çözümleri
      • Paneelbouw & Energie Distributie
      • Power Distribution and Digital
      • Solutions for Motor Management
      • Specifiers Club ZA Forum
      • Електропроектанти България
      Power Distribution NEMA
      • Power Monitoring and Energy Automation NAM
      Power Distribution Software
      • EcoStruxure Power Design Forum
      • LayoutFAST User Group Forum
      Energy & Sustainability Services
      • Green Building Scoring and Certification Forum
      Light and Room Control
      • SpaceLogic C-Bus Forum
      Solutions for your Business
      • Solutions for your Business Forum
      Support
      • Ask the Community
  • Knowledge Center
    • Building Automation Knowledge Base
    • Remote Operations Devices Knowledge Base
    • Geo SCADA Knowledge Base
    • Industrial Automation How-to videos
    • Digital E-books
    • Success Stories Corner
    • EcoStruxure IT Help Center
  • Events & Webinars
    • All Events
    • Innovation Talks
    • Innovation Summit
    • Let's Exchange Series
    • Partner Success
    • Technology Partners
  • Ideas
    • EcoStruxure Building
      • EcoStruxure Building Advisor Ideas
      Remote Operations
      • EcoStruxure Geo SCADA Expert Ideas
      • Remote Operations Devices Ideas
      Industrial Automation
      • Modicon Ideas & new features
  • Blogs
    • By Topic
    • By Topic
      EcoStruxure Power & Grid
      • Backstage Access Resources
      EcoStruxure IT
      • EcoStruxure IT™ Advisor CFD
      Remote Operations
      • Remote Operations Blog
      Industrial Automation
      • Industrie du Futur France
      • Industry 4.0 Blog
      Power Distribution NEMA
      • NEMA Power Foundations Blog
      Energy & Sustainability Services
      • Active Energy Management Blog
      Light and Room Control
      • KNX Blog
      Knowledge Center
      • Digital E-books
      • Geo SCADA Knowledge Base
      • Industrial Automation How-to videos
      • Remote Operations Devices Knowledge Base
      • Success Stories Corner
  • companyImpact

Sockets

Geo SCADA Knowledge Base

Access vast amounts of technical know-how and pro tips from our community of Geo SCADA experts.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Knowledge Center
  • Geo SCADA Knowledge Base
  • Sockets
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Labels
Top Labels
  • Alphabetical
  • database 32
  • Web Server and Client 31
  • Lists, Events & Alarms 21
  • WebX 19
  • Request Form 18
  • ViewX 15
  • Setup 12
  • Application Programming 12
  • Telemetry 7
  • Mimic Graphics 7
  • Downloads 6
  • Support 5
  • IoT 5
  • Drivers and Communications 4
  • security 4
  • SCADA 4
  • Geo SCADA Expert 4
  • DNP 3 3
  • IEC 61131-3 Logic 3
  • Events & Alarms 2
  • Trends and Historian 2
  • Virtual ViewX 2
  • Lists 2
  • Privacy Policy 1
  • OPC-UA 1
  • Architectures 1
  • Templates and Instances 1
  • ClearSCADA 1
  • Releases 1
  • Maps and GIS 1
  • Tools & Resources 1
  • Mobile 1
  • Geo Scada 1
  • Previous
  • 1 of 4
  • Next
Latest Blog Posts
  • Geo SCADA Expert 2022
  • Geo SCADA 2022 Operating System Support
  • Geo SCADA 2022 Upgrade Strategy
  • Geo SCADA 2022 Upgrade Notes
  • Geo SCADA 2022 Known Issues
Related Products
product field
Schneider Electric
EcoStruxure™ Geo SCADA Expert

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
sbeadle1
Spock sbeadle1 Spock
Spock
‎2021-06-09 06:14 PM
0 Likes
0
597
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2021-06-09 06:14 PM

Sockets

Originally published on Geo SCADA Knowledge Base by sbeadle1 | June 10, 2021 03:14 AM

📖 Home  Back  

Overview

Sockets provide communications between DBserver, drivers, clients and the outside world. As with all resources on computers the possible sockets available for use are limited and if they get used up it can cause problems with ClearSCADA.

By default, on Windows, the ephemeral ports are in the range 1024 to 5000. Ephemeral ports are allocated to processes need to be able to communicate but don't require a specific port number. ClearSCADA uses ephemeral ports for the following communications:

 

  • ViewX to server connections

 

  • Server to ViewX advise connections

 

  • WebX to server connections

 

  • Server-driver connections

 

  • Telnet listen ports for diagnostics

If you run out of sockets the above connections may have problems establishing fully (or at all) and so you will have problems on the system, such as drivers not starting or ViewX not connecting. Remote diagnostic facilities (Remote Desktop, VNC, remote file access, etc) will also likely be affected.

Finding Out Socket Usage

The simplest way to find out the sockets currently in use is to use the inbuilt Windows netstat command.

'netstat -ano' or 'netstat -bn'


The above command will list all active sockets. You will be able to see sockets that are waiting for a connection, have established, are waiting to expire, etc. If you see a large number of sockets and the range 1024-5000 all showing in use this indicates a potential socket issue. Note that netstat shows all sockets, not just those on the ephemeral ports.

Sadly netstat doesn't show which process is using which socket, all it tells you is how many sockets are in use. To find out which socket is being used by which process (and so which process could be having issues) you can use the Sysinternals] tool TCPView. This is a graphical tool that will show real-time information about sockets and their owning process.

tcpview.pngtcpview.png
The above screenshot shows an example TCPView session (PL183 is the local host name). It has examples of dbserver.exe listening on port 5481 and 8080, an outgoing client advise connection to port 5500 and an incoming client connection from port 4971.

The above screenshot also shows the example dbserver-driver connection, for example between dbserver and DriverModbusSlave on ports 4979 and 4974 respectively.

TCPView also comes with tcpvcon.exe, a command line based version which can be used in place of netstat in automated batch files.

tcpvcon -anc

Causes of Increased Sockets

The following items list possible causes as to why you are using more sockets than "normal"

 

  • Each ViewX client will use a few sockets.

 

  • Other clients will use sockets, although less of them.

 

  • TCP/IP outstations will all make individual socket connections.

 

  • Resource leak, such as a bug in code not closing sockets when not in use anymore or network card driver issues.

Increasing the Available Ports

The default range of 1024-5000 is fine for normal usage however with ClearSCADA it sometimes isn't enough. There are two options, both of which can be implemented as deemed necessary.

Increasing the Range

You can increase the maximum port value from the default 5000. This is configured in

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\MaxUserPort (REG_DWORD)


Setting this value to be higher and rebooting increases the port range. A suggested change is to 15,000 (0x3A98), maximum is 65,534 (0xFFFE)

See http://support.microsoft.com/kb/196271 for more information from Microsoft.

Decreasing the Timeout

When a socket is closed it hangs around in memory in case the process wants to use it again (see TIMED_WAIT in above screenshot). This is for efficiency reasons but can mean more sockets are out of selection if a lot of sockets close and open regularly. The timeout it waits can be dropped from the default of 240 to something less as required.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\TcpTimedWaitDelay (REG_DWORD)

 

Valid range is 30-300 (0x1E-0x12C). A suggested value to try is 60 or 90. Again a reboot is required for the changes to take effect.

See http://support.microsoft.com/kb/149532 for more information from Microsoft.

See http://www.samag.com/documents/s=1176/sam9907d/9907d.htm for some useful information on TCP connection states and problems.

Go: Home Back

Author

Biography

sbeadle1

Link copied. Please paste this link to share this article on your social media post.

  • Back to Stream
  • Newer Article
  • Older Article
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this forum after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the forum - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2023 Schneider Electric, Inc