Skip to main content
1-Visitor
May 15, 2019
Solved

ems filetransfer - adding virtual dir

  • May 15, 2019
  • 1 reply
  • 2977 views

Hello everyone,

 

I'm a beginner in thingworx.

Right now i'm busy with adding filetransfer to my project.

 

I have an linux server with EMS 5.4 installed on it. 

I created in thingworx a Thing with base template "RemoteThingwithtunnelsandfiletransfer".

In my config.json i have this setup:

 

{
	"restart":	"any",
	"logger":	{
		"level":	"DEBUG",
		"audit_target":	"file://home/pi/microserver/logs/wsems",
		"publish_directory":	"/home/pi/microserver/logs/wsems"
	},
	"offline_msg_store":	{
		"enabled":	true,
		"directory":	"/home/pi/microserver/opt/thingworx",
		"max_size":	65535
	},
	"ws_servers":	[{
			"host":	"thingworx.be",
			"port":	443
		}],
	"resource":	"/Thingworx/WS",
	"ws_connection":	{
		"encryption":	"ssl"
	},
	"certificates":	{
		"validate":	false,
		"allow_self_signed":	true
	},
	"appKey":	"xxxxx",
	"http_server":	{
		"host":	"0.0.0.0",
		"port":	8000,
		"ssl":	false,
		"authenticate":	false
	},
	"auto_bind":[
		{ "name": "EEG.PoC.Edge.TestFileTransfer2" }
		],
	"tunnel":	{
		"tick_resolution":	5,
		"buffer_size":	8192,
		"read_timeout":	50,
		"idle_timeout":	300000,
		"max_concurrent":	4
	},
	"file": {
		"buffer_size": 8192,
		"max_file_size": 8000000000,
	"virtual_dirs":[
		{ "In" : "/home/pi/microserver/in" },
		{ "Out" : "/home/pi/microserver/out" }
		],
	"idle_timeout": 12000,
	"staging_dir" : "/home/eeg/microserver/staging"
		}
	
}

When i start my EMS. he create a new Directory "staging". But no "in" or "out". Also if a run a service on my thing like "getDirectoryStructure" i get no data back.

In the logs of the EMS i get a info message that he succesfully created the virtual dir in the path described.

 

How is it possible that he doesn't create the in and out directory on my linux ? And why im a getting no data back from the service ?

What i'm a doing wrong ?

 

Thanks for the help ! 

Best answer by wposner-2

Yes.  Anytime you make changes to your config files or any underlying .lua files you must restart the applicable runtime.

1 reply

1-Visitor
May 15, 2019

Virtual directories that you specify need to exist.  The EMS will not automatically create them.  Once you're directories exist, the GetDirectoryStructure service will work

1-Visitor
May 15, 2019

Thanks for the answer.

I added the 2 dirs to the path i specified in the config.json.

I setted the permissions of the 2 dirs to full access (chmod 777).

 

But still if i run the service i get no data .. 

There are also some text files in the 2 dirs.

1-Visitor
May 15, 2019

Did you add the verbose flag?  You should be seeing a lot more output.  What's in your LSR logs?