cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

EMS: Error occurred during transfer.

drichter
15-Moonstone

EMS: Error occurred during transfer.

Hey,

 

I try to evaluate the possibilities of the EMS Stuff. Today I try the file transfer functionality with no success.

 

I have a device where the ems runs on (as gateway) and a twx instance on a ec2 in aws.

 

My config.json lookes like this:

 

{
"ws_servers": [{
"host": "xxx.xxx.xxx.xxx", (TWX IP)
"port": 443
}],
"appKey": "xxxxxxxxxxxxxxxxx",
"logger": {
"level": "INFO",
"publish_directory": "/microserver/logs",
"publish_level": "INFO",
"max_file_storage": 2000000,
"auto_flush": true
},
"http_server": {
"host": "xxx.xxx.xxx.xxx", (IP EMS runs on)
"port": 8000,
"ssl": false,
"authenticate": false
},
"ws_connection": {
"encryption": "ssl"
},
"certificates": {
"validate": false
},
"tunnel": {
"buffer_size": 8192,
"read_timeout": 10,
"idle_timeout": 300000,
"max_concurrent": 4
},
"file": {
"buffer_size": 8192,
"max_file_size": 8000000000,
"virtual_dirs": [
{"other": "/microserver/other"},
{"tw": "/microserver/tw"},
{"updates": "/microserver/updates"}
],
"staging_dir": "/microserver/staging"
},
"auto_bind": [{
"name": "EMSGatewayThing",
"gateway": true
},
{
"name": "OtherEdgeThing",
"host": "1.0.1.2",
"port": "8001",
"protokol": "http",
"gateway" : false
}
]
}

 

My lua-script looks like this:

 

scripts.log_level = "WARN"

scripts.script_resource_ssl = false
scripts.script_resource_authenticate = false

scripts.EdgeThing = {
file = "thing.lua",
template = "YourEdgeThingTemplate",
scanRate = 120000,
sw_update_dir = "/microserver/updates"
}

 

I try to send a small simple txt-file from SystemRepositoy to the "other"-folder on the edge device via the copy-service of the FileTransferSubsystem.

 

copy-service.PNG

 

After the timeout-time ends I get a result table with not much information what went wrong. In Application Log i get this:

[context: Error occurred during transfer.: service execution failure resultCode=STATUS_GATEWAY_TIMEOUT: job=TransferJob [tid: adf44aaa-df36-463d-88d3-3f5d1d066e62, sourceRepo: SystemRepository, sourcePath: /file-transfer-test.txt, targetRepo: OtherEdgeThing, targetPath: other/file-transfer-test.txt, partPath: __staging__/OtherEdgeThingother.file-transfer-test.txt.part, sourceChecksum: , targetChecksum: , state: ACTIVE, code: 202, message: Transfer request accepted, isAsync: false, isRestartEnabled: true, isComplete: false, bytesTransferred: 0, blockcount: 0, blocksize: 8192, size: 35, maxsize: 100000000, transferTime: 0, transferControl: platform, reservationId: , user: david.richter, isQueueable: false, enqueueTime: 0, enqueueCount: 0, metadata: null, Job [id: adf44aaa-df36-463d-88d3-3f5d1d066e62, lastTouch: 1574415465008, timeout: 30000, TimedLock [createTime: 1574415464898, signalTime: 0, duration: 0, signaled: false]]]] 

 

This says the transfer request was accepted (202) but no data was transfered.

 

On my edge device a I have a new created .part file (OtherEdgeThingother.file-transfer-test.txt.part) with size of zero.

 

I have no idea what went wrong. Both devices (EMSGatewayThing and the OtherEdgeThing) are connected under remote things

 

connected.PNG

4 REPLIES 4
nishanair
13-Aquamarine
(To:drichter)

Hi @drichter 

 

Can you please add the host and port used by the http_server configuration to auto_bind configuration? 

 

Following article refers the resolution and provides a sample config.json that can be referred

URL: https://www.ptc.com/en/support/article?n=CS304858

 

Please do let us know if this helped resolve the issue. 

 

Thanks, 

 

Nisha Nair

drichter
15-Moonstone
(To:nishanair)

Hi @nishanair,

 

I add the host and port to the first element of the auto binding group, with the same ip and port like in http_server but I get the same error.

mnaeem
15-Moonstone
(To:drichter)

If you couldn't solve the problem try these changings.

"http_server": {
"host": localhost or 127.0.0.1,
"port": 8080,
"ssl": false,
"authenticate": false
},
"auto_bind": [{
"name": "name of your thing",
"port": 8080
}]

 

slangley
23-Emerald II
(To:drichter)

Hi @drichter.

 

Have you found a solution to your problem?  If so, please post it here and mark it as the Accepted Solution or mark an existing reply.

 

Regards.

 

--Sharon

Announcements


Top Tags