thinktecture/relayserver

Upload of large files from the client to OPC via relay server

Glaeser opened this issue · 1 comments

We use the relay server in version 2.4.1 and the matching OPC (also in version 2.4.1).
If I now send a larger file (> 65KB) from the client, this file does not reach the underlying API. With the OPC version 2.2.0 this works without any problems.

The relay server logs the following:

[08:39:20 VRB] Creating write stream for storing request body. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442
[08:39:20 DBG] Waiting for response. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442, timeout=00:00:30
[08:39:20 VRB] Creating on-premise connector callback. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442
[08:39:20 VRB] Sending on premise connector request. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442, link-id=4422defc-799e-48c8-b623-1bd262dfa456
[08:39:20 DBG] Dispatching request. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442, link-id=4422defc-799e-48c8-b623-1bd262dfa456
[08:39:20 VRB] Setting RabbitMQ message TTL. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442, request-expiration=00:00:10
[08:39:20 VRB] Sending data. exchange-name=RelayServer, queue-name=Request 4422defc-799e-48c8-b623-1bd262dfa456, channel-id=4422defc-799e-48c8-b623-1bd262dfa456, data-length=1475
[08:39:20 VRB] Waiting for response. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442, link-id=4422defc-799e-48c8-b623-1bd262dfa456
[08:39:20 VRB] Received data. exchange-name=RelayServer, queue-name=Request 4422defc-799e-48c8-b623-1bd262dfa456, channel-id=4422defc-799e-48c8-b623-1bd262dfa456, data-length=1475
[08:39:20 VRB] Request acknowledge id was set. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442, acknowledge-id=6
[08:39:20 VRB] Forwarding client request to connection. connection-id=77c78aec-dbb8-4379-9c45-b96be6c71d10, request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442, http-method=POST, url=pwa/api/Archiv/AddEintrag?hauptVorgangArt=1&hauptVorgangNummer=nulla%20dolore%20in%20anim%20officia&hauptBezug1Art=2&hauptBezug1Nummer=qui%20fugiat%20minim%20ad&hauptBezug2Art=2&hauptBezug2Nummer=minim%20et%20sint&hauptadresse1=ex%20commodo%20ad%20reprehenderit&hauptadresse2=cillum%20deserunt&hauptadresse3=enim%20labore&ordnerId=72028610&betreff=eiusmod%20aute%20consequat%20laboris%20aliqu&bemerkung=magna%20mollit&dokumententyp=id%20consectetur&benutzerfeld1=laborum%20aliquip&benutzerfeld2=est%20id%20voluptate&benutzerfeld3=dolore%20commodo%20a&benutzerfeld4=culpa%20irure&benutzerfeld5=enim&freieBezugArten=24&freieBezugArten=0&freieBezugNummern=Duis%20quis%20laborum&freieBezugNummern=tempor%20sed%20velit&freieBemerkungen=tempor&freieBemerkungen=Excepteur%20est%20eiusmod&mandant=001, origin-id=e80ea6f8-ac2a-4f39-9e0a-02cae6ba0ad6, body-length=0
[08:39:20 VRB] Received acknowledge. origin-id=e80ea6f8-ac2a-4f39-9e0a-02cae6ba0ad6, connection-id=77c78aec-dbb8-4379-9c45-b96be6c71d10, acknowledge-id=6
[08:39:20 DBG] Dispatching acknowledge. origin-id=e80ea6f8-ac2a-4f39-9e0a-02cae6ba0ad6, connection-id=77c78aec-dbb8-4379-9c45-b96be6c71d10, acknowledge-id=6
[08:39:20 VRB] Sending data. exchange-name=RelayServer, queue-name=Acknowledge e80ea6f8-ac2a-4f39-9e0a-02cae6ba0ad6, channel-id=e80ea6f8-ac2a-4f39-9e0a-02cae6ba0ad6, data-length=75
[08:39:20 VRB] Received data. exchange-name=RelayServer, queue-name=Acknowledge e80ea6f8-ac2a-4f39-9e0a-02cae6ba0ad6, channel-id=e80ea6f8-ac2a-4f39-9e0a-02cae6ba0ad6, data-length=75
[08:39:20 VRB] Getting request data. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442
[08:39:20 VRB] Creating read stream for stored request body. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442
[08:39:20 VRB] Creating write stream for storing response body. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442
[08:39:20 VRB] Received on-premise response. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442, content-length=0
[08:39:20 DBG] Dispatching response. origin-id=e80ea6f8-ac2a-4f39-9e0a-02cae6ba0ad6
[08:39:20 VRB] Sending data. exchange-name=RelayServer, queue-name=Response e80ea6f8-ac2a-4f39-9e0a-02cae6ba0ad6, channel-id=e80ea6f8-ac2a-4f39-9e0a-02cae6ba0ad6, data-length=263
[08:39:20 VRB] Received data. exchange-name=RelayServer, queue-name=Response e80ea6f8-ac2a-4f39-9e0a-02cae6ba0ad6, channel-id=e80ea6f8-ac2a-4f39-9e0a-02cae6ba0ad6, data-length=263
[08:39:20 DBG] Forwarding on-premise target response. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442
[08:39:20 DBG] Received on-premise response. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442
[08:39:20 VRB] Response received. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442, link-id=4422defc-799e-48c8-b623-1bd262dfa456
[08:39:20 VRB] Received empty body. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442
[08:39:20 VRB] Finishing request. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442, link-id=4422defc-799e-48c8-b623-1bd262dfa456, link-name=TestOpcInstall, on-premise-duration=00:00:00.1718068, global-duration=00:00:00.2633366

And the OPC

[08:39:20 VRB] Received message from server. connection-id=77c78aec-dbb8-4379-9c45-b96be6c71d10, message=[[[]], [[]], [[]], [[]], [[]], [[]], [[]], [[[[]], [[]], [[]], [[]], [[]], [[]], [[]], [[]]]], [[]], [[]], [[]], [[]]]
[08:39:20 DBG] Sending acknowledge to RelayServer. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442, origin-id=e80ea6f8-ac2a-4f39-9e0a-02cae6ba0ad6, acknowledge-id=6
[08:39:20 VRB] Found on-premise target and sending request. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442, on-premise-key=pwa
[08:39:20 DBG] Relaying request to local target. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442, request-url=/pwa/api/Archiv/AddEintrag?hauptVorgangArt=1&hauptVorgangNummer=nulla%20dolore%20in%20anim%20officia&hauptBezug1Art=2&hauptBezug1Nummer=qui%20fugiat%20minim%20ad&hauptBezug2Art=2&hauptBezug2Nummer=minim%20et%20sint&hauptadresse1=ex%20commodo%20ad%20reprehenderit&hauptadresse2=cillum%20deserunt&hauptadresse3=enim%20labore&ordnerId=72028610&betreff=eiusmod%20aute%20consequat%20laboris%20aliqu&bemerkung=magna%20mollit&dokumententyp=id%20consectetur&benutzerfeld1=laborum%20aliquip&benutzerfeld2=est%20id%20voluptate&benutzerfeld3=dolore%20commodo%20a&benutzerfeld4=culpa%20irure&benutzerfeld5=enim&freieBezugArten=24&freieBezugArten=0&freieBezugNummern=Duis%20quis%20laborum&freieBezugNummern=tempor%20sed%20velit&freieBemerkungen=tempor&freieBemerkungen=Excepteur%20est%20eiusmod&mandant=001
[08:39:20 VRB] Requesting body. request-id=7ccf2ea2-036a-449b-847d-ef96bfee1442
[08:39:20 ERR] Error during handling received message. connection-id=77c78aec-dbb8-4379-9c45-b96be6c71d10, message=[[[]], [[]], [[]], [[]], [[]], [[]], [[]], [[[[]], [[]], [[]], [[]], [[]], [[]], [[]], [[]]]], [[]], [[]], [[]], [[]]]
System.NotSupportedException: Specified method is not supported.
   at System.Net.Http.HttpBaseStream.get_Position()
   at Thinktecture.Relay.OnPremiseConnector.SignalR.RelayServerSignalRConnection.RequestLocalTargetAsync(RequestContext ctx, String key, IOnPremiseTargetConnector connector, IOnPremiseTargetRequestInternal request, CancellationToken cancellationToken)
   at Thinktecture.Relay.OnPremiseConnector.SignalR.RelayServerSignalRConnection.OnMessageReceived(JToken message)

Thanks for the report. @thomashilzendegen already spotted the issue.
We're on it.