python exception socket.error: [Errno 128] Network is unreachable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎08-14-2016 03:20 AM
Colleagues, hello.
There was a need of sending mail on an event from the switch.
I was will find here such absolutely remarkable script of https://github.com/extremenetworks/ExtremeScripting/blob/master/EXOS/Python/Email_event/email.py
Everything is good only if to launch through cli: run script email.py I receive socket.error: [Errno 128] of Network is unreachable if through UPM Profile just silence, it is natural that the email server from the switch is available, as far as I understand problem in vr vr-default, but as to launch it having specified vr vr-default it isn't told anywhere. Prompt please how to resolve an issue with it python exception.
There was a need of sending mail on an event from the switch.
I was will find here such absolutely remarkable script of https://github.com/extremenetworks/ExtremeScripting/blob/master/EXOS/Python/Email_event/email.py
Everything is good only if to launch through cli: run script email.py I receive socket.error: [Errno 128] of Network is unreachable if through UPM Profile just silence, it is natural that the email server from the switch is available, as far as I understand problem in vr vr-default, but as to launch it having specified vr vr-default it isn't told anywhere. Prompt please how to resolve an issue with it python exception.
7 REPLIES 7
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎03-31-2017 11:33 AM
When you say that you needed to change the VR are you referring to editing the /proc/self/ns_id file? I see (from the python doc) that it needs to be changed. Question is does it need to be changed every time the script is ran or is the initial change permanent?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎03-31-2017 11:33 AM
The self part of /proc/self/ns_id shows that this pseudo-file pertains to the currently running process itself.
The proc part hints that this is per-process, but Linux has not been consistent with this and lots of non-process-specific stuff landed in procfs (usually mounted under /proc), before adding sysfs (usually mounted under /sys) for new system wide information and settings. But /proc/self relates to the current process only.
So this file is new for every process and by default set to use VR-Mgmt and therefore needs to be changed every time the script is run.
The proc part hints that this is per-process, but Linux has not been consistent with this and lots of non-process-specific stuff landed in procfs (usually mounted under /proc), before adding sysfs (usually mounted under /sys) for new system wide information and settings. But /proc/self relates to the current process only.
So this file is new for every process and by default set to use VR-Mgmt and therefore needs to be changed every time the script is run.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎03-31-2017 11:33 AM
Yes, this needs to be modified every time you want to access something via VR-Mgmt.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎08-15-2016 05:50 AM
Many thanks ! Now everything works perfectly.
