Hi,
I want to run a OPC UA server in a docker container. As base imageI tried ubuntu 22.04 and debian 12.
On both systems I have installed the C++sdk and built the example from server_hello_world.
When I try to run the server I get the following assertion error while initializing the UA Stack platform layer:
/app/uasdkcppbundle-src-linux-v1.8.0-601/src/uabase/uabasecpp/uaplatformlayer.cpp:438: static int UaPlatformLayer::init(): Assertion `(((uStatus) & 0xC0000000) == 0x00000000)' f
Before running the server in a docker container I tested the steps with linking the sdk and building the server on two virtual machines, each with ubuntu 22.04 and debian 11. On the virtual machines I could start the OPC UA - server.
In general is it possible to run the server with the sdk in a docker container?
Thanks
Bao
OPC UA - Server in a docker container
Moderator: uasdkcpp
- uasdkcpp
- Jr. Member
- Posts: 4
- Joined: 04 Jun 2020, 16:23
Re: OPC UA - Server in a docker container
Hi Bao,
the platform layer initialization fails most probably because the process limit of open file descriptors is larger than the FD_SETSIZE define on that platform. That configuration may lead to crashes when opening many files and dealing with an fd_set (like the SDK does). You can adjust this limit to match your platforms FD_SETSIZE by either using the "ulimit" command in your shell which starts the uaservercpp exe or by calling setrlimit() in your application.
Please note that it is only allowed by our SLA to distribute the prebuilt server in a docker container, not (parts of) the SDK.
the platform layer initialization fails most probably because the process limit of open file descriptors is larger than the FD_SETSIZE define on that platform. That configuration may lead to crashes when opening many files and dealing with an fd_set (like the SDK does). You can adjust this limit to match your platforms FD_SETSIZE by either using the "ulimit" command in your shell which starts the uaservercpp exe or by calling setrlimit() in your application.
Please note that it is only allowed by our SLA to distribute the prebuilt server in a docker container, not (parts of) the SDK.
Best regards
Unified Automation Support Team
Unified Automation Support Team
-
- Jr. Member
- Posts: 2
- Joined: 11 Jul 2023, 15:40
Re: OPC UA - Server in a docker container
Perfect, thank you very much!