Open p-alik opened 7 years ago
There's an error looking for the frame terminator ]]>]]>
that prevents proper reading of the responses. This commit should address it, although I cannot test it now and I'll try to PR later.
Thank you for the reply, @polettix. I tested ce267c1. Unfortunately it doesn't work but the behavior is different: the script trapps in endless loop in Net::NetconfDevice->read_resp because it waiting for $endtag='rpc-reply'
and never get it.
Debug output:
[Net::Netconf::Access::ssh] Reading XML response from Netconf server...
[Net::Netconf::Access::ssh] Received XML response '<?xml version="1.0" encoding="UTF-8"?><hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><capabilities><capability>urn:ietf:params:netconf:base:1.0</capability><capability>urn:ietf:params:netconf:capability:writeable-running:1.0</capability><capability>urn:ietf:params:netconf:capability:startup:1.0</capability><capability>urn:ietf:params:netconf:capability:url:1.0</capability><capability>urn:cisco:params:netconf:capability:pi-data-model:1.0</capability><capability>urn:cisco:params:netconf:capability:notification:1.0</capability></capabilities><session-id>2924303360</session-id></hello>'
How can you say it's waiting for /rpc-reply
instead of /hello
? Judging from the conn_state
member it's waiting to set to value Net::Netconf::Constants::NC_STATE_HELLO_RECVD
, it should be waiting for hello
actually.
Use of tag looking around might be a bit brittle if you ask me.
How can you say it's waiting for
/rpc-reply
instead of/hello
?
the request after saying hello
is:
<rpc message-id='1'>
<get-system-information/>
</rpc>
I'll run some tests next week.
Do you have the trace for that? (Note: I still have to test the change 🎱 )
Nevermind my last message... you did send the trace indeed :-D
Bottom line is I did the match but forgot to remove the hello message, so it stuck there. I'll send a correction shortly.
As anticipated, I forgot to do the removal of the previously extracted messages, so you continued to receive the hello
tag over and over.
You can find what should work at this commit.
Just wondering whether there should be some code to cope with reception of unexpected strings though.
9f6cade doesn't help :-( I'm afraid there is an other reason because the server always sends hello message and nothing more. See traces.tar.gz
maybe there is some causality between this and #29 issues
Hi, examples/get_system_information.pl doesn't work with
Execution without
debug_level
stayendless after password prompt, withdebug_level=>1
it shows:It seems to be an Net::Netconf::Access::ssh issue.
Any advice for troubleshooting would be highly appreciated.
Sincerely yours, Alexei