Server disconnecting missing

Forum Home Forums Runtime Bugs Server Bugs Server disconnecting missing

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8690
    AvatarArtos9
    Participant

    Hello,
    I’m working about Rapid Scada Integration with using ServerComm class in source code.

    I had an issue with disconnecting with Scada Server only on Linux.

    Process is:
    1. Create comm settings.

    CommSettings settings = new CommSettings("localhost", 10000,
                                "ScadaServerCtrl", "12345", 10000);
                                Log log = new Log(Log.Formats.Full);

    2. Creating connection and data instance

    ServerComm serverComm = new ServerComm(settings,log);
     SrezTableLight.Srez curSrez = new SrezTableLight.Srez(datetime,tab);

    3. Fill data and SendArchive

    curSrez.SetCnlData(mapping[j].channel_num,prob[j]);
    bool dataSent = serverComm.SendArchive(curSrez, out res);

    4. Close connection
    serverComm.Close();

    ScadaServerSvc.log shows log only connected and authorized logs:
    2021-04-09 11:58:08 <kroll-VirtualBox><root><ACT> ScadaServerService 5.1.4.0 is started
    2021-04-09 11:58:08 <kroll-VirtualBox><root><ACT> Module is loaded from the file /opt/scada/ScadaServer/Mod/ModAutoControl.dll
    2021-04-09 11:58:09 <kroll-VirtualBox><root><ACT> Module is loaded from the file /opt/scada/ScadaServer/Mod/ModDBExport.dll
    2021-04-09 11:58:09 <kroll-VirtualBox><root><ACT> Check the existence of the data directories is completed successfully
    2021-04-09 11:58:09 <kroll-VirtualBox><root><ACT> Check the existence of the configuration database files is completed successfully
    2021-04-09 11:58:09 <kroll-VirtualBox><root><ACT> Input channels are read from the configuration database. Active channel count: 211
    2021-04-09 11:58:09 <kroll-VirtualBox><root><ACT> Ouput channels are read from the configuration database
    2021-04-09 11:58:09 <kroll-VirtualBox><root><ACT> Users are read from the configuration database
    2021-04-09 11:58:09 <kroll-VirtualBox><root><ACT> Formulas are read from the configuration database
    2021-04-09 11:58:11 <kroll-VirtualBox><root><ACT> The formulas source code has been compiled
    2021-04-09 11:58:11 <kroll-VirtualBox><root><ACT> Connection listener is started
    2021-04-09 11:58:11 <kroll-VirtualBox><root><ACT> Start server
    2021-04-09 11:58:11 <kroll-VirtualBox><root><ACT> Current data are not loaded
    2021-04-09 11:58:20 <kroll-VirtualBox><root><ACT> Connect to client 127.0.0.1
    2021-04-09 11:58:20 <kroll-VirtualBox><root><ACT> The user ScadaComm is successfully authenticated
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> Connect to client 127.0.0.1
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> The user ScadaServerCtrl is successfully authenticated
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> Connect to client 127.0.0.1
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> The user ScadaServerCtrl is successfully authenticated
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> Connect to client 127.0.0.1
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> The user ScadaServerCtrl is successfully authenticated
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> Connect to client 127.0.0.1
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> The user ScadaServerCtrl is successfully authenticated
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> Connect to client 127.0.0.1
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> The user ScadaServerCtrl is successfully authenticated
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> Connect to client 127.0.0.1
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> The user ScadaServerCtrl is successfully authenticated
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> Connect to client 127.0.0.1
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> The user ScadaServerCtrl is successfully authenticated
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> Connect to client 127.0.0.1
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> The user ScadaServerCtrl is successfully authenticated
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> Connect to client 127.0.0.1
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> The user ScadaServerCtrl is successfully authenticated
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> Connect to client 127.0.0.1
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> The user ScadaServerCtrl is successfully authenticated
    2021-04-09 12:07:00 <kroll-VirtualBox><root><ACT> Connect to client 127.0.0.1

    Finally after near 1000 opened connections I can see exception in code:
    Error receiving data: Error connecting to SCADA-Server: Unable to read data from the transport connection: Operation on non-blocking socket would block.

    Do you have some solutions?

    Thanks you.

    • This topic was modified 3 weeks, 6 days ago by AvatarArtos9.
    #8697
    MikhailMikhail
    Moderator

    Hello,

    Probably 1000 connections is too many for Mono .NET framework. As I remember, an OS has a limit of open connections. It’s possible to find a command to change this limit.
    For what reason do you need so many connections?

    #8817
    AvatarArtos9
    Participant

    Hello,
    Yes, I change process for one connection. And it works well and faster.
    Thanks you.

    • This reply was modified 1 week, 3 days ago by AvatarArtos9.
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.