Saving configuration on OMV5 fails with „Unicode error“

    • OMV 5.x (beta)

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Saving configuration on OMV5 fails with „Unicode error“

      Hi,

      I am running OMV5 for a few weeks now (before I used OMV4 and made a fresh install).
      From one day to the other, I cannot save the configuration anymore, because I am getting the following 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 halt 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 842, 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)

      I tried to add a DNS Server into the network configuration and after applying and saving I got this error

      OMV version is 5.2.7-1

      Does anybody know what went wrong?

      Thanks
      Michael
      Asrock J3160-ITX, 4GB RAM, 120GB SSD, 2x3TB Seagate Ironwolf as RAID1, Thermaltake Core1 Cube
    • Please post the output of omv-confdbadm read --prettify conf.system.network.interface.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • Hi,

      thanks for the response.

      BTW: using Tapatalk on IOS resulted in my main account (LarryL) being banned, so I am writing now from a separate account.
      Think I have to avoid tapatalk on IOS (from all I have read...)

      Anyway, thats the output on the CLI:

      root@omvnas:~# omv-confdbadm read --prettify conf.system.network.interface
      [
      {
      "address": "",
      "address6": "",
      "bonddowndelay": 0,
      "bondmiimon": 0,
      "bondmode": 1,
      "bondprimary": "",
      "bondupdelay": 0,
      "comment": "",
      "devicename": "enp3s0",
      "dnsnameservers": "8.8.8.8",
      "dnssearch": "",
      "gateway": "",
      "gateway6": "",
      "method": "dhcp",
      "method6": "manual",
      "mtu": 0,
      "netmask": "",
      "netmask6": 64,
      "slaves": "",
      "type": "ethernet",
      "uuid": "03876f86-e66c-48ab-9862-64faaa6b8d9d",
      "vlanid": 1,
      "vlanrawdevice": "",
      "wol": false,
      "wpapsk": "",
      "wpassid": ""
      }
      ]

      regards
      Michael
    • Account is unbanned.

      Could you please run salt-call --local --retcode-passthrough --no-color state.orchestrate omv.stage.setup and then omv-salt deploy run halt. The first command should fix the locale settings what seems to be the root of your problem.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • Hi,

      unfortunately the first command resulted in lots of errors

      Source Code

      1. root@omvnas:~# salt-call --local --retcode-passthrough --no-color state.orchestrate omv.stage.setup
      2. [ERROR ] An un-handled exception was caught by salt's global exception handler:
      3. UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)
      4. Traceback (most recent call last):
      5. File "/usr/lib/python3.7/encodings/idna.py", line 165, in encode
      6. raise UnicodeError("label empty or too long")
      7. UnicodeError: label empty or too long
      8. The above exception was the direct cause of the following exception:
      9. Traceback (most recent call last):
      10. File "/usr/bin/salt-call", line 11, in <module>
      11. salt_call()
      12. File "/usr/lib/python3/dist-packages/salt/scripts.py", line 431, in salt_call
      13. client.run()
      14. File "/usr/lib/python3/dist-packages/salt/cli/call.py", line 47, in run
      15. caller = salt.cli.caller.Caller.factory(self.config)
      16. File "/usr/lib/python3/dist-packages/salt/cli/caller.py", line 80, in factory
      17. return ZeroMQCaller(opts, **kwargs)
      18. File "/usr/lib/python3/dist-packages/salt/cli/caller.py", line 332, in __init__
      19. super(ZeroMQCaller, self).__init__(opts)
      20. File "/usr/lib/python3/dist-packages/salt/cli/caller.py", line 106, in __init__
      21. self.minion = salt.minion.SMinion(opts)
      22. File "/usr/lib/python3/dist-packages/salt/minion.py", line 842, in __init__
      23. opts['grains'] = salt.loader.grains(opts)
      24. File "/usr/lib/python3/dist-packages/salt/loader.py", line 784, in grains
      25. ret = funcs[key]()
      26. File "/usr/lib/python3/dist-packages/salt/grains/core.py", line 2259, in ip_fqdn
      27. info = socket.getaddrinfo(_fqdn, None, socket_type)
      28. File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
      29. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
      30. UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)
      31. Traceback (most recent call last):
      32. File "/usr/lib/python3.7/encodings/idna.py", line 165, in encode
      33. raise UnicodeError("label empty or too long")
      34. UnicodeError: label empty or too long
      35. The above exception was the direct cause of the following exception:
      36. Traceback (most recent call last):
      37. File "/usr/bin/salt-call", line 11, in <module>
      38. salt_call()
      39. File "/usr/lib/python3/dist-packages/salt/scripts.py", line 431, in salt_call
      40. client.run()
      41. File "/usr/lib/python3/dist-packages/salt/cli/call.py", line 47, in run
      42. caller = salt.cli.caller.Caller.factory(self.config)
      43. File "/usr/lib/python3/dist-packages/salt/cli/caller.py", line 80, in factory
      44. return ZeroMQCaller(opts, **kwargs)
      45. File "/usr/lib/python3/dist-packages/salt/cli/caller.py", line 332, in __init__
      46. super(ZeroMQCaller, self).__init__(opts)
      47. File "/usr/lib/python3/dist-packages/salt/cli/caller.py", line 106, in __init__
      48. self.minion = salt.minion.SMinion(opts)
      49. File "/usr/lib/python3/dist-packages/salt/minion.py", line 842, in __init__
      50. opts['grains'] = salt.loader.grains(opts)
      51. File "/usr/lib/python3/dist-packages/salt/loader.py", line 784, in grains
      52. ret = funcs[key]()
      53. File "/usr/lib/python3/dist-packages/salt/grains/core.py", line 2259, in ip_fqdn
      54. info = socket.getaddrinfo(_fqdn, None, socket_type)
      55. File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
      56. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
      57. UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)
      58. root@omvnas:~#
      Display All

      also the second command resulted in similar errors


      Source Code

      1. root@omvnas:~# omv-salt deploy run halt
      2. Traceback (most recent call last):
      3. File "/usr/lib/python3.7/encodings/idna.py", line 165, in encode
      4. raise UnicodeError("label empty or too long")
      5. UnicodeError: label empty or too long
      6. The above exception was the direct cause of the following exception:
      7. Traceback (most recent call last):
      8. File "/usr/sbin/omv-salt", line 136, in <module>
      9. sys.exit(main())
      10. File "/usr/sbin/omv-salt", line 132, in main
      11. cli()
      12. File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
      13. return self.main(*args, **kwargs)
      14. File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
      15. rv = self.invoke(ctx)
      16. File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
      17. return _process_result(sub_ctx.command.invoke(sub_ctx))
      18. File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
      19. return _process_result(sub_ctx.command.invoke(sub_ctx))
      20. File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
      21. return ctx.invoke(self.callback, **ctx.params)
      22. File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
      23. return callback(*args, **kwargs)
      24. File "/usr/sbin/omv-salt", line 120, in deploy_run
      25. caller = salt.client.Caller(mopts=mopts)
      26. File "/usr/lib/python3/dist-packages/salt/client/__init__.py", line 1995, in __init__
      27. self.sminion = salt.minion.SMinion(self.opts)
      28. File "/usr/lib/python3/dist-packages/salt/minion.py", line 842, in __init__
      29. opts['grains'] = salt.loader.grains(opts)
      30. File "/usr/lib/python3/dist-packages/salt/loader.py", line 784, in grains
      31. ret = funcs[key]()
      32. File "/usr/lib/python3/dist-packages/salt/grains/core.py", line 2259, in ip_fqdn
      33. info = socket.getaddrinfo(_fqdn, None, socket_type)
      34. File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
      35. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
      36. UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)
      37. root@omvnas:~#
      Display All
      Asrock J3160-ITX, 4GB RAM, 120GB SSD, 2x3TB Seagate Ironwolf as RAID1, Thermaltake Core1 Cube
    • Can you please post the output of hostname --fqdn. What platform are you using? ARM, x64, ...?
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • platform is
      Asrock J3160-ITX
      with an
      Intel® Quad-Core Processor J3160

      here the output



      Quellcode
      [*]root@omvnas:~# uname -a
      [*]Linux omvnas.local 5.4.0-0.bpo.2-amd64 #1 SMP Debian 5.4.8-1~bpo10+1 (2020-01-07) x86_64 GNU/Linux
      [*]root@omvnas:~# hostname --fqdn
      [*]omvnas.local
      [*]root@omvnas:~#
      [/list]
      Asrock J3160-ITX, 4GB RAM, 120GB SSD, 2x3TB Seagate Ironwolf as RAID1, Thermaltake Core1 Cube
    • I'm out of ideas. According to various bugreports found via Google this seems to be a Python socket bug which can't be fixed by OMV (not even with a workaround).
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • Can you please post the output of salt-call grains.items?
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • New

      short update:
      after re-install of OMV5 everything seems to work fine!
      Did a lot of configurations, set-up OMV-extras, various docker containers, rsync jobs, etc.
      No issues so far
      I think there was a Python update just recently - maybe that did the trick...

      very pleased until now :)

      thanks for your help

      Cheers
      Michael
      Asrock J3160-ITX, 4GB RAM, 120GB SSD, 2x3TB Seagate Ironwolf as RAID1, Thermaltake Core1 Cube