Skip to content
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

netopeer could not creat socket #80

Closed
Alex-Wong opened this issue Dec 4, 2015 · 1 comment
Closed

netopeer could not creat socket #80

Alex-Wong opened this issue Dec 4, 2015 · 1 comment

Comments

@Alex-Wong
Copy link

when I start netopeer-server, some error occurs as shown belown:
netopeer-server[25485]: sock_listen: could not create socket (Address family not supported by protocol)
netopeer-server[25485]: Server is not listening on any address!

It seems "::0" is not a correct ipv4 address(my system does not support ipv6):
Breakpoint 1, add_bind_addr (root=0x610898 <netopeer_options+88>, transport=NC_TRANSPORT_SSH, addr=0x40d055 "::0", port=830) at src/netconf_server_transapi.c:101
101 if (root == NULL) {
(gdb) bt
#0 add_bind_addr (root=0x610898 <netopeer_options+88>, transport=NC_TRANSPORT_SSH, addr=0x40d055 "::0", port=830) at src/netconf_server_transapi.c:101
#1 0x0000000000407434 in callback_srv_netconf_srv_listen_srv_port (op=XMLDIFF_ADD, old_node=0x0, new_node=0x8fdab0, error=0x7fffffffd2b8, transport=NC_TRANSPORT_SSH)

at src/netconf_server_transapi.c:227

#2 0x000000000040badc in callback_srv_netconf_srv_ssh_srv_listen_srv_port (UNUSED_data=0x0, op=XMLDIFF_ADD, old_node=0x0, new_node=0x8fdab0, error=0x7fffffffd2b8)

at src/ssh/netconf_server_transapi_ssh.c:116

#3 0x000000000040bc98 in server_transapi_init_ssh () at src/ssh/netconf_server_transapi_ssh.c:193
#4 0x0000000000408853 in server_transapi_init (UNUSED_running=0x7fffffffd338) at src/netconf_server_transapi.c:788
#5 0x00007ffff7b89dd9 in ncds_device_init (id=0x7436d0, cpblts=0x0, force=1) at src/datastore.c:947
#6 0x000000000040610f in module_enable (module=0x7436c0, add=0) at src/cfgnetopeer_transapi.c:327
#7 0x000000000040544d in main (argc=3, argv=0x7fffffffe678) at src/server.c:772

@michalvasko
Copy link
Member

Hi,
this should be easy to fix. If you look at the ietf-netconf-server model included in netopeer, you can see that there are two ways of specifying the address the server listens on. Either with a single port node, whose value determines only the port to listen on (all interfaces, "::0" are all IPv4 and IPv6 interfaces) or by a list of pairs of address and port. So if you (manually) edit netopeer startup configuration and set address to "0.0.0.0" and port to "830", netopeer should listen on all IPv4 interfaces.

Regards,
Michal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants