After changing hostname - UnicodeError: label empty or too long

  • How did you set the hostname to testtesttest?

    Good timing on the question, I was just testing this. It happens when I either:

    • set the hostname in the OMV web panel
    • use the "hostname" command in shell

    Then I recalled that's not a proper way to change the hostname, quick google lookup found me this.
    But when the hostname is changed this way (with "hostnamectl" and by editing "/etc/hosts") and I apply any changes in OMV, the hostname returns back to the default "raspberrypi".

    Server: Codename Oven (ASRock J5040-ITX with 4-core Pentium Silver J5040, 2x 8TB Seagate IronWolf HDD, inside Coolermaster Elite 110 case, powered by OMV 6)

  • Can you please run salt-call --local state.orchestrate omv.deploy.hostname and post the output.

    We summoned the error this way:

    Server: Codename Oven (ASRock J5040-ITX with 4-core Pentium Silver J5040, 2x 8TB Seagate IronWolf HDD, inside Coolermaster Elite 110 case, powered by OMV 6)

  • Sorry for late response, didn't get an e-mail with a response notification for some reason.


    I just tried to change my hostname right now to try and replicate the issue and describe it to you in full detail to reproduce but... I'm no longer having this issue, the hostname changes properly now 8| (see screenshot)


    Since saturday, I added a proper USB hard drive and configured OMV with shared folders, SMB shares and FTP access. I also changed the timezone from EU/London to EU/Warsaw, moving the clock forward an hour. Additionally, on Raspbian I installed ZeroTier, etherwake and hd-idle, along with packages required to build the last one (build-essential, fakeroot, debhelper). I don't remember doing any other changes...

  • did OMV 5.3.10 fresh install. all works nice until i change hostname Then i got error:


    "Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; omv-salt deploy run hosts 2>&1' with exit code '1': Traceback (most recent call last): File "/usr/lib/python3.7/encodings/idna.py", line 165, in encode raise UnicodeError("label empty or too long") UnicodeError: label empty or too long The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/sbin/omv-salt", line 136, in <module> sys.exit(main()) File "/sbin/omv-salt", line 132, in main cli() File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/sbin/omv-salt", line 120, in deploy_run caller = salt.client.Caller(mopts=mopts) File "/usr/lib/python3/dist-packages/salt/client/__init__.py", line 1995, in __init__ self.sminion = salt.minion.SMinion(self.opts) File "/usr/lib/python3/dist-packages/salt/minion.py", line 843, in __init__ opts['grains'] = salt.loader.grains(opts) File "/usr/lib/python3/dist-packages/salt/loader.py", line 784, in grains ret = funcs[key]() File "/usr/lib/python3/dist-packages/salt/grains/core.py", line 2259, in ip_fqdn info = socket.getaddrinfo(_fqdn, None, socket_type) File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)"


    After that i cant change anything in OMV web interface. Every change makes this error "label empty or too long" but with different text in omv-salt deploy line.

  • I am getting the same error, running OMV on a Pi 4, version 5.4.2-1


    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; omv-salt deploy run systemd-networkd 2>&1' with exit code '1': /usr/lib/python3/dist-packages/salt/utils/path.py:265: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working if not isinstance(exes, collections.Iterable): raspberrypi: ---------- ID: configure_etc_network_interfaces Function: file.managed Name: /etc/network/interfaces Result: True Comment: File /etc/network/interfaces is in the correct state Started: 18:19:36.931931 Duration: 64.308 ms Changes: ---------- ID: remove_systemd_networkd_config_files Function: module.run Result: True Comment: file.find: [] Started: 18:19:36.997710 Duration: 2.087 ms Changes: ---------- file.find: ---------- ID: remove_empty_systemd_networkd_config_files Function: module.run Result: True Comment: file.find: [] Started: 18:19:37.000081 Duration: 1.609 ms Changes: ---------- file.find: ---------- ID: remove_netplan_config_files Function: module.run Result: True Comment: file.find: ['/etc/netplan/10-openmediavault-default.yaml'] Started: 18:19:37.001958 Duration: 2.071 ms Changes: ---------- file.find: - /etc/netplan/10-openmediavault-default.yaml ---------- ID: configure_netplan_default Function: file.managed Name: /etc/netplan/10-openmediavault-default.yaml Result: True Comment: File /etc/netplan/10-openmediavault-default.yaml updated Started: 18:19:37.004313 Duration: 15.956 ms Changes: ---------- diff: New file mode: 0644 ---------- ID: apply_netplan_config Function: cmd.run Name: netplan apply Result: False Comment: Command "netplan apply" run Started: 18:19:37.022071 Duration: 271.03 ms Changes: ---------- pid: 18161 retcode: 1 stderr: Traceback (most recent call last): File "/usr/sbin/netplan", line 23, in <module> netplan.main() File "/usr/share/netplan/netplan/cli/core.py", line 50, in main self.run_command() File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command self.func() File "/usr/share/netplan/netplan/cli/commands/apply.py", line 43, in run self.run_command() File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command self.func() File "/usr/share/netplan/netplan/cli/commands/apply.py", line 93, in command_apply stderr=subprocess.DEVNULL) File "/usr/lib/python3.7/subprocess.py", line 347, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['udevadm', 'test-builtin', 'net_setup_link', '/sys/class/net/lo']' returned non-zero exit status 1. stdout: Summary for raspberrypi ------------ Succeeded: 5 (changed=5) Failed: 1 ------------ Total states run: 6 Total run time: 357.061 ms

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!