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: tom5760 (Splork)
Last Packager: Splork
Votes: 10
Popularity: 0.000000
First Submitted: 2010-10-27 16:52 (UTC)
Last Updated: 2022-03-31 12:39 (UTC)

Latest Comments

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

vedranmiletic commented on 2022-01-10 18:30 (UTC)

@Splork I now see that they tagged "Windows release", whatever that means for Linux.

As for the installation, mgen binary just needs to be in the path. CORE will find it and use it for Tools/Traffic... functionality. There are a couple of presets available so it's actually quite easy to use.

Splork commented on 2022-01-07 16:08 (UTC)

@vedranmiletic unfortunately, the current release of MGEN does not build with the current release of protolib - it apparently needs some changes which are pushed to master in the protolib-repo but not in the most recent release

Also, that release is over 2 years old now, so I don't expect there to be anything anytime soon. Though I will ask them to consider tagging a new release.

Since I've never used that component myself, I'm not entirely sure as to the following: does CORE expect the mgen-binary to be installed as a system-executable (i.e. would mgen be a separate AUR-package), or do you need to place it inside the CORE-tree (i.e. I would need to build it as part of the CORE-PKGBUILD)?

vedranmiletic commented on 2022-01-06 17:52 (UTC)

CORE's traffic generator uses MGEN [1]. Would you be willing to provide a PKGBUILD for it as well? Latest release is no longer provided in binary form for Linux by the upstream and I want to avoid manual compilation for student installations.

[1] https://github.com/USNavalResearchLaboratory/mgen

Splork commented on 2021-12-08 19:38 (UTC)

@vedranmiletic, thank's for your interest, it's great to see that the package is useful to people.

As for the dependencies: I stumbled upon the issue with certifi some time ago (see two comments down), but since the upstream bug report does not seem to be going anywhere, I will add the dependency.

From what I understand, the old tk-based GUI is largely deprecated, and the new python-based GUI is the one under active development. I'll add TK as a optional dependency, though.

vedranmiletic commented on 2021-12-08 18:19 (UTC)

Thanks for maintaining this package. We use it in teaching and it's very nice to be able to install CORE with a single command, it helps the students a lot.

Just a small issue: there are three missing run-time dependencies I would like to note:

  • python-certifi and python-decorator (for the daemon)
  • tk (for the GUI)

Can you add them to the PKGBUILD?

tom5760 commented on 2021-07-27 17:26 (UTC)

Thanks for the report @Splork!

Huh, this looks like something changed in the python-pyproj?

Aha, there's actually already a bug report registered for this.

So I think for now, we just need to wait for that bug ticket to be fixed.

Splork commented on 2021-07-26 13:15 (UTC) (edited on 2021-07-26 13:16 (UTC) by Splork)

The current version appears to require the package community/python-certifi as a runtime dependency. Without it, the core-daemon.service fails with the following error:

systemd[1]: Started Common Open Research Emulator Service.
core-daemon[41785]: Traceback (most recent call last):
core-daemon[41785]:   File "/usr/bin/core-daemon", line 17, in <module>
core-daemon[41785]:     from core.api.grpc.server import CoreGrpcServer
core-daemon[41785]:   File "/usr/lib/python3.9/site-packages/core/api/grpc/server.py", line 15, in <module>
core-daemon[41785]:     from core.api.grpc import (
core-daemon[41785]:   File "/usr/lib/python3.9/site-packages/core/api/grpc/grpcutils.py", line 24, in <module>
core-daemon[41785]:     from core.emulator.session import Session
core-daemon[41785]:   File "/usr/lib/python3.9/site-packages/core/emulator/session.py", line 44, in <module>
core-daemon[41785]:     from core.location.geo import GeoLocation
core-daemon[41785]:   File "/usr/lib/python3.9/site-packages/core/location/geo.py", line 8, in <module>
core-daemon[41785]:     import pyproj
core-daemon[41785]:   File "/usr/lib/python3.9/site-packages/pyproj/__init__.py", line 49, in <module>
core-daemon[41785]:     import pyproj.network
core-daemon[41785]:   File "/usr/lib/python3.9/site-packages/pyproj/network.py", line 8, in <module>
core-daemon[41785]:     import certifi
core-daemon[41785]: ModuleNotFoundError: No module named 'certifi'
systemd[1]: core-daemon.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: core-daemon.service: Failed with result 'exit-code'.

tom5760 commented on 2020-08-17 18:47 (UTC)

Thanks again @Ruckikir, package is updated now.

tom5760 commented on 2020-08-17 15:54 (UTC)

Cool! Thanks for your help @Rucikir! I was running into similar issues with Poetry. I'll update shortly.

Rucikir commented on 2020-08-17 15:50 (UTC)

Hi! I tried to update the PKGBUILD for CORE 7.0.1, but I don’t get how to tell poetry to fetch the python module dependencies from the system and to install the 'core' module in the system. For now, poetry installs all the modules in ~/.cache. See https://gist.github.com/MisterDA/28b9bb2ef5e05a734de7b8e214ba14eb.

EDIT: I ditched poetry during the installation to use python-dephell, setuptools, and the Arch python-* packages. It should be fine now.

tom5760 commented on 2020-07-28 16:29 (UTC)

CORE 7.0.0 changed a bit with the installation, will need to rework the PKGBUILD a bit. Will try to get to it this weekend.

tom5760 commented on 2020-02-10 15:42 (UTC)

Done, thanks for the catch Rucikir!

Rucikir commented on 2020-02-08 12:50 (UTC)

Thanks for the update! Dependency 'python-yaml' is missing for the new GUI.

gbianchini commented on 2017-06-07 09:15 (UTC)

@Tom5760 Worked like a charm! Thanks!

tom5760 commented on 2017-06-06 23:28 (UTC)

@gbianchini, looks like adding "-no-int-in-bool-context" fixes the build. I've made that change, and updated the PKGBUILD.

gbianchini commented on 2017-06-06 22:59 (UTC)

There's a bug with a python library that doesn't allow me compile it (Tried it on 2 computers already). Here's the stack trace: building 'netns' extension creating build creating build/temp.linux-x86_64-2.7 gcc -pthread -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack- protector-strong -Wno-strict-aliasing -O3 -Werror -Wall -D_GNU_SOURCE -Wno-strict-aliasing -fPIC -I/usr/include/python2.7 -c netnsmodule.c -o build/temp.linux-x86_64-2.7/netnsmodule.o In file included from /usr/include/python2.7/Python.h:78:0, from netnsmodule.c:16: netnsmodule.c: En la función ‘netns_nsexecvp’: /usr/include/python2.7/pymem.h:97:30: error: ‘*’ en contexto boolean; se sugiere ‘&&’ en su lugar [-Werror=int-in-bool-context] ( (type *) PyMem_MALLOC((n) * sizeof(type)) ) ) ^ /usr/include/python2.7/pymem.h:75:15: nota: en definición de macro ‘PyMem_MALLOC’ : malloc((n) ? (n) : 1)) ^ netnsmodule.c:61:10: nota: en expansión de macro ‘PyMem_NEW’ argv = PyMem_NEW(char *, argc + 1); ^~~~~~~~~ cc1: todos los avisos se tratan como errores error: command 'gcc' failed with exit status 1 make[3]: *** [Makefile:684: libnetns.a] Error 1 make[3]: se sale del directorio '/home/german/Documents/core/src/core-4.8/daemon/src' make[2]: *** [Makefile:624: all-recursive] Error 1 make[2]: se sale del directorio '/home/german/Documents/core/src/core-4.8/daemon' make[1]: *** [Makefile:440: all-recursive] Error 1 make[1]: se sale del directorio '/home/german/Documents/core/src/core-4.8' make: *** [Makefile:370: all] Error 2 ==> ERROR: Se produjo un fallo en build(). Cancelando… Thanks.

chepaz commented on 2015-01-18 14:01 (UTC)

It works, thank you very much!

tom5760 commented on 2015-01-17 16:18 (UTC)

I just updated the package to work around this problem. Let me know if it works for you.

chepaz commented on 2015-01-16 15:36 (UTC)

Problem on install: "core: /usr/sbin exists in fs" How could this be solved? Thanks!

tom5760 commented on 2014-08-16 03:18 (UTC)

Updated to CORE 4.7. Thanks for the reminder fusca!

fusca commented on 2014-08-14 17:16 (UTC)

CORE 4.7 released 06-Aug-2014.

tom5760 commented on 2013-09-29 16:04 (UTC)

Updated to CORE 4.6.

tom5760 commented on 2013-01-09 15:48 (UTC)

Updated to add patch for tk8.6.

tom5760 commented on 2012-11-07 17:21 (UTC)

Updated to 4.4, added systemd service, and new patch to fix vnoded on Arch.

tom5760 commented on 2011-08-19 22:32 (UTC)

Ok, updated to 4.2. Let me know if there are any problems.

t-8ch commented on 2011-08-19 21:11 (UTC)

4.2 is available for download

tom5760 commented on 2011-07-03 18:47 (UTC)

Updated core PKGBUILD to fix building. (I had some errors building one of the python components without explicitly setting -D_GNU_SOURCE).

tom5760 commented on 2011-02-21 20:32 (UTC)

Done. Just made "nrl-quagga" and "quagga" optional dependencies.

commented on 2011-02-21 20:27 (UTC)

Strictly speaking nrl-quagga is not necessary for core to be installed and used. I use it with regular quagga just fine. Maybe it should be an optional dependency or something else.

tom5760 commented on 2011-01-05 19:46 (UTC)

Updated core to use the latest stable release instead of SVN nightly snapshots. I also had to patch the configure script in order to use Arch's libev 4, instead of Ubuntu et. al.'s libev 3.9.

commented on 2010-12-16 11:02 (UTC)

It should be noted that core's (and some of its dependencies') PKGBUILDs download latest nightly snapshots, so their MD5s are inevitably out of date. Core's configure script has trouble finding libev without the following libev.pc file in your pkgconfig path:- http://aur.pastebin.com/F9vbk6Db