Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Unable to restart connman #849

Open
pavanfhw opened this issue Mar 22, 2022 · 1 comment
Open

Unable to restart connman #849

pavanfhw opened this issue Mar 22, 2022 · 1 comment
Labels
kind/bug Something isn't working

Comments

@pavanfhw
Copy link

Version (k3OS / kernel)

k3os version v0.20.7-k3s1r0

5.4.0-73-generic #82 SMP Thu Jun 3 02:29:43 UTC 2021
Architecture

x86_64
Describe the bug

I use this configuration to set up the IP of my k3os

write_files:
- enconding: ""
  content: |-
    #!/bin/bash

    ETH0=$(connmanctl services | awk '{ print $3 }' | while read -r s1; do connmanctl services $s1 | grep -q "eth0" && echo "$s1"; done)

    connmanctl config $ETH0 --ipv4 manual 172.93.52.3 255.255.255.0 172.93.52.1 --nameservers 8.8.8.8 1.1.1.1

    service connman restart
  owner: root:root
  path: /etc/set-ip.sh
  permissions: '0755'

run_cmd:
- "/etc/set-ip.sh"

Suddenly this server went offline and I can't ping any server, resolve any DNS and the server is not reachable from outside.
Trying to run manually the IP configuration from the config file I get this when restarting connman to apply the config:

$ sudo service connman restart
 * Starting Network Management Daemon ...
 * supervise-daemon: /usr/sbin/connmand is already running
 * failed to start Network Management Daemon                                                                                                                                                                                            [ !! ]
 * ERROR: connman failed to start

Additional context

I have other servers, exact like this one with the same configuration (changing only the IP) that work.
My guess is that as connman is not restarting the network config is not applying and I have no connection. I need help understanding how to restart connman (or the connman daemon?).

@pavanfhw pavanfhw added the kind/bug Something isn't working label Mar 22, 2022
@pavanfhw
Copy link
Author

pavanfhw commented Mar 28, 2022

Tried setting network config like this on /var/lib/connman/default.config

[service_eth0]
Type=ethernet
IPv4=172.93.52.3/255.255.255.0/172.93.52.1
IPv6=off
Nameservers=8.8.8.8

I can see changes were applied. But the result is the same. If this config is indeed being applied and is correct, what could cause the network connection problems?
Is there a way to debug this in k3os/connman?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant