Giter VIP home page Giter VIP logo

Comments (6)

Pack3tL0ss avatar Pack3tL0ss commented on June 19, 2024

I updated one of my ConsolePis and was able to duplicate this. If you start/restart the service sudo systemctl start consolepi-mdnsreg then check syslog... tail -50 /var/log/syslog that will tell me if it's the same issue I found. It looks like something changed in the zeroconf library I'm using. It's throwing a different exception when it attempts to size the local data advertised.

zerconf 0.36.7 has the issue, 0.27.1 does not., not sure when the breaking change occurred, If it's caused by the same thing you'll see a log ValueError: bytes must be in range(0, 256) I just updated that logic to accommodate the change in zeroconf. Will push the change shortly, after a bit of testing.

from consolepi.

Pack3tL0ss avatar Pack3tL0ss commented on June 19, 2024

I pushed a fix for the change in zeroconf in #135. If you could either update and test or verify the log to validate it's the same issue. I'll keep this open for a bit in the off chance it's something else.

from consolepi.

deknevel avatar deknevel commented on June 19, 2024

Hi,
thanks for your reply and the fix.
Yes I have the same issue:

Sep 24 08:53:10 con-b14-fw01 python3[1372]: ValueError: bytes must be in range(0, 256)`

Then I tried a update via the dev branch

wget -q https://raw.githubusercontent.com/Pack3tL0ss/ConsolePi/dev/installer/install.sh -O /tmp/ConsolePi && sudo bash >/tmp/ConsolePi && sudo rm -f /tmp/ConsolePi

Sep 24 08:52:38 con-b14-fw01 systemd[1]: consolepi-mdnsreg.service: Main process exited, code=exited, status=1/FAILURE
Sep 24 08:52:38 con-b14-fw01 systemd[1]: consolepi-mdnsreg.service: Failed with result 'exit-code'.
Sep 24 08:53:08 con-b14-fw01 systemd[1]: consolepi-mdnsreg.service: Service RestartSec=30s expired, scheduling restart.
Sep 24 08:53:08 con-b14-fw01 systemd[1]: consolepi-mdnsreg.service: Scheduled restart job, restart counter is at 4.
Sep 24 08:53:08 con-b14-fw01 systemd[1]: Stopped Advertise ConsolePi and local serial information via mdns.
Sep 24 08:53:08 con-b14-fw01 systemd[1]: Started Advertise ConsolePi and local serial information via mdns.
Sep 24 08:53:10 con-b14-fw01 python3[1372]: Traceback (most recent call last):
Sep 24 08:53:10 con-b14-fw01 python3[1372]: File "/etc/ConsolePi/src/mdns_register.py", line 116, in try_build_info
Sep 24 08:53:10 con-b14-fw01 python3[1372]: info = self.build_info()
Sep 24 08:53:10 con-b14-fw01 python3[1372]: File "/etc/ConsolePi/src/mdns_register.py", line 62, in build_info
Sep 24 08:53:10 con-b14-fw01 python3[1372]: server=f'{local.hostname}.local.'
Sep 24 08:53:10 con-b14-fw01 python3[1372]: File "/etc/ConsolePi/venv/lib/python3.7/site->packages/zeroconf/_services/info.py", line 149, in init
Sep 24 08:53:10 con-b14-fw01 python3[1372]: self._set_properties(properties)
Sep 24 08:53:10 con-b14-fw01 python3[1372]: File "/etc/ConsolePi/venv/lib/python3.7/site->packages/zeroconf/_services/info.py", line 241, in _set_properties
Sep 24 08:53:10 con-b14-fw01 python3[1372]: result = b''.join((result, bytes((len(item),)), item))
Sep 24 08:53:10 con-b14-fw01 python3[1372]: ValueError: bytes must be in range(0, 256)
Sep 24 08:53:10 con-b14-fw01 python3[1372]: During handling of the above exception, another exception occurred:
Sep 24 08:53:10 con-b14-fw01 python3[1372]: Traceback (most recent call last):
Sep 24 08:53:10 con-b14-fw01 python3[1372]: File "/etc/ConsolePi/src/mdns_register.py", line 186, in
Sep 24 08:53:10 con-b14-fw01 python3[1372]: mdnsreg.run()
Sep 24 08:53:10 con-b14-fw01 python3[1372]: File "/etc/ConsolePi/src/mdns_register.py", line 164, in run
Sep 24 08:53:10 con-b14-fw01 python3[1372]: info = self.try_build_info()
Sep 24 08:53:10 con-b14-fw01 python3[1372]: File "/etc/ConsolePi/src/mdns_register.py", line 118, in try_build_info
Sep 24 08:53:10 con-b14-fw01 python3[1372]: log.debug('[MDNS REG] data is too big for mdns, removing adapter data \n >{} {}'.format(e.class.name, e))
Sep 24 08:53:10 con-b14-fw01 python3[1372]: NameError: name 'e' is not defined
Sep 24 08:53:10 con-b14-fw01 python3[1372]: #15#015
Sep 24 08:53:10 con-b14-fw01 systemd[1]: consolepi-mdnsreg.service: Main process exited, code=exited, status=1/FAILURE

So in my case it is not working. Or I done something wrong with the update.
Will try to install a fresh system.

from consolepi.

deknevel avatar deknevel commented on June 19, 2024

Ok same problem with a fresh install

from consolepi.

Pack3tL0ss avatar Pack3tL0ss commented on June 19, 2024

my bad. Tested on different system copy/paste goof on dev system b4 the commit. commit #137 should sort it out.

consolepi-upgrade should sort it out

from consolepi.

deknevel avatar deknevel commented on June 19, 2024

Hi,
works perfect....
Many thanks for your help!

from consolepi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.