opennetworkinglab / aether-onramp

Apache License 2.0
18 stars 24 forks source link

Error installing 5gc-router #4

Open JoaquinChung opened 1 year ago

JoaquinChung commented 1 year ago

When I issue the make aether-5gc-install I get the following error:

ansible-playbook -i /home/cc/aether-onramp/hosts.ini /home/cc/aether-onramp/deps/5gc/router.yml --tags install \ --extra-vars "ROOT_DIR=/home/cc/aether-onramp" --extra-vars "@/home/cc/aether-onramp/vars/main.yml"

PLAY [provision router] **

TASK [Gathering Facts] *** ok: [node1]

TASK [router : set_fact] ***** ok: [node1]

TASK [router : set net.ipv4.conf.all.arp_filter to 1] **** ok: [node1]

TASK [router : set net.ipv4.conf.all.arp_ignore to 1] **** ok: [node1]

TASK [router : set net.ipv4.conf.all.arp_announce to 2] ** ok: [node1]

TASK [router : set net.ipv4.conf.all.rp_filter to 2] ***** ok: [node1]

TASK [router : copy 10-aether-access.netdev to /etc/systemd/network/10-aether-access.netdev] ***** ok: [node1]

TASK [router : copy 20-aether-access.network to /etc/systemd/network/20-aether-access.network] *** ok: [node1]

TASK [router : copy 10-aether-core.netdev to /etc/systemd/network/10-aether-core.netdev] ***** ok: [node1]

TASK [router : copy 20-aether-core.network to /etc/systemd/network/20-aether-core.network] *** ok: [node1]

TASK [router : find eno1's netplan network directory] **** fatal: [node1]: FAILED! => {"changed": true, "cmd": "basename $(find //systemd/network -maxdepth 1 -not -type d -name 'eno1.network' -print)", "delta": "0:00:00.006468", "end": "2023-09-07 01:09:35.396305", "msg": "non-zero return code", "rc": 1, "start": "2023-09-07 01:09:35.389837", "stderr": "basename: missing operand\nTry 'basename --help' for more information.", "stderr_lines": ["basename: missing operand", "Try 'basename --help' for more information."], "stdout": "", "stdout_lines": []}

PLAY RECAP *** node1 : ok=10 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

llpeterson commented 1 year ago

The most likely cause is that your server needs to use systemd-networkd to configure the network. What does "systemctl status systemd-networkd.service" return?

JoaquinChung commented 1 year ago

It's active and running:

cc@aether:~$ systemctl status systemd-networkd.service
● systemd-networkd.service - Network Configuration
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2023-09-06 21:11:54 UTC; 16h ago
TriggeredBy: ● systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
   Main PID: 1507 (systemd-network)
     Status: "Processing requests..."
      Tasks: 1 (limit: 154274)
     Memory: 2.8M
        CPU: 543ms
     CGroup: /system.slice/systemd-networkd.service
             └─1507 /lib/systemd/systemd-networkd

Sep 07 00:31:14 aether systemd-networkd[1507]: cali03d78f71242: Gained IPv6LL
Sep 07 00:31:23 aether systemd-networkd[1507]: cali03d78f71242: Link DOWN
Sep 07 00:31:23 aether systemd-networkd[1507]: cali03d78f71242: Lost carrier
Sep 07 00:31:25 aether systemd-networkd[1507]: calid86f21b3613: Link UP
Sep 07 00:31:25 aether systemd-networkd[1507]: calid86f21b3613: Gained carrier
Sep 07 00:31:26 aether systemd-networkd[1507]: calid86f21b3613: Gained IPv6LL
Sep 07 00:31:40 aether systemd-networkd[1507]: calid86f21b3613: Link DOWN
Sep 07 00:31:40 aether systemd-networkd[1507]: calid86f21b3613: Lost carrier
Sep 07 00:31:45 aether systemd-networkd[1507]: cali996902fc2fa: Link DOWN
Sep 07 00:31:45 aether systemd-networkd[1507]: cali996902fc2fa: Lost carrier

BTW, I'm running on a Ubuntu 22.04 system with kernel 5.15:

cc@aether:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:    22.04
Codename:   jammy
cc@aether:~$ uname -r
5.15.0-83-generic
llpeterson commented 1 year ago

What does the following command return for you?

find //systemd/network -maxdepth 1 -not -type d -name 'eno1.network' -print

You might also check out the Network Service section in this collection of notes, and see if any of it helps:

https://docs.google.com/document/d/19xjL4K2jpEtYZxxmxQHFVtk4tfUEjxC3xQv8lkYdV-I/edit#heading=h.7umhlsdzobcp

I'd also recommend joining the #aether-onramp channel on ONF's slack workspace. (Getting broader exposure to the issue might be helpful.)

JoaquinChung commented 1 year ago

That google doc was helpful, it got me through the error but I got a new one:

TASK [core : add cord chart repo] **********************************************                                                   
fatal: [node1]: FAILED! => {"changed": false, "command": "/usr/local/bin/helm repo add cord https://charts.opencord.org", "msg": "F
ailure when executing Helm command. Exited 1.\nstdout: \nstderr: WARNING: Kubernetes configuration file is group-readable. This is 
insecure. Location: /home/cc/.kube/config\nWARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /h
ome/cc/.kube/config\nError: looks like \"https://charts.opencord.org\" is not a valid chart repository or cannot be reached: Get \"
https://charts.opencord.org/index.yaml\": dial tcp: lookup charts.opencord.org on 127.0.0.53:53: server misbehaving\n", "stderr": "
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/cc/.kube/config\nWARNING: Kubernetes co
nfiguration file is world-readable. This is insecure. Location: /home/cc/.kube/config\nError: looks like \"https://charts.opencord.
org\" is not a valid chart repository or cannot be reached: Get \"https://charts.opencord.org/index.yaml\": dial tcp: lookup charts
.opencord.org on 127.0.0.53:53: server misbehaving\n", "stderr_lines": ["WARNING: Kubernetes configuration file is group-readable. 
This is insecure. Location: /home/cc/.kube/config", "WARNING: Kubernetes configuration file is world-readable. This is insecure. Lo
cation: /home/cc/.kube/config", "Error: looks like \"https://charts.opencord.org\" is not a valid chart repository or cannot be rea
ched: Get \"https://charts.opencord.org/index.yaml\": dial tcp: lookup charts.opencord.org on 127.0.0.53:53: server misbehaving"], 
"stdout": "", "stdout_lines": []}                                                                                                  

PLAY RECAP *********************************************************************                                                   
node1                      : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Just for the record, I'm using an instance on Chameleon Cloud with static IP addresses, so my configuration file was different. Also, I was connected to the server via SSH and the ansible recipe kicked me out when it restarted the network service. Maybe it's worth mentioning that for some scripts is recommended to have console access.

mbilal92 commented 1 year ago

@JoaquinChung can you try installing again using make aether-5gc-install

JoaquinChung commented 1 year ago

Hi, that's what I did on my last post, I just cropped the output to the final error message

llpeterson commented 1 year ago

I haven't tried Chameleon, but I did get the Quick Start deployment running on Cloud Lab. Is it possible you're sitting behind a proxy?

llpeterson commented 1 year ago

Also, can you say exactly what you did to get past the previous problem. I have a feeling the original "fix" in the Google doc is more invasive than it needs to be.

JoaquinChung commented 1 year ago

Chameleon is built on top of OpenStack, I used CloudLab ages ago so I'm not familiar with its current form.

I'm definitely behind a NAT in Chameleon, and yes the "fix" in the google doc broke my ability to SSH into my instance. First I just installed netplan.io and restarted my instance but no luck. Then I edited the netplan file as follows:

cc@aether:~$ cat /etc/systemd/network/05-netplan-eno1.network                                                                      
# Placeholder to trick Ansible                                                                                                     

[Match]                                                                                                                            
Name=eno1                                                                                                                          

[Network]                                                                                                                          
IPForward=yes                                                                                                                      
Address=X.X.X.X/MASK                                                                                                             

[Route]                                                                                                                            
Gateway=Y.Y.Y.Y                                                                                                              
Destination=0.0.0.0/0

This allowed me to pass the first error, but created the new error and broke my ability to SSH into the instance. I can still use Chameleon's console thou.

Bhuvaneshnetcon commented 8 months ago

Hi I have built aether-onramp successfully in ubuntu server 22.04 and did make aether-5gc-install but my UE quectel RM-520N-GL with 3GPP release 16 does not get internet. For your kind note upf is able to ping 8.8.8.8. Then my host linux network setting is set to be as follows:

ipv4-forwarding enable in sysctl sudo iptables -t nat -A POSTROUTING -o dn-interface -j MASQUERADE firewall is also disabled Could you please help me to get internet to UE?