-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can clixon_netconf receive netconf packets as a server? #93
Comments
There seems to be multiple issues.
Second, clixon_netconf is designed to be used as a subsystem with redirected stdin/stdout. It could be extended as a proper server (as clixon_restconf / clixon_backend), it would just be to add proper daemon spawning code (ie needs implementation) Third, for debugging, run clixon_netconf with -D 1 and check syslog to get error messages to see (maybe) where the error is. Fourth, I havent run netopeer in this way. Can you provide simple instructions to run it in this way? |
Hi, @olofhagsand I run clixon_netconf with -D 1 and then connect , but the clixon_netconf process has no response. Even after I kill the clixon_netconf process, the connect operation still has the same error. In addition, netopeer_cli sends the netconf hello message to ssh port 22, while clixon_netconf listens on stdin. Can clixon_netconf receive the hello message? I'm confused. So , I guess the problem is due to the operations of establishing ssh channel and request netconf subsystem, and hello-replay. But actually I dont know why? My simple instruction: |
Try raw input using ssh first, eg:
ssh -s 192.168.10.2 netconf
If that starts clixon_netconf, then your ssh sub-system is OK (sshd
forks clixon_netconf and redirects input on port 22 to clixon_netconf stdin)
If not, there is something wrong with the ssh subsystem setup.
--Olof
…On 2019-08-23 12:01, bearfirstrun wrote:
Hi, @olofhagsand <https://github.com/olofhagsand>
I have registered netconf as a ssh subsystem correctly and restart ssh
service. On the both device, I installed openssh and libssh.
I run clixon_netconf with -D 1 and then connect , but the clixon_netconf
process has no response. Even after I kill the clixon_netconf process,
the connect operation still has the same error. In addition,
netopeer_cli sends the netconf hello message to ssh port 22, while
clixon_netconf listens on stdin. Can clixon_netconf receive the hello
message? I'm confused. So , I guess the problem is due to the operations
of establishing ssh channel and request netconf subsystem, and
hello-replay. But actually I dont know why?
My simple instruction:
dev1 dev2
--------------------- ---------------------
| openssh/libssh | | openssh/libssh |
| | | clixon_backend |
| netopeer_cli | | clixon_netconf |
| 192.168.10.3 | ---------------------- | 192.168.10.2 |
--------------------- ---------------------
dev1/2 : centos 7
perform clixon_backend
perform clixon_netconf : blocking
perform netopeer_cli: netconf> connect --login root --port 22 192.168.10.2
***@***.*** password:
then , error: libnetconf ERROR: Input channel error (end of file)
connect: connecting to the 192.168.10.2:22 as user "root" failed.
debug netopeer_cli, errror occurs atfer netopeer_cli sending hello
successfully.
clixon_netconf is still blocking.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#93?email_source=notifications&email_token=ABGD65JIQOK25OLHP3XEKKDQF6YOVA5CNFSM4IOT3NKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD47YB3Q#issuecomment-524255470>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABGD65MWKFBS7G4ZMLGEAQLQF6YOVANCNFSM4IOT3NKA>.
|
Hi, @olofhagsand I still haven't found the cause of the problem above, but when clixon is installed by an RPM package, the connection is successful. Now I need your help with another difficulty : Thank you again! |
I'm really sorry to bother you. The difficulty just now has been solved. I add in the clixon.spec file: |
yes, you do need the --enable-debug to get the symbols. I have seen it in other software that CentOS will create empty debuginfo rpms if there are no symbols, and this appears to be the case here. So, are you now up and running? |
Hi, @olofhagsand Thank you! |
HI, @dcornejo |
Oops. Yes thanks for detecting, I will submit a patch on master asap. |
Outdated discussion |
Hi @olofhagsand
I have a problem now, can you help me?
I want to use clixon_netconf as the server, netopeer_cli as the client on two devices. I run the following command on netopeer(client), but always the connection is failed:
netopeer-cli
netconf> connect --login root --port 22 192.168.10.2
root@192.168.10.2 password:
libnetconf ERROR: Input channel error (end of file)
connect: connecting to the 192.168.10.2:22 as user "root" failed.
I have registered the subsystem netconf in /etc/ssh/sshd_config and installed openssh and libssh. But after netopeer_cli sends hello message ,it recieves hello message, then ERROR(This part of code is in libnetconf).
In the file netconfi_main.c, sockfd=0(stdin) is listened always.
So can netconf be used as a server to receive netconf client messages? Can clixon_netconf only receive input from the terminal?
If clixon_netconf can be used as a netconf server, why it report an error?
Any kind of help would be appreciable.
Regards,
bearfirstrun
The text was updated successfully, but these errors were encountered: