# OPC-UA with virtual ctrlX

**URL:** <https://community.factoryio.com/t/opc-ua-with-virtual-ctrlx/3023>\
**Category:** Drivers\
**Created:** [June 26, 2024, 5:01pm UTC](https://community.factoryio.com/t/opc-ua-with-virtual-ctrlx/3023 "2024-06-26T17:01:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SiggiP](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@SiggiP](https://community.factoryio.com/u/SiggiP)\
**Post date:** [June 26, 2024, 5:01pm UTC](https://community.factoryio.com/t/opc-ua-with-virtual-ctrlx/3023/1 "2024-06-26T17:01:36Z")

</div>

I tried to connect to a ctrlX controller that runs locally in a virtual environment. The entry in the OPC server should be correct.  
 ![image](https://europe1.discourse-cdn.com/flex017/uploads/factoryio/original/1X/bd5c967c9605f9de38f918a1034eec6e110d4c82.png)  
But I get this error message:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/factoryio/original/1X/1fc7d409ec45c1d5b3e6861715fffff3ee6378b6.png)  
Another application works with these settings!

---

<div class="post-metadata">

**Author:** ![brunovgr](https://dub1.discourse-cdn.com/flex017/user_avatar/community.factoryio.com/brunovgr/32/12_2.png) [@brunovgr](https://community.factoryio.com/u/brunovgr)\
**Post date:** [June 27, 2024, 12:36pm UTC](https://community.factoryio.com/t/opc-ua-with-virtual-ctrlx/3023/2 "2024-06-27T12:36:34Z")

</div>

Hi @SiggiP,

This is an OPC UA common status code that indicates that a resource is not available in the server: [UA Part 4: Services - 7.34.2 Common StatusCodes](https://reference.opcfoundation.org/Core/Part4/v104/docs/7.34.2)

The connection to the OPC UA server is OK. However, an internal resource defined in the OPC server is not available. I recommend that you check if the OPC UA server is configured correctly.

Another point: are you sure the server is running on port 4840? Typically, this port is (should be) reserved for the local discovery server (LDS).

---

<div class="post-metadata">

**Author:** ![SiggiP](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@SiggiP](https://community.factoryio.com/u/SiggiP)\
**Post date:** [July 2, 2024, 12:29pm UTC](https://community.factoryio.com/t/opc-ua-with-virtual-ctrlx/3023/3 "2024-07-02T12:29:02Z")

</div>

Dear Bruno, thank you for the answer. It seems to me, that the virtualisation from my laptop (Lenovo with Win11) prevents the connection between FactoryIO and the virtual plc. If I deactivate it in the BIOS, than the connection can be established. Unfortunately, the PLC in the virtual plc doesn’t work anymore, only the OPC-UA server.  
Btw, the port 4840 is correct in this case.  
BR, Siggi
