OPCFoundation / UA-.NETStandard-Samples

Other
261 stars 185 forks source link

Aggregation server cannot close sessions to servers #26

Open xky0007 opened 4 years ago

xky0007 commented 4 years ago

I'm following the tutorial for aggregation server here.

After I disconnect from aggregation client to aggregation server. The sessions between aggregation server and sample server are still alive. The clients(I guess there are clients inside aggregation server to connect to real server for aggregation) inside the aggregation server won't close those sessions automatically.

Here are my steps:

  1. Start UA Sample Server
  2. Start QuickStart Aggregation Server
  3. Start QuickStart Aggregation Client
  4. Connect to QuickStart Aggregation Server from QuickStart Aggregation Client
  5. Disconnect to QuickStart Aggregation Server from QuickStart Aggregation Client

image

AlinMoldovean commented 4 years ago

@xky0007 ,

Aggregation server does not close the connections to underlying OPC UA servers when clients connected to it are closing a session. That is the intended behavior.

xky0007 commented 4 years ago

@xky0007 ,

Aggregation server does not close the connections to underlying OPC UA servers when clients connected to it are closing a session. That is the intended behavior.

Thanks, @AlinMoldovean .

Is there any detailed docs about how aggregate server is working in step or the architecture of server (eg. reverse proxy, doesn't close underlying sessions by default, etc.). It will be very helpful.

mregen commented 4 years ago

Hi @xky0007, there are various updates on the way to improve the aggregation server with reverse connect and maybe more. The current implementation uses two types of connections, for each server one connection to collect the metadata, then for each connected client a sessoin with user impersonation of the client to each server. The latter type of connections should be closed after a session timeout or when a client disconnects. There might be an issue but it needs some investigation.