enigma2 icon indicating copy to clipboard operation
enigma2 copied to clipboard

Restart network - mac address crash

Open kiddac opened this issue 1 year ago • 17 comments

setup > network > Device settings > Restart Network. Then click Network MAC settings and you will get the following crash

20:38:15.8200 [ActionMap] Map screen 'AdapterSetupConfiguration' context 'OkCancelActions' -> Action 'ok'. 20:38:15.8220 [About] getIfConfig Ex: [Errno 99] Cannot assign requested address 20:38:15.8224 Traceback (most recent call last): 20:38:15.8226 File "/usr/lib/enigma2/python/Components/ActionMap.py", line 278, in action 20:38:15.8230 File "/usr/lib/enigma2/python/Screens/NetworkSetup.py", line 896, in ok 20:38:15.8233 File "/usr/lib/enigma2/python/StartEnigma.py", line 176, in open 20:38:15.8241 dialog = self.current_dialog = self.instantiateDialog(screen, *arguments, **kwargs) 20:38:15.8248 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 20:38:15.8249 File "/usr/lib/enigma2/python/StartEnigma.py", line 109, in instantiateDialog 20:38:15.8254 return self.doInstantiateDialog(screen, arguments, kwargs, self.desktop) 20:38:15.8260 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 20:38:15.8261 File "/usr/lib/enigma2/python/StartEnigma.py", line 131, in doInstantiateDialog 20:38:15.8266 dialog = screen(self, *arguments, **kwargs) # Create dialog. 20:38:15.8270 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 20:38:15.8270 File "/usr/lib/enigma2/python/Screens/NetworkSetup.py", line 389, in init 20:38:15.8274 File "/usr/lib/enigma2/python/Screens/NetworkSetup.py", line 406, in getmac 20:38:15.8278 KeyError: 'hwaddr' 20:38:15.8278 [ePyObject] (PyObject_CallObject(<bound method ActionMap.action of <Components.ActionMap.HelpableActionMap object at 0xac539df8>>,('OkCancelActions', 'ok')) failed)

kiddac avatar Aug 25 '24 19:08 kiddac

network.log

2024-08-25 20:38:27: Found eth0 with DHCP configuration. 2024-08-25 20:38:27: 0:No valid IP addresses obtained for eth0 after waiting. Retrying... 2024-08-25 20:38:27: 1:No valid IP addresses obtained for eth0 after waiting. Retrying... 2024-08-25 20:38:28: 2:No valid IP addresses obtained for eth0 after waiting. Retrying... 2024-08-25 20:38:28: 3:No valid IP addresses obtained for eth0 after waiting. Retrying... 2024-08-25 20:38:29: 4:No valid IP addresses obtained for eth0 after waiting. Retrying... 2024-08-25 20:38:29: 5:No valid IP addresses obtained for eth0 after waiting. Retrying... 2024-08-25 20:38:30: 6:No valid IP addresses obtained for eth0 after waiting. Retrying... 2024-08-25 20:38:30: 7:No valid IP addresses obtained for eth0 after waiting. Retrying... 2024-08-25 20:38:31: 8:No valid IP addresses obtained for eth0 after waiting. Retrying... 2024-08-25 20:38:31: 9:No valid IP addresses obtained for eth0 after waiting. Retrying... 2024-08-25 20:38:32: Maximum attempts reached. No valid IP addresses obtained for eth0. Exiting...

kiddac avatar Aug 25 '24 19:08 kiddac

It seams that restart network is not working.

jbleyel avatar Aug 25 '24 19:08 jbleyel

I do not get crash but network link is lost after trying to restart network

urie57 avatar Aug 25 '24 21:08 urie57

I have been assigned to investigate this issue. I am unable to reproduce the issue so can I please have more information. In my case I am using a wired network using DHCP to get all the network parameters.

Can anyone with the issue please give me more information so that I can reproduce the problem.

IanSav avatar Aug 26 '24 06:08 IanSav

I don't seem to have any problems with restarting the network.I select restarting the network the network restarts.There is no link. The network test passes without errors.The link appears but the channel must be restarted for the image to appear.Also wired connection with DHCP.

68foxboris avatar Aug 26 '24 07:08 68foxboris

I have been assigned to investigate this issue. I am unable to reproduce the issue so can I please have more information. In my case I am using a wired network using DHCP to get all the network parameters.

Can anyone with the issue please give me more information so that I can reproduce the problem.

I had Use DHCP set to no since I had device ipaddress assinged on router, I have since set Use DHCP to yes and now I do not lose network connection when I restart network.

I have noticed that if I have wireguard plugin connected and I Reset network connection via network settings i do lose connection but if i restart network via wireguard plugin i do not lose connection.

urie57 avatar Aug 26 '24 08:08 urie57

Hard coding IP addresses within clients that are not reserved on the DHCP server can be very problematic. I always recommend that users assign a single IP address to match the MAC address of their receiver within their router/DHCP server that is always allocated to the one device. That receiver device should always be configured to get its IP address (and other network data) from that router/DHCP server.

IanSav avatar Aug 26 '24 08:08 IanSav

Hard coding IP addresses within clients that are not reserved on the DHCP server can be very problematic. I always recommend that users assign a single IP address to match the MAC address of their receiver within their router/DHCP server that is always allocated to the one device. That receiver device should always be configured to get its IP address (and other network data) from that router/DHCP server.

I have needed to set use DHCP back to no again in network settings, when i rebooted stb no internet connection. And yes I alway manually assing ipaddress on reciever to match one reserved in router. So im now back to my normal settings,

urie57 avatar Aug 26 '24 09:08 urie57

I don't seem to have any problems with restarting the network.I select restarting the network the network restarts.There is no link. The network test passes without errors.The link appears but the channel must be restarted for the image to appear.Also wired connection with DHCP.

The channel will only not continue if it is StreamRelay or IPTV. That's by design.

jbleyel avatar Aug 26 '24 10:08 jbleyel

I don't seem to have any problems with restarting the network.I select restarting the network the network restarts.There is no link. The network test passes without errors.The link appears but the channel must be restarted for the image to appear.Also wired connection with DHCP.

The channel will only not continue if it is StreamRelay or IPTV. That's by design.

by link I am talking about green indicator in network settings nothing to do with iptv stream relay or what ever Capture

urie57 avatar Aug 26 '24 20:08 urie57

The Network code will be refactored because it's not 100% stable.

jbleyel avatar Aug 26 '24 20:08 jbleyel

There is another issue about restart network.

https://github.com/openatv/enigma2/issues/2468

jbleyel avatar Aug 27 '24 19:08 jbleyel

I posted a reply on this. Was it deleted. Or did it not post.

Summarising again. VU Zero 4k - wired connection.

Use interface: Yes IEnable IPV6: No Use DHCP: YES DNS: Cloudflare

Crash happens if you click Network MAC Settings, after restart Network message.

kiddac avatar Aug 27 '24 20:08 kiddac

Please test: /usr/lib/enigma2/python/Components About.zip

Restart Gui

https://github.com/m4dhouse/OpenAtv-enigma2/commit/09281d4df5dbe7c2b83ea69d1001dbcd91f18f72

m4dhouse avatar Sep 08 '24 00:09 m4dhouse

Please test: /usr/lib/enigma2/python/Components About.zip

Restart Gui

m4dhouse@09281d4

Test without new About.pyc file on openatv 7.4 build 5th Sept 2024

ok wireguard connected i go to network settings and green light on link

I do network test everything is ok

I then do restart network in network settings link has turned to red

I do network test again I have lost internet IP address unconfirmed and nameserver unconfirmed

need to reboot reciever to get network and internet connection again.

Now testing with wireguard not connected Network device settings green light on link

And now done Restart network link light has turned to red

now I try network test again everything is ok

but if i do network restart via wireguard even with wireguard not connected green light on link is there.

Now test with new About.pyc file. same test but almost same results,

but if i restart network a few times eventually it does start but link still red but found out if i exit network settings and go back in link lght is green

urie57 avatar Sep 08 '24 20:09 urie57

@urie57 I only fixed the crash on mac address, Network code needs to be fixed.

m4dhouse avatar Sep 09 '24 06:09 m4dhouse

@urie57 I only fixed the crash on mac address, Network code needs to be fixed.

my mistake sorry.

urie57 avatar Sep 09 '24 20:09 urie57

Is someone fixing it?

Is it possible that I can't access my Vuplus when using wireguard connection (server on ubiquiti unifi gateway) because of this bug? I have no problems accessing vuplus on lan, but through VPN. All other lan devices are accessible though VPN without any problems.

majewskikarol avatar Nov 17 '24 13:11 majewskikarol

Is someone fixing it?

Is it possible that I can't access my Vuplus when using wireguard connection (server on ubiquiti unifi gateway) because of this bug? I have no problems accessing vuplus on lan, but through VPN. All other lan devices are accessible though VPN without any problems.

Any type of configuration I have no problem accessing my boxes with WireGuard, can you post your .conf file deleting the private key first?

m4dhouse avatar Nov 17 '24 14:11 m4dhouse

Not only MAC address crash. If you set up WiFi and want to change Nameserver/DNS data source.

[ActionMap] Map screen 'NameserverSetup' context 'NavigationActions' -> Action 'down'. [eRCDeviceInputDev] 0 6c 1 [InfoBarGenerics] Key 'KEY_DOWN' (0x6C - 108) Break. [eFilePushThread] wait for driver eof ok [eFilePushThread] reached EOF, but we are in stream mode. delaying 1 second. [eDVBChannel] End of file! [eRCDeviceInputDev] 1 69 1 [InfoBarGenerics] Key 'KEY_LEFT' (0x69 - 105) Make. [ActionMap] Map screen 'NameserverSetup' context 'NavigationActions' -> Action 'left'. [Setup] XML cached setup file '/usr/share/enigma2/setup.xml', using element 'DNS'. Traceback (most recent call last): File "/usr/lib/enigma2/python/Components/ActionMap.py", line 279, in action File "/usr/lib/enigma2/python/Components/ConfigList.py", line 419, in keyLeft File "/usr/lib/enigma2/python/Components/ConfigList.py", line 78, in handleKey File "/usr/lib/enigma2/python/Components/config.py", line 853, in handleKey File "/usr/lib/enigma2/python/Screens/NetworkSetup.py", line 302, in changedEntry File "/usr/lib/enigma2/python/Screens/Setup.py", line 84, in changedEntry File "/usr/lib/enigma2/python/Screens/NetworkSetup.py", line 288, in createSetup UnboundLocalError: cannot access local variable 'item' where it is not associated with a value [ePyObject] (PyObject_CallObject(<bound method ActionMap.action of <Components.ActionMap.HelpableActionMap object at 0xadf52500>>,('NavigationActions', 'left')) failed)

pololoko111 avatar May 24 '25 14:05 pololoko111