parsing of URL failed


We're in the process of onbarding a lot of ePMP radios (2000+).

We were hoping to be able to script the necessarry changes we need to make to the radios in order to onboard them.

We need to change the DNS address as well as  well as configure the cnMaestro onboarding details.

The below is the script I have written in Python to accomplish this.

It seems to work and all the values change as expected and radio reboots.

However, the unit will not connect to the cnMaestro server instance - it instead gives a parsing error in the log:

Sep  1 00:00:33 GG Cambium 2 90deg DEVICE-AGENT[1865]: Parse error : 1
Sep  1 00:00:33 GG Cambium 2 90deg DEVICE-AGENT[1865]: parsing of url failed
Sep  1 00:00:33 GG Cambium 2 90deg DEVICE-AGENT[1865]: Unable to discover cnMaestro URL (re-discover in 68 seconds)

If I look under Configuration -> System, the URL has changed to what it should be.

If I delete the URL on the GUI and manually type it in again, (exactly as it was already!), it correctly parses the URL and connects to cnMaestro.

Anybody have any ideas how I can get around this?

I've tried passing the URL in quotes, without quotes etc but always the same.

Any help would be greatly appreciated, manually configuring 2000+ units for onboarding is not really an option!

import paramiko as pm
import os, time
import sys

class AllowAllKeys(pm.MissingHostKeyPolicy):
def missing_host_key(self, client, hostname, key):

hosts = [‘’]
b = open(‘cnmaestro_results’, ‘wb’)
USER = ‘admin’
PASSWORD = ‘password’

def change_power_reset():
client = pm.SSHClient()
client.connect(host, username=USER, password=PASSWORD, timeout=5)

channel = client.invoke_shell()
stdin = channel.makefile('wb')
stdout = channel.makefile('rb')

channel.send('config set networkBridgeDNSIPAddrPrimary\n')
channel.send('config set networkBridgeDNSIPAddrSecondary\n')
channel.send('config set cambiumDeviceAgentEnable "1"\n')
channel.send('config set cambiumDeviceAgentCNSURL https://cnmaestro.on_premises_url\n')
channel.send('config set cambiumCNSDeviceAgentID "cnmaestro_on_premises"\n')
channel.send('config set cambiumCNSDeviceAgentPassword "password"\n')
channel.send('config save\n')
channel.send('config apply\n')

RESULTS = channel.recv(8192)
#print RESULTS

for host in hosts:
print host,
print “Success!”
b.write(host + “,” + “Successfully changed!” + “\n”)
print “Failed!!”
b.write(host + “,” + “Parameter not changed!” + “\n”)

Could you export your device's configuration to a text file and share the portion with the cnMaestro settings, removing private info?

I may be wrong but it looks like cambiumDeviceAgentCNSURL may be including the newline in the value.  All the other string-based settings had their values surrounded by quotes before the newline but not cambiumDeviceAgentCNSURL so you might want to double check that with a test device.

Thanks for your response.

Tried it both ways - still get parse error.

It seems to be the case when the value is passed from the CLI - not just a script issue.

If I log onto radio via SSH and type 'config set cambiumDeviceAgentCNSURL "https://cnmaestro.on_premises_url' I get the same error in the log.

Is there a bug in passing this value via CLI?

What firmware versions are your devices running?

Have tried on 3.0 and also 3.1rc24 - same result.

Hate to revive an old thread but we're also having this issue.

Was a fix or a workaround ever released for this?

can you change this line in your script  it should work.

It is problem with the new line characters included in the device URL.

'config set cambiumDeviceAgentCNSURL https://cnmaestro.on_premises_url'\n

Correct CLI command looks like below

config set cambiumDeviceAgentCNSURL

No, that still doesn't work in v3.0.1. As colinhowlin points out this appears to be an issue passing the URL value in via the CLI itself - whether it is manually typed or passed in via a script seems to make no difference. There shouldn't be any extra line return characters passed when typing the URL in manually -- just the return keystroke you should be expecting to follow which actually sets the value.

I can validate that the value written in via the CLI is correctly displayed in the GUI (no trailling whitespace), but the system does not correctly parse the URL until I write the value in manually via the GUI - even though the strings are otherwise identical. Additionally when I do a comparison "config show" diff between a configuration file generated by a script or a configuration file generated entirely by manually setting options in the GUI there is no difference.

It would seem that the bug is exclusively related to correctly storing the URL in the configuration file via the CLI. Does the device not do any input sanitisation on values coming in to the CLI to get rid of any trailling characters?