Junos
Highlighted
Junos

"syntax error, expecting <rpc> or </rpc>" trying to delete some configuration using Netconf with a Junos switch EX 2200 12.2R2.4

[ Edited ]
‎03-27-2014 04:56 AM

I have been working during time with MX and EX Junos devices without problems. Now I'm experiencing a weird error with a Junos switch EX 2200 of version 12.2R2.4.

 

I'm trying to remove some parts of the configuration with this Netconf message:

 

<rpc message-id="19"><edit-config><target><candidate/></target><default-operation>none</default-operation><config>
<configuration>	
	<vlans>
		<vlan>
			<name>AAAA</name>
			<l3-interface operation="delete">vlan.666</l3-interface>
		</vlan>
	</vlans>
    
	<interfaces>
		<interface>
			<name>vlan</name>
			<unit operation="delete">
				<name>666</name>
			</unit>
		</interface>
	</interfaces>
</configuration>
</config></edit-config></rpc>
]]>]]>

And I'm getting this error from the switch:

 

syntax error, expecting <rpc> or </rpc>

My message contains this tag!!

 

I'm able to delete other parts of the configuration without any problem with similar messages like this:

<rpc message-id="30"><edit-config><target><candidate/></target><config><configuration>			
    <vlans>
    	<vlan operation="delete">
    	    <name>AAAA</name>
    	</vlan>
    </vlans>
</configuration>
</config></edit-config></rpc>
]]>]]>

I tried to delete both parts of the configuration with two separated messages, but I experienced same problem. I tried using and not using default-operation tag, but the result was the same.

 

Why Junos fails detecting rpc element in my meesage? What am I exactly doing wrong?

 

Thank you.

2 REPLIES 2
Junos

Re: "syntax error, expecting <rpc> or </rpc>" trying to delete some configuration using Netconf with a Junos switch EX 2200 12.2

‎04-01-2014 01:27 AM

No support? Please, it is an strange error. I have expertise using Junos and Netconf. I am able to configure many aspects of MX and EX Junos devices, but I am struggled with this one.

Junos

Re: "syntax error, expecting <rpc> or </rpc>" trying to delete some configuration using Netconf with a Junos switch EX 2200 12.2

‎04-01-2014 03:09 AM

Below works. Try without value in it.

 

<rpc message-id="19">
	<edit-config>
		<target><candidate/></target>
		<config><configuration>	
			<vlans>
				<vlan>
					<name>AAAA</name>
                    <l3-interface operation="delete"></l3-interface>
				</vlan>
			</vlans>
    
		</configuration></config>
	</edit-config>
</rpc>

 

Thanks,

/Charlie