XPath is not a valid filter type for get-config.
<filter> — Enclose the <configuration> tag element. The mandatory type attribute indicates the kind of syntax used to represent the requested configuration elements; the
only
acceptable value is subtree.
https://www.juniper.net/documentation/en_US/junos/topics/reference/tag-summary/netconf-get-config.html
You can use the filter type subtree instead as outlined below.
NOTE: GET-CONF does not have an attribute for inheritance. If you need to pull what would be the final configuration, i.e. you are using the "Groups" stanza, you will need to use GET-CONFIGURATION. I will show the difference in an additional output below.
https://www.juniper.net/documentation/en_US/junos/topics/reference/tag-summary/junos-xml-protocol-get-configuration.html
Contents of get-interfaces.xml using get-conf
<get-config>
<source>
<running/>
</source>
<filter type="subtree">
<configuration>
<interfaces/>
</configuration>
</filter>
</get-config>
Run your command at the targeted host:
netconf-console --host 10.49.162.162 --port 830 --user root --password xxxx --rpc get-interfaces.xml
Sample output from get-conf:
root@Ubuntu-Server:~# netconf-console --host 10.49.162.162 --port 830 --user root --password Embe1mpls --rpc get-interfaces.xml
<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.3I0/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ae0be5f0-4f9d-45fa-b92f-c161d2a92f2b">
<data>
<configuration xmlns="http://xml.juniper.net/xnm/1.1/xnm" junos:commit-seconds="1608495419" junos:commit-localtime="2020-12-20 12:16:59 PST" junos:commit-user="root">
<interfaces>
<interface>
<name>xe-0/0/0</name>
<unit>
<name>0</name>
<family>
<inet>
<address>
<name>172.20.0.12/32</name>
</address>
</inet>
</family>
</unit>
</interface>
<interface>
<name>xe-0/0/1</name>
<unit>
<name>0</name>
<family>
<inet>
<address>
<name>172.20.20.0/32</name>
</address>
</inet>
</family>
</unit>
</interface>
</interfaces>
</configuration>
</data>
</rpc-reply>
Contents of get-interfaces.xml using get-configuration with inheritance
<get-configuration inherit="inherit">
<configuration>
<interfaces/>
</configuration>
</get-configuration>
Sample output from get-configuration: [Note all the additional interfaces that are inherited on the same host]
root@Ubuntu-Server:~# netconf-console --host 10.49.162.162 --port 830 --user root --password xxxx --rpc get-interfaces.xml
<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.3I0/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:92751ca5-8d1f-449c-a3e8-10aba7be249c">
<configuration xmlns="http://xml.juniper.net/xnm/1.1/xnm" junos:changed-seconds="1608495419" junos:changed-localtime="2020-12-20 12:16:59 PST">
<interfaces>
<interface>
<name>xe-0/0/0</name>
<unit>
<name>0</name>
<family>
<inet>
<address>
<name>172.20.0.12/32</name>
</address>
</inet>
</family>
</unit>
</interface>
<interface>
<name>xe-0/0/1</name>
<unit>
<name>0</name>
<family>
<inet>
<address>
<name>172.20.20.0/32</name>
</address>
</inet>
</family>
</unit>
</interface>
<interface>
<name>lo0</name>
<unit>
<name>0</name>
<family>
<inet>
<address>
<name>128.49.162.162/32</name>
<primary/>
</address>
</inet>
<iso>
<address>
<name>47.0005.80ff.f800.0000.0108.0001.1280.4916.2162.00</name>
</address>
</iso>
<inet6>
<address>
<name>abcd::128:49:162:162/128</name>
<primary/>
</address>
</inet6>
</family>
</unit>
</interface>
<interface>
<name>em0</name>
<unit>
<name>0</name>
<family>
<inet>
<address>
<name>10.49.162.162/19</name>
</address>
</inet>
</family>
</unit>
</interface>
<interface>
<name>em1</name>
<unit>
<name>0</name>
<family>
<inet>
<address>
<name>169.254.0.2/24</name>
</address>
</inet>
</family>
</unit>
</interface>
</interfaces>
</configuration>
</rpc-reply>
Note: to help find the filter levels the " | display xml " command can be run on the host to help identify the proper tag
root@vqfx-leaf-01> show configuration interfaces | display xml | display inheritance
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/18.3I0/junos">
<configuration junos:commit-seconds="1608495419" junos:commit-localtime="2020-12-20 12:16:59 PST" junos:commit-user="root">
<interfaces>
<interface>
<name>xe-0/0/0</name>
<unit>
<name>0</name>
<family>
<inet>
<address>
<name>172.20.0.12/32</name>
</address>
</inet>
</family>
</unit>
</interface>
<interface>
<name>xe-0/0/1</name>
<unit>
<name>0</name>
<family>
<inet>
<address>
<name>172.20.20.0/32</name>
</address>
</inet>
</family>
</unit>
</interface>
<interface>
<name>lo0</name>
<unit>
<name>0</name>
<family>
<inet>
<address>
<name>128.49.162.162/32</name>
<primary/>
</address>
</inet>
<iso>
<address>
<name>47.0005.80ff.f800.0000.0108.0001.1280.4916.2162.00</name>
</address>
</iso>
<inet6>
<address>
<name>abcd::128:49:162:162/128</name>
<primary/>
</address>
</inet6>
</family>
</unit>
</interface>
<interface>
<name>em0</name>
<unit>
<name>0</name>
<family>
<inet>
<address>
<name>10.49.162.162/19</name>
</address>
</inet>
</family>
</unit>
</interface>
<interface>
<name>em1</name>
<unit>
<name>0</name>
<family>
<inet>
<address>
<name>169.254.0.2/24</name>
</address>
</inet>
</family>
</unit>
</interface>
</interfaces>
</configuration>
<cli>
<banner>{master:0}</banner>
</cli>
</rpc-reply>