neilstephens/opendatacon

Listening on IPv6 not IPv4 on OEL

Closed this issue · 1 comments

On OEL the if the JSON port is not overridden in the main config file the and is only specified in the "ConfFilename" it does not run on IPv4 only IPv6. But if it is overridden then it works! Build# g3fa348a

JSON.conf
{
"ConfOverrides" :
{
"IP" : "0.0.0.0", "Port" : 2598,
//"OutputTemplate" : {"Context":{"Time":"","Quality" : ""},"Val":"","Name":"","Index" : ""},
//"StyleOutput" : true,
"JSONPointConf" :
[
]
}
}
ODC.conf

{
"LogName" : "ODC_Log",
"LogFileSizekB" : 50000,
"NumLogFiles": 1,
"LOG_LEVEL": "ALL",

"Ports" :
[
	{
		"Name" : "DNP3Master",
		"Type" : "DNP3Master",
		"Library" : "DNP3Port",
		"ConfFilename" : "DNP3_Master.conf",
		"ConfOverrides" : { "IP" : "192.168.1.11", "Port" : 20000, "MasterAddr" : 0, "OutstationAddr" : 1}
	},
	{
		"Name" : "JSONTEST",
		"Type" : "JSONServer",
		"Library" : "JSONPort",
		"ConfFilename" : "JSON.conf",
		"ConfOverrides" : { "Port" : 2598}
	},	
],

"Connectors" :
[
	{
		"Name" : "TEST1",
		"ConfFilename" : "",
		"ConfOverrides" :
		{
			"Connections" :
			[
				{
					"Name" : "TEST1",
					"Port1" : "TEST1DNP3Master",
					"Port2" : "JSONTEST1"
				}
			]
		}
	}
	
]

}

The configuration in your JSON.conf file is all nested under "ConfOverrides", so when it is parsed, nothing is found. In which case, the IP defaults to empty, which the asio library binds to ::1 on OEL apparently.

"ConfOverrides" only makes sense in the context of configuring a port/connector/transform in the main configuration file. It's for overriding the stuff in the referenced "ConfFilename".

I'll open an issue to document "ConfOverrides" properly.