Package Details: core 8.2.0-1

Git Clone URL: https://aur.archlinux.org/core.git (read-only, click to copy)
Package Base: core
Description: Common Open Research Emulator
Upstream URL: https://github.com/coreemu/core/
Keywords: emulator
Licenses: BSD
Submitter: tom5760
Maintainer: None
Last Packager: Splork
Votes: 10
Popularity: 0.004726
First Submitted: 2010-10-27 16:52 (UTC)
Last Updated: 2022-03-31 12:39 (UTC)

Latest Comments

1 2 3 4 5 Next › Last »

MarsSeed commented on 2023-08-11 22:05 (UTC)

Also don't use the deprecated dephell to make a deprecated executable setup.py.

Instead, make the build follow the PEP 517 conformant build and install procedure outlined in Arch Wiki.

MarsSeed commented on 2023-08-11 22:02 (UTC)

Please add a meaningful description in pkgdesc instead of pasting the misleading expansion of the CORE acronym.

kadotux commented on 2022-04-05 17:02 (UTC)

Fixed with the help from CORE development @ Discord!

Problem was two servers I had previously configured via GUI in session -> servers. Removing them fixed the problem, the session runs now as expected. Thank you all.

kadotux commented on 2022-04-05 15:54 (UTC) (edited on 2022-04-05 15:55 (UTC) by kadotux)

@Splork I don't think so, but I'm not entirely sure.

This is my /etc/nftables.conf:

#!/usr/bin/nft -f
# vim:set ts=2 sw=2 et:

# IPv4/IPv6 Simple & Safe firewall ruleset.
# More examples in /usr/share/nftables/ and /usr/share/doc/nftables/examples/.

table inet filter
delete table inet filter
table inet filter {
  chain input {
    type filter hook input priority filter
    policy drop

    ct state invalid drop comment "early drop of invalid connections"
    ct state {established, related} accept comment "allow tracked connections"
    iifname lo accept comment "allow from loopback"
    ip protocol icmp accept comment "allow icmp"
    meta l4proto ipv6-icmp accept comment "allow icmp v6"
    tcp dport ssh accept comment "allow sshd"
    pkttype host limit rate 5/second counter reject with icmpx type admin-prohibited
    counter
  }
  chain forward {
    type filter hook forward priority filter
    policy drop
  }
}

And iptables -L -vn:

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination       
29799 29M LIBVIRT_INP all -- * * 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination
0 0 LIBVIRT_FWX all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 LIBVIRT_FWI all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 LIBVIRT_FWO all -- * * 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination
26837 3038K LIBVIRT_OUT all -- * * 0.0.0.0/0 0.0.0.0/0

Chain LIBVIRT_FWI (1 references) pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- * virbr0 0.0.0.0/0 192.168.122.0/24 ctstate RELATED,ESTABLISHED 0 0 REJECT all -- * virbr0 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable

Chain LIBVIRT_FWO (1 references) pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- virbr0 * 192.168.122.0/24 0.0.0.0/0
0 0 REJECT all -- virbr0 * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable

Chain LIBVIRT_FWX (1 references) pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- virbr0 virbr0 0.0.0.0/0 0.0.0.0/0

Chain LIBVIRT_INP (1 references) pkts bytes target prot opt in out source destination
0 0 ACCEPT udp -- virbr0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:53 0 0 ACCEPT tcp -- virbr0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:53 0 0 ACCEPT udp -- virbr0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:67 0 0 ACCEPT tcp -- virbr0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:67

Chain LIBVIRT_OUT (1 references) pkts bytes target prot opt in out source destination
0 0 ACCEPT udp -- * virbr0 0.0.0.0/0 0.0.0.0/0 udp dpt:53 0 0 ACCEPT tcp -- * virbr0 0.0.0.0/0 0.0.0.0/0 tcp dpt:53 0 0 ACCEPT udp -- * virbr0 0.0.0.0/0 0.0.0.0/0 udp dpt:68 0 0 ACCEPT tcp -- * virbr0 0.0.0.0/0 0.0.0.0/0 tcp dpt:68

/etc/hosts:

# Static table lookup for hostnames.

See hosts(5) for details.

127.0.0.1 localhost 127.0.1.1 LostArch

some random stuff, trying to make core working

::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters

And "ip link":

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

Is there anywhere else I could look?

Splork commented on 2022-04-05 15:37 (UTC)

@kadotux

so, to me this looks like the GUI is attempting to communicate with the daemon via port 50051 (that would go through the loopback interface), but for some reason they get a timeout.

Is you system configured in any way that would prevent connections between local processes on the loopback interface?

kadotux commented on 2022-04-05 15:31 (UTC)

Hi @tom5760:

Thank you! Installing inetutils actually fixed the issue for core-gui-legacy! The legacy interface is totally functional now. :)

Although I'm content with using the legacy interface, the problem persists on Python/Tk interface. Connection times out regardless if I run "core-daemon" with or without sudo, or run the systemd service "sudo systemctl start core-daemon". The do have different config folders (.coregui and .core) but I think I have similiar settings in both, that shouldn't be the issue.

Justo to recap, the when starting the session in Python interface I get an error popup titled "GRPC Exception", and terminal output from core-daemon is:

2022-04-05 18:23:40,266 - INFO - core-daemon:banner - CORE daemon v.8.2.0 started Tue Apr  5 18:23:40 2022
2022-04-05 18:23:40,796 - INFO - coreemu:_load_emane - using emane: 1.3.3
2022-04-05 18:23:40,866 - INFO - server:listen - CORE gRPC API listening on: localhost:50051
2022-04-05 18:23:40,867 - INFO - core-daemon:cored - CORE TLV API TCP/UDP listening on: localhost:4038
2022-04-05 18:23:45,939 - INFO - coreemu:create_session - created session: 1
2022-04-05 18:23:57,351 - INFO - session:set_state - changing session(1) to state CONFIGURATION_STATE
2022-04-05 18:26:06,421 - ERROR - _server:_call_behavior - Exception calling application: [Errno 110] Connection timed out
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/grpc/_server.py", line 443, in _call_behavior
    response_or_iterator = behavior(argument, context)
  File "/usr/lib/python3.10/site-packages/core/api/grpc/server.py", line 267, in StartSession
    session.distributed.add_server(server.name, server.host)
  File "/usr/lib/python3.10/site-packages/core/emulator/distributed.py", line 143, in add_server
    server.remote_cmd(f"which {requirement}")
  File "/usr/lib/python3.10/site-packages/core/emulator/distributed.py", line 72, in remote_cmd
    result = self.conn.run(
  File "/usr/lib/python3.10/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
  File "/usr/lib/python3.10/site-packages/fabric/connection.py", line 29, in opens
    self.open()
  File "/usr/lib/python3.10/site-packages/fabric/connection.py", line 636, in open
    self.client.connect(**kwargs)
  File "/usr/lib/python3.10/site-packages/paramiko/client.py", line 349, in connect
    retry_on_signal(lambda: sock.connect(addr))
  File "/usr/lib/python3.10/site-packages/paramiko/util.py", line 283, in retry_on_signal
    return function()
  File "/usr/lib/python3.10/site-packages/paramiko/client.py", line 349, in <lambda>
    retry_on_signal(lambda: sock.connect(addr))
TimeoutError: [Errno 110] Connection timed out

And from core-gui:

2022-04-05 18:23:45,915 - INFO - manager:add_canvas - creating canvas(1)
2022-04-05 18:23:45,940 - INFO - coreclient:create_new_session - created session: 1
2022-04-05 18:23:45,940 - INFO - coreclient:join_session - joining session(1)
2022-04-05 18:23:45,946 - INFO - manager:join - cleared canvases
2022-04-05 18:23:45,948 - INFO - manager:add_canvas - creating canvas(1)
2022-04-05 18:23:50,752 - INFO - coreclient:create_node - add node(n1) to session(1), coordinates(231.0, 349.0)
2022-04-05 18:23:53,360 - INFO - coreclient:create_node - add node(n2) to session(1), coordinates(396.0, 198.0)
2022-04-05 18:23:56,291 - INFO - interface:create_iface - create node(n1) interface(Interface(id=0, name='eth0', mac=None, ip4='10.0.0.20', ip4_mask=24, ip6=None, ip6_mask=64, net_id=None, flow_id=None, mtu=None, node_id=None, net2_id=None))
2022-04-05 18:23:56,291 - INFO - interface:create_iface - create node(n2) interface(Interface(id=0, name='eth0', mac=None, ip4='10.0.0.1', ip4_mask=24, ip6=None, ip6_mask=64, net_id=None, flow_id=None, mtu=None, node_id=None, net2_id=None))
2022-04-05 18:23:56,292 - INFO - interface:create_link - added link between n1 and n2
2022-04-05 18:26:06,425 - ERROR - app:show_grpc_exception - app grpc exception
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/core/gui/coreclient.py", line 425, in start_session
    result, exceptions = self.client.start_session(self.session, definition)
  File "/usr/lib/python3.10/site-packages/core/api/grpc/client.py", line 239, in start_session
    response = self.stub.StartSession(request)
  File "/usr/lib/python3.10/site-packages/grpc/_channel.py", line 946, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/usr/lib/python3.10/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking
    raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    status = StatusCode.UNKNOWN
    details = "Exception calling application: [Errno 110] Connection timed out"
    debug_error_string = "{"created":"@1649172366.425347645","description":"Error received from peer ipv4:127.0.0.1:50051","file":"src/core/lib/surface/call.cc","file_line":905,"grpc_message":"Exception calling application: [Errno 110] Connection timed out","grpc_status":2}"

Nevertheless, thank you for help! I'm content with using the legacy interface but if anyone would like chip in as to why this error in Python interface is happening I would of course greatly appreciate!

tom5760 commented on 2022-04-05 13:59 (UTC)

Hey @kadotux:

started core-daemon service (tried via sudo sysctl start core-daemon and with core-daemon and with sudo core-daemon)

Just in case, can you also try systemctl start core-daemon.service?

This also jumped out at me:

stderr: vnoded[3]: 13:46:13.384703 forkexec[vnode_cmd.c:417]: execvp() failed for 'hostname': No such file or directory

Do you have a /usr/bin/hostname binary? If not, can you try installing the inetutils package?

kadotux commented on 2022-04-05 10:52 (UTC) (edited on 2022-04-05 11:21 (UTC) by kadotux)

Hi! I can't seem to get CORE working on my Arch install, hope you could provide some help. Here's what I've done so far: -installed "core" package from AUR (and iptables2 and nftables as dependecies) -installed grpc -loaded sch_netem kernel module -installed frr from https://aur.archlinux.org/packages/frr -checked that I do not have docker installed on my system -enabled and started core-daemon service (tried via sudo sysctl start core-daemon and with core-daemon and with sudo core-daemon)

When I launch core-gui after starting core-daemon, and make a simple network with 1 pc and 1 router (or anything, really) and start the session, I get the following (core-daemon) output in my terminal after about 180 seconds:

2022-04-05 13:20:33,901 - INFO - core-daemon:banner - CORE daemon v.8.2.0 started Tue Apr  5 13:20:33 2022
2022-04-05 13:20:34,429 - INFO - coreemu:_load_emane - using emane: 1.3.3
2022-04-05 13:20:34,507 - INFO - server:listen - CORE gRPC API listening on: localhost:50051
2022-04-05 13:20:34,508 - INFO - core-daemon:cored - CORE TLV API TCP/UDP listening on: localhost:4038
2022-04-05 13:20:42,573 - INFO - coreemu:create_session - created session: 1
2022-04-05 13:20:54,672 - INFO - session:set_state - changing session(1) to state CONFIGURATION_STATE
2022-04-05 13:23:04,838 - ERROR - _server:_call_behavior - Exception calling application: [Errno 110] Connection timed out
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/grpc/_server.py", line 443, in _call_behavior
    response_or_iterator = behavior(argument, context)
  File "/usr/lib/python3.10/site-packages/core/api/grpc/server.py", line 267, in StartSession
    session.distributed.add_server(server.name, server.host)
  File "/usr/lib/python3.10/site-packages/core/emulator/distributed.py", line 143, in add_server
    server.remote_cmd(f"which {requirement}")
  File "/usr/lib/python3.10/site-packages/core/emulator/distributed.py", line 72, in remote_cmd
    result = self.conn.run(
  File "/usr/lib/python3.10/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
  File "/usr/lib/python3.10/site-packages/fabric/connection.py", line 29, in opens
    self.open()
  File "/usr/lib/python3.10/site-packages/fabric/connection.py", line 636, in open
    self.client.connect(**kwargs)
  File "/usr/lib/python3.10/site-packages/paramiko/client.py", line 349, in connect
    retry_on_signal(lambda: sock.connect(addr))
  File "/usr/lib/python3.10/site-packages/paramiko/util.py", line 283, in retry_on_signal
    return function()
  File "/usr/lib/python3.10/site-packages/paramiko/client.py", line 349, in <lambda>
    retry_on_signal(lambda: sock.connect(addr))
TimeoutError: [Errno 110] Connection timed out

and this output in the core-gui terminal:

2022-04-05 13:20:42,543 - INFO - manager:add_canvas - creating canvas(1)
2022-04-05 13:20:42,575 - INFO - coreclient:create_new_session - created session: 1
2022-04-05 13:20:42,576 - INFO - coreclient:join_session - joining session(1)
2022-04-05 13:20:42,583 - INFO - manager:join - cleared canvases
2022-04-05 13:20:42,583 - INFO - manager:add_canvas - creating canvas(1)
2022-04-05 13:20:47,637 - INFO - coreclient:create_node - add node(n1) to session(1), coordinates(193.0, 345.0)
2022-04-05 13:20:50,186 - INFO - coreclient:create_node - add node(n2) to session(1), coordinates(393.0, 226.0)
2022-04-05 13:20:53,482 - INFO - interface:create_iface - create node(n1) interface(Interface(id=0, name='eth0', mac=None, ip4='172.16.0.20', ip4_mask=24, ip6=None, ip6_mask=64, net_id=None, flow_id=None, mtu=None, node_id=None, net2_id=None))
2022-04-05 13:20:53,483 - INFO - interface:create_iface - create node(n2) interface(Interface(id=0, name='eth0', mac=None, ip4='172.16.0.1', ip4_mask=24, ip6=None, ip6_mask=64, net_id=None, flow_id=None, mtu=None, node_id=None, net2_id=None))
2022-04-05 13:20:53,483 - INFO - interface:create_link - added link between n1 and n2
2022-04-05 13:23:04,840 - ERROR - app:show_grpc_exception - app grpc exception
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/core/gui/coreclient.py", line 425, in start_session
    result, exceptions = self.client.start_session(self.session, definition)
  File "/usr/lib/python3.10/site-packages/core/api/grpc/client.py", line 239, in start_session
    response = self.stub.StartSession(request)
  File "/usr/lib/python3.10/site-packages/grpc/_channel.py", line 946, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/usr/lib/python3.10/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking
    raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    status = StatusCode.UNKNOWN
    details = "Exception calling application: [Errno 110] Connection timed out"
    debug_error_string = "{"created":"@1649154184.840339661","description":"Error received from peer ipv4:127.0.0.1:50051","file":"src/core/lib/surface/call.cc","file_line":905,"grpc_message":"Exception calling application: [Errno 110] Connection timed out","grpc_status":2}"

There is no difference whether I run core-daemon as sudo or not.

However, when I run core-daemon as a normal user and core-gui-legacy, this is the core-daemon output immediately (so no 180 second hangup) :

2022-04-05 13:40:18,912 - INFO - core-daemon:banner - CORE daemon v.8.2.0 started Tue Apr  5 13:40:18 2022
2022-04-05 13:40:19,446 - INFO - coreemu:_load_emane - using emane: 1.3.3
2022-04-05 13:40:19,509 - INFO - server:listen - CORE gRPC API listening on: localhost:50051
2022-04-05 13:40:19,513 - INFO - core-daemon:cored - CORE TLV API TCP/UDP listening on: localhost:4038
2022-04-05 13:40:29,574 - INFO - coreemu:create_session - created session: 38243
2022-04-05 13:40:29,575 - INFO - corehandlers:register - GUI has connected to session 38243 at Tue Apr  5 13:40:29 2022
2022-04-05 13:40:43,699 - INFO - session:set_state - changing session(38243) to state CONFIGURATION_STATE
2022-04-05 13:40:43,702 - INFO - corehandlers:handle_config_location - location configured: (0.0, 0.0, 0.0) = (47.5791667, -122.132322, 2.0) scale=150.0
2022-04-05 13:40:43,703 - INFO - session:add_node - creating node(CoreNode) id(1) name(n1) start(True)
2022-04-05 13:40:43,707 - ERROR - corehandlers:handle_message - Thread-5 (handler_thread): exception while handling message: CoreNodeMessage <msgtype = NODE, flags = 0x11 <ADD | STRING>>
  NUMBER: 1
  TYPE: 0
  NAME: n1
  MODEL: PC
  X_POSITION: 133
  Y_POSITION: 251
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/core/api/tlv/corehandlers.py", line 533, in handle_message
    replies = message_handler(message)
  File "/usr/lib/python3.10/site-packages/core/api/tlv/corehandlers.py", line 718, in handle_node_message
    node = self.session.add_node(_class, node_id, options)
  File "/usr/lib/python3.10/site-packages/core/emulator/session.py", line 550, in add_node
    node = self.create_node(_class, start, **kwargs)
  File "/usr/lib/python3.10/site-packages/core/emulator/session.py", line 1081, in create_node
    node.startup()
  File "/usr/lib/python3.10/site-packages/core/nodes/base.py", line 557, in startup
    output = self.host_cmd(vnoded, env=env)
  File "/usr/lib/python3.10/site-packages/core/nodes/base.py", line 119, in host_cmd
    return utils.cmd(args, env, cwd, wait, shell)
  File "/usr/lib/python3.10/site-packages/core/utils.py", line 242, in cmd
    raise CoreCommandError(status, input_args, stdout, stderr)
core.errors.CoreCommandError: command(vnoded -v -c /tmp/pycore.38243/n1 -l /tmp/pycore.38243/n1.log -p /tmp/pycore.38243/n1.pid -C /tmp/pycore.38243/n1.conf), status(1):
stdout: 
stderr: vnoded[27568]: 13:40:43.706491 vnoded[vnode_server.c:291]: nsfork() failed: Operation not permitted
vnoded[27568]: 13:40:43.706564 main[vnoded_main.c:222]: vnoded() failed
2022-04-05 13:40:43,708 - INFO - session:add_node - creating node(CoreNode) id(2) name(n2) start(True)
2022-04-05 13:40:43,711 - ERROR - corehandlers:handle_message - Thread-5 (handler_thread): exception while handling message: CoreNodeMessage <msgtype = NODE, flags = 0x11 <ADD | STRING>>
  NUMBER: 2
  TYPE: 0
  NAME: n2
  MODEL: router
  X_POSITION: 287
  Y_POSITION: 105
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/core/api/tlv/corehandlers.py", line 533, in handle_message
    replies = message_handler(message)
  File "/usr/lib/python3.10/site-packages/core/api/tlv/corehandlers.py", line 718, in handle_node_message
    node = self.session.add_node(_class, node_id, options)
  File "/usr/lib/python3.10/site-packages/core/emulator/session.py", line 550, in add_node
    node = self.create_node(_class, start, **kwargs)
  File "/usr/lib/python3.10/site-packages/core/emulator/session.py", line 1081, in create_node
    node.startup()
  File "/usr/lib/python3.10/site-packages/core/nodes/base.py", line 557, in startup
    output = self.host_cmd(vnoded, env=env)
  File "/usr/lib/python3.10/site-packages/core/nodes/base.py", line 119, in host_cmd
    return utils.cmd(args, env, cwd, wait, shell)
  File "/usr/lib/python3.10/site-packages/core/utils.py", line 242, in cmd
    raise CoreCommandError(status, input_args, stdout, stderr)
core.errors.CoreCommandError: command(vnoded -v -c /tmp/pycore.38243/n2 -l /tmp/pycore.38243/n2.log -p /tmp/pycore.38243/n2.pid -C /tmp/pycore.38243/n2.conf), status(1):
stdout: 
stderr: vnoded[27570]: 13:40:43.710842 vnoded[vnode_server.c:291]: nsfork() failed: Operation not permitted
vnoded[27570]: 13:40:43.710915 main[vnoded_main.c:222]: vnoded() failed
2022-04-05 13:40:43,713 - INFO - session:add_link - linking ptp: n1 - n2
2022-04-05 13:40:43,720 - ERROR - corehandlers:handle_message - Thread-5 (handler_thread): exception while handling message: CoreLinkMessage <msgtype = LINK, flags = 0x1 <ADD>>
  N1_NUMBER: 1
  N2_NUMBER: 2
  DELAY: 0
  BANDWIDTH: 0
  LOSS: 0
  DUP: 0
  JITTER: 0
  TYPE: 1
  IFACE1_NUMBER: 0
  IFACE1_IP4: 10.0.0.20
  IFACE1_IP4_MASK: 24
  IFACE1_MAC: 00:00:00:aa:00:00
  IFACE1_IP6: 2001::20
  IFACE1_IP6_MASK: 64
  IFACE2_NUMBER: 0
  IFACE2_IP4: 10.0.0.1
  IFACE2_IP4_MASK: 24
  IFACE2_MAC: 00:00:00:aa:00:01
  IFACE2_IP6: 2001::1
  IFACE2_IP6_MASK: 64
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/core/api/tlv/corehandlers.py", line 533, in handle_message
    replies = message_handler(message)
  File "/usr/lib/python3.10/site-packages/core/api/tlv/corehandlers.py", line 814, in handle_link_message
    self.session.add_link(
  File "/usr/lib/python3.10/site-packages/core/emulator/session.py", line 276, in add_link
    ptp = self.create_node(PtpNet, start)
  File "/usr/lib/python3.10/site-packages/core/emulator/session.py", line 1081, in create_node
    node.startup()
  File "/usr/lib/python3.10/site-packages/core/nodes/network.py", line 276, in startup
    self.net_client.create_bridge(self.brname)
  File "/usr/lib/python3.10/site-packages/core/nodes/netclient.py", line 230, in create_bridge
    self.run(f"{IP} link add name {name} type bridge")
  File "/usr/lib/python3.10/site-packages/core/nodes/network.py", line 265, in host_cmd
    output = utils.cmd(args, env, cwd, wait, shell)
  File "/usr/lib/python3.10/site-packages/core/utils.py", line 242, in cmd
    raise CoreCommandError(status, input_args, stdout, stderr)
core.errors.CoreCommandError: command(ip link add name b.3.f6 type bridge), status(2):
stdout: 
stderr: RTNETLINK answers: Operation not permitted
2022-04-05 13:40:43,723 - INFO - session:set_state - changing session(38243) to state INSTANTIATION_STATE
2022-04-05 13:40:43,726 - INFO - session:boot_node - booting node(n1): []
2022-04-05 13:40:43,726 - INFO - session:boot_node - booting node(n2): []
2022-04-05 13:40:43,727 - INFO - session:set_state - changing session(38243) to state RUNTIME_STATE

and only this as the core-gui-legacy terminal output:

Connecting to "core-daemon" (127.0.0.1:4038)...connected.

What's interesting, that if I run core-daemon with sudo (and core-gui-legacy as user), the terminal output for core-daemon is different:

2022-04-05 13:45:52,402 - INFO - core-daemon:banner - CORE daemon v.8.2.0 started Tue Apr  5 13:45:52 2022
2022-04-05 13:45:52,920 - INFO - coreemu:_load_emane - using emane: 1.3.3
2022-04-05 13:45:52,973 - INFO - server:listen - CORE gRPC API listening on: localhost:50051
2022-04-05 13:45:52,975 - INFO - core-daemon:cored - CORE TLV API TCP/UDP listening on: localhost:4038
2022-04-05 13:45:58,538 - INFO - coreemu:create_session - created session: 35579
2022-04-05 13:45:58,538 - INFO - corehandlers:register - GUI has connected to session 35579 at Tue Apr  5 13:45:58 2022
2022-04-05 13:46:13,347 - INFO - session:set_state - changing session(35579) to state CONFIGURATION_STATE
2022-04-05 13:46:13,347 - INFO - corehandlers:handle_config_location - location configured: (0.0, 0.0, 0.0) = (47.5791667, -122.132322, 2.0) scale=150.0
2022-04-05 13:46:13,348 - INFO - session:add_node - creating node(CoreNode) id(1) name(n1) start(True)
2022-04-05 13:46:13,356 - ERROR - corehandlers:handle_message - Thread-5 (handler_thread): exception while handling message: CoreNodeMessage <msgtype = NODE, flags = 0x11 <ADD | STRING>>
  NUMBER: 1
  TYPE: 0
  NAME: n1
  MODEL: PC
  X_POSITION: 189
  Y_POSITION: 256
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/core/api/tlv/corehandlers.py", line 533, in handle_message
    replies = message_handler(message)
  File "/usr/lib/python3.10/site-packages/core/api/tlv/corehandlers.py", line 718, in handle_node_message
    node = self.session.add_node(_class, node_id, options)
  File "/usr/lib/python3.10/site-packages/core/emulator/session.py", line 550, in add_node
    node = self.create_node(_class, start, **kwargs)
  File "/usr/lib/python3.10/site-packages/core/emulator/session.py", line 1081, in create_node
    node.startup()
  File "/usr/lib/python3.10/site-packages/core/nodes/base.py", line 565, in startup
    self.node_net_client.set_hostname(self.name)
  File "/usr/lib/python3.10/site-packages/core/nodes/netclient.py", line 31, in set_hostname
    self.run(f"hostname {name}")
  File "/usr/lib/python3.10/site-packages/core/nodes/base.py", line 632, in cmd
    return utils.cmd(args, wait=wait, shell=shell)
  File "/usr/lib/python3.10/site-packages/core/utils.py", line 242, in cmd
    raise CoreCommandError(status, input_args, stdout, stderr)
core.errors.CoreCommandError: command(vcmd -c /tmp/pycore.35579/n1 -- hostname n1), status(1):
stdout: 
stderr: vnoded[3]: 13:46:13.356121 forkexec[vnode_cmd.c:417]: execvp() failed for 'hostname': No such file or directory
2022-04-05 13:46:13,358 - INFO - session:add_node - creating node(CoreNode) id(2) name(n2) start(True)
2022-04-05 13:46:13,386 - ERROR - corehandlers:handle_message - Thread-5 (handler_thread): exception while handling message: CoreNodeMessage <msgtype = NODE, flags = 0x11 <ADD | STRING>>
  NUMBER: 2
  TYPE: 0
  NAME: n2
  MODEL: router
  X_POSITION: 338
  Y_POSITION: 115
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/core/api/tlv/corehandlers.py", line 533, in handle_message
    replies = message_handler(message)
  File "/usr/lib/python3.10/site-packages/core/api/tlv/corehandlers.py", line 718, in handle_node_message
    node = self.session.add_node(_class, node_id, options)
  File "/usr/lib/python3.10/site-packages/core/emulator/session.py", line 550, in add_node
    node = self.create_node(_class, start, **kwargs)
  File "/usr/lib/python3.10/site-packages/core/emulator/session.py", line 1081, in create_node
    node.startup()
  File "/usr/lib/python3.10/site-packages/core/nodes/base.py", line 565, in startup
    self.node_net_client.set_hostname(self.name)
  File "/usr/lib/python3.10/site-packages/core/nodes/netclient.py", line 31, in set_hostname
    self.run(f"hostname {name}")
  File "/usr/lib/python3.10/site-packages/core/nodes/base.py", line 632, in cmd
    return utils.cmd(args, wait=wait, shell=shell)
  File "/usr/lib/python3.10/site-packages/core/utils.py", line 242, in cmd
    raise CoreCommandError(status, input_args, stdout, stderr)
core.errors.CoreCommandError: command(vcmd -c /tmp/pycore.35579/n2 -- hostname n2), status(1):
stdout: 
stderr: vnoded[3]: 13:46:13.384703 forkexec[vnode_cmd.c:417]: execvp() failed for 'hostname': No such file or directory
2022-04-05 13:46:13,387 - INFO - session:add_link - linking ptp: n1 - n2
2022-04-05 13:46:13,421 - ERROR - corehandlers:handle_message - Thread-5 (handler_thread): exception while handling message: CoreLinkMessage <msgtype = LINK, flags = 0x1 <ADD>>
  N1_NUMBER: 1
  N2_NUMBER: 2
  DELAY: 0
  BANDWIDTH: 0
  LOSS: 0
  DUP: 0
  JITTER: 0
  TYPE: 1
  IFACE1_NUMBER: 0
  IFACE1_IP4: 10.0.0.20
  IFACE1_IP4_MASK: 24
  IFACE1_MAC: 00:00:00:aa:00:00
  IFACE1_IP6: 2001::20
  IFACE1_IP6_MASK: 64
  IFACE2_NUMBER: 0
  IFACE2_IP4: 10.0.0.1
  IFACE2_IP4_MASK: 24
  IFACE2_MAC: 00:00:00:aa:00:01
  IFACE2_IP6: 2001::1
  IFACE2_IP6_MASK: 64
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/core/api/tlv/corehandlers.py", line 533, in handle_message
    replies = message_handler(message)
  File "/usr/lib/python3.10/site-packages/core/api/tlv/corehandlers.py", line 814, in handle_link_message
    self.session.add_link(
  File "/usr/lib/python3.10/site-packages/core/emulator/session.py", line 277, in add_link
    iface1 = node1.new_iface(ptp, iface1_data)
  File "/usr/lib/python3.10/site-packages/core/nodes/base.py", line 830, in new_iface
    self.attachnet(iface_id, net)
  File "/usr/lib/python3.10/site-packages/core/nodes/base.py", line 432, in attachnet
    iface.attachnet(net)
  File "/usr/lib/python3.10/site-packages/core/nodes/interface.py", line 184, in attachnet
    net.attach(self)
  File "/usr/lib/python3.10/site-packages/core/nodes/network.py", line 715, in attach
    super().attach(iface)
  File "/usr/lib/python3.10/site-packages/core/nodes/network.py", line 313, in attach
    iface.net_client.set_iface_master(self.brname, iface.localname)
  File "/usr/lib/python3.10/site-packages/core/nodes/netclient.py", line 255, in set_iface_master
    self.run(f"{IP} link set dev {iface_name} master {bridge_name}")
  File "/usr/lib/python3.10/site-packages/core/nodes/interface.py", line 154, in host_cmd
    return utils.cmd(args, env, cwd, wait, shell)
  File "/usr/lib/python3.10/site-packages/core/utils.py", line 242, in cmd
    raise CoreCommandError(status, input_args, stdout, stderr)
core.errors.CoreCommandError: command(ip link set dev veth1.0.71 master b.3.71), status(1):
stdout: 
stderr: Cannot find device "veth1.0.71"
2022-04-05 13:46:13,426 - INFO - session:set_state - changing session(35579) to state INSTANTIATION_STATE
2022-04-05 13:46:13,427 - INFO - session:boot_node - booting node(n1): []
2022-04-05 13:46:13,427 - INFO - session:boot_node - booting node(n2): []
2022-04-05 13:46:13,427 - INFO - session:set_state - changing session(35579) to state RUNTIME_STATE

The output from core-gui-legacy is the same as without sudo.

I'm running this from a laptop which is connected to internet via wifi (NetworkManager), if that makes any difference...

I can run core successfully and with no problems in a Ubuntu VM, virtualized with KVM.

Any tips would be appreciated as I'm at a loss what to try next.

edit: I tried to run "ip a" when core-daemon is run as sudo and I don't see any "veth" interfaces listed, only this is new

b.3.74: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000 link/ether b2:9f:db:0f:ce:c3 brd ff:ff:ff:ff:ff:ff

Could this be the problem? Core-daemon doesn't create a "veth" interface? I have "veth" module loaded.

vedranmiletic commented on 2022-03-05 11:23 (UTC)

Forgot to return here to say thanks for mgen. Sorry for that. I am glad to report that some of my students already successfully installed it.

In addition, a little nitpick for 8.1.0 PKGBUILD, CORE now seems to require nftables:

==> Starting build()...
Bootstrapping the autoconf system...
(Messages below about copying and installing files are normal.)
(1/4) Running aclocal...
(2/4) Running autoheader...
(3/4) Running automake...
configure.ac:85: installing 'config/compile'
configure.ac:114: installing 'config/config.guess'
configure.ac:114: installing 'config/config.sub'
configure.ac:12: installing 'config/install-sh'
configure.ac:12: installing 'config/missing'
netns/Makefile.am: installing 'config/depcomp'
(4/4) Running autoconf...

You are now ready to run "./configure".
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking for gawk... (cached) gawk
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking for a sed that does not truncate output... /usr/bin/sed
checking for NgMkSockNode in -lnetgraph... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for vfork.h... no
checking for arpa/inet.h... yes
checking for fcntl.h... yes
checking for limits.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for sys/ioctl.h... yes
checking for sys/mount.h... yes
checking for sys/socket.h... yes
checking for sys/time.h... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking for inline... inline
checking for int32_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint32_t... yes
checking for uint8_t... yes
checking for fork... no
checking for vfork... yes
checking for working vfork... (cached) yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for GNU libc compatible malloc... yes
checking for GNU libc compatible realloc... yes
checking for atexit... yes
checking for dup2... yes
checking for gettimeofday... yes
checking for memset... no
checking for socket... yes
checking for strerror... yes
checking for uname... yes
checking for a Python interpreter with version >= 3.6... python
checking for python... /usr/bin/python
checking for python version... 3.10
checking for python platform... linux
checking for GNU default python prefix... ${prefix}
checking for GNU default python exec_prefix... ${exec_prefix}
checking for python script directory (pythondir)... ${PYTHON_PREFIX}/lib/python3.10/site-packages
checking for python extension module directory (pyexecdir)... ${PYTHON_EXEC_PREFIX}/lib/python3.10/site-packages
checking for sysctl... /usr/sbin/
checking for nft... no
configure: error: Could not locate nftables (from nftables package).
==> ERROR: A failure occurred in build().
    Aborting...

Splork commented on 2022-01-13 13:58 (UTC)

@vedranmiletic I've created an mgen-package and added it as an optional dependency