Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Desktop (beta) on a missing network interface leads to stacktrace on all wrapper commands #183

Closed
Skileau opened this issue Sep 25, 2023 · 4 comments · Fixed by #184
Assignees
Labels
bug Something isn't working

Comments

@Skileau
Copy link

Skileau commented Sep 25, 2023

Describe the bug

When a container exists with desktop listening on a network interface which does not exist anymore (ie: VPN tun0 interface), most of exegol commands leads to a stacktrace.

Steps To Reproduce

1 - Connect to a VPN
2 - Create a container with --desktop-config http:<VPN-interface-IP>:port
3 - Stop the container
4 - Disconnect from the VPN
5 - Use exegol info

Exegol Wrapper Version

[D] Loading git at /opt/tools/Exegol                                                          
[D] Repo path: /opt/tools/Exegol/.git                                                         
[D] Git repository successfully loaded                                                        
[*] Exegol is currently in version v4.3.0b1 [35bc0d7f]
[*] Exegol Discord serv.: https://discord.gg/cXThyp7D6P
[*] Exegol documentation: https://exegol.rtfd.io/
[+] We thank Capgemini for supporting the project (helping with dev) 🙏                       
[+] We thank HackTheBox for sponsoring the multi-arch support 💚                              

[!] You are currently using a Beta version of Exegol, which may be unstable.                  
[D] Pip installation: Off 🪓                                                                  
[D] Git source installation: On ✔                                                             
[D] Host OS: Linux (Kernel)                                                                   
[D] Arch: amd64                                                                               
[D] Raw arch: x86_64                                                                          
[D] Docker desktop: Off 🪓                                                                    
[D] Shell type: Linux                                                                         
[D] Last wrapper update check: 2023-09-16 00:00:00

Host OS

Linux

Configuration of the concerned container

[*] Exegol is currently in version v4.3.0b1 [35bc0d7f]
[*] Exegol Discord serv.: https://discord.gg/cXThyp7D6P
[*] Exegol documentation: https://exegol.rtfd.io/
[+] We thank Capgemini for supporting the project (helping with dev) 🙏                       
[+] We thank HackTheBox for sponsoring the multi-arch support 💚                              

[!] You are currently using a Beta version of Exegol, which may be unstable.                  
[V] Listing user configurations                                                               

🧠 User configurations                                  
┌──────────────────────────────────────────────────────┐
│ User config file: /home/skilo/.exegol/config.yml     │
│ Private workspace: /home/skilo/.exegol/workspaces    │
│ Exegol resources: /opt/tools/Exegol/exegol-resources │
│ My resources: /home/skilo/.exegol/my-resources       │
│ Auto-check updates: On ✔                             │
│ Auto-remove images: On ✔                             │
│ Auto-update fs: Off 🪓                               │
│ Default start shell: zsh                             │
│ Shell logging method: asciinema                      │
│ Shell logging compression: On ✔                      │
│ Desktop enabled by default: Off 🪓                   │
│ Desktop default protocol: http                       │
│ Desktop default host: localhost                      │
└──────────────────────────────────────────────────────┘


⭐ Container summary                                                                          
┌──────────────────┬─────────────────────────────────────────────────────────────────────────┐
│                  │ prolab_zephyr_desktop                                                   │
│             Name │ nightly - v.26836784 (Update available (v.26836784 ➡ v.e5bc0af8))       │
│            Image │ (amd64)                                                                 │
├──────────────────┼─────────────────────────────────────────────────────────────────────────┤
│      Credentials │ root :                                                                  │
│          Desktop │ http://10.8.0.2:54047                                                   │
│    Creation date │ 22/09/2023 17:00                                                        │
│              X11 │ On ✔                                                                    │
│          Network │ host                                                                    │
│         Timezone │ On ✔                                                                    │
│ Exegol resources │ On ✔ (/opt/resources)                                                   │
│     My resources │ On ✔ (/opt/my-resources)                                                │
│    Shell logging │ Off 🪓                                                                  │
│       Privileged │ Off ✔                                                                   │
│        Workspace │ /home/skilo/htb/pro_labs/zephyr (/workspace)                            │
│             Envs │ DISPLAY=:0                                                              │
│                  │ _JAVA_AWT_WM_NONREPARENTING=1                                           │
│                  │ QT_X11_NO_MITSHM=1                                                      │
│                  │ DESKTOP_PROTO=http                                                      │
│                  │ DESKTOP_HOST=10.8.0.2                                                   │
│                  │ DESKTOP_PORT=54047                                                      │
│                  │ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin       │
│          Volumes │ (RW) /opt/tools/Exegol/exegol-resources ➡ /opt/resources                │
│                  │ (RW) /tmp/.X11-unix ➡ /tmp/.X11-unix                                    │
│                  │ (RW) /home/skilo/htb/pro_labs/zephyr ➡ /workspace                       │
│                  │ (RO) /opt/tools/Exegol/exegol/utils/imgsync/spawn.sh ➡                  │
│                  │ /.exegol/spawn.sh                                                       │
│                  │ (RO) /etc/localtime ➡ /etc/localtime                                    │
│                  │ (RO) /etc/timezone ➡ /etc/timezone                                      │
│                  │ (RW) /home/skilo/.exegol/my-resources ➡ /opt/my-resources               │
└──────────────────┴─────────────────────────────────────────────────────────────────────────┘

Execution logs in debug mode

[D] Loading git at /opt/tools/Exegol                                                          
[D] Repo path: /opt/tools/Exegol/.git                                                         
[D] Git repository successfully loaded                                                        
[*] Exegol is currently in version v4.3.0b1 [35bc0d7f]
[*] Exegol Discord serv.: https://discord.gg/cXThyp7D6P
[*] Exegol documentation: https://exegol.rtfd.io/
[+] We thank Capgemini for supporting the project (helping with dev) 🙏                       
[+] We thank HackTheBox for sponsoring the multi-arch support 💚                              

[!] You are currently using a Beta version of Exegol, which may be unstable.                  
[D] Pip installation: Off 🪓                                                                  
[D] Git source installation: On ✔                                                             
[D] Host OS: Linux (Kernel)                                                                   
[D] Arch: amd64                                                                               
[D] Raw arch: x86_64                                                                          
[D] Docker desktop: Off 🪓                                                                    
[D] Shell type: Linux                                                                         
[D] Last wrapper update check: 2023-09-16 00:00:00                                            

[V] Listing user configurations                                                               

🧠 User configurations                                  
┌──────────────────────────────────────────────────────┐
│ User config file: /home/skilo/.exegol/config.yml     │
│ Private workspace: /home/skilo/.exegol/workspaces    │
│ Exegol resources: /opt/tools/Exegol/exegol-resources │
│ My resources: /home/skilo/.exegol/my-resources       │
│ Auto-check updates: On ✔                             │
│ Auto-remove images: On ✔                             │
│ Auto-update fs: Off 🪓                               │
│ Default start shell: zsh                             │
│ Shell logging method: asciinema                      │
│ Shell logging compression: On ✔                      │
│ Desktop enabled by default: Off 🪓                   │
│ Desktop default protocol: http                       │
│ Desktop default host: localhost                      │
└──────────────────────────────────────────────────────┘

[V] Listing git repositories                                                                  
[D] Loading git at /opt/tools/Exegol                                                          
[D] Repo path: /opt/tools/Exegol/.git                                                         
[D] Git repository successfully loaded                                                        
[V] Git wrapper init submodules                                                               
[D] Git submodule repository detected                                                         
[D] Loading git at /opt/tools/Exegol/exegol-docker-build                                      
[D] Repo path: /opt/tools/Exegol/.git/modules/sources                                         
[D] Git repository successfully loaded                                                        
[D] Git submodule repository detected                                                         
[D] Loading git at /opt/tools/Exegol/exegol-resources                                         
[D] Repo path: /opt/tools/Exegol/.git/modules/exegol-resources                                
[D] Git repository successfully loaded                                                        
[D] Fetch flags : 4                                                                           
[D] Fetch note :                                                                              
[D] Fetch old commit : None                                                                   
[D] Fetch remote path : dev                                                                   
[D] HEAD UP TO DATE flag detected                                                             
[D] Fetch flags : 4                                                                           
[D] Fetch note :                                                                              
[D] Fetch old commit : None                                                                   
[D] Fetch remote path : dev                                                                   
[D] HEAD UP TO DATE flag detected                                                             
[D] Fetch flags : 4                                                                           
[D] Fetch note :                                                                              
[D] Fetch old commit : None                                                                   
[D] Fetch remote path : main                                                                  
[D] HEAD UP TO DATE flag detected                                                             

🐙 Project modules                               
┌───────────┬──────────────────┬────────────────┐
│ Name      │ Status           │ Current branch │
├───────────┼──────────────────┼────────────────┤
│ Wrapper   │ Up to date       │ dev            │
│ Images    │ Update available │ dev            │
│ Resources │ Up to date       │ main           │
└───────────┴──────────────────┴────────────────┘

[D] Fetching remote image tags, digests and sizes                                             
[D] Fetching information from:                                                                
https://hub.docker.com/v2/repositories/nwodtuhs/exegol/tags?page_size=20                      
[D] Fetching information from:                                                                
https://hub.docker.com/v2/repositories/nwodtuhs/exegol/tags?page=2&page_size=20               
[D] Max page limit reached. In non-verbose mode, downloads will stop there.                   
[D] Fetching information from:                                                                
https://hub.docker.com/v2/repositories/nwodtuhs/exegol/tags?page=3&page_size=20               
[D] Fetching local image tags, digests (and other attributes)                                 
[D] Comparing and merging local and remote images data                                        
[D] Searching a match for each image installed                                                
[D] └── nightly → (remote)                                                                    
sha256:2993b0d15ef037f442aca087af8440635307ace737944ae48aac9f62ac4a18cb                       
[D] └── web-local       → (local) N/A                                                         
[D] └── web     → (remote)                                                                    
sha256:9108e175ebcd946d142de06f7ef8c7f8e9baaa996c83bf03c72b804239d925ba                       
[D] └── osint   → (remote)                                                                    
sha256:4365185cd4082cac6bd05d97eab0c230ba1d2516b8c98e95e1b87e1eb125e3a3                       
[D] └── light   → (remote)                                                                    
sha256:19a6748bfafb103cdfc51cb4a33ae931d4ffc81b8824399d20e1f9802ef744f8                       
[D] └── full    → (remote)                                                                    
sha256:3d40ce1506e100b53cf27a653b1cad8ec7bfc1ceefeaa9a7f84e422942afeff3                       
[D] └── full    → (remote)                                                                    
sha256:3d40ce1506e100b53cf27a653b1cad8ec7bfc1ceefeaa9a7f84e422942afeff3                       
[D] └── ad      → (remote)                                                                    
sha256:6e7f9fbc6ec5d3609b5c9e3dfbad4584e68196a82978201509be7830a85d6357                       
[D] └── ad      → (remote)                                                                    
sha256:6e7f9fbc6ec5d3609b5c9e3dfbad4584e68196a82978201509be7830a85d6357                       
[D] └── web-3.1.0       → (remote)                                                            
sha256:ca359990a79416693b00fac13cfc2f22a1e84e28106f982aa16a91bd84e5d3f2                       
[D] └── web-3.1.0       → (remote)                                                            
sha256:ca359990a79416693b00fac13cfc2f22a1e84e28106f982aa16a91bd84e5d3f2                       
[D] └── osint-3.1.0     → (remote)                                                            
sha256:335acb243b310c66ca011665d4e7462a427686eef217ac8dc9a2be45cea4eaea                       
[D] └── light-3.1.0     → (remote)                                                            
sha256:96c388d0d36695d71b0665dc9f966b438a562c72cba9c6f9fc97c97b6073017f                       
[D] └── light-3.1.0     → (remote)                                                            
sha256:96c388d0d36695d71b0665dc9f966b438a562c72cba9c6f9fc97c97b6073017f                       
[D] └── ad-3.1.0        → (remote)                                                            
sha256:2c9ced02cf893114557b17577a34c14b7030c5715d174b8e8ac2a2500da29d58                       
[D] └── full-3.1.0      → (remote)                                                            
sha256:b4c29bf24ec7d6055eaef632dbc8915d403f4b349da14599b9282e6f1ec6f695                       
[D] └── full-3.1.0      → (remote)                                                            
sha256:b4c29bf24ec7d6055eaef632dbc8915d403f4b349da14599b9282e6f1ec6f695                       
[D] └── web-3.0.2       → (remote)                                                            
sha256:2d48210c019f5b4014c8121c908bb832a0a41e78ab9dc70d396c84197619e5c8                       
[D] └── osint-3.0.2     → (remote)                                                            
sha256:69dd1008f8c80d2ab0310b1fd21c7aa5afdc58a349166e809805e2a38c8e5e22                       
[D] └── full-3.0.2      → (remote)                                                            
sha256:2c2257cb94a8047cd03c59c512c295b89101e5982105e982c406ed850deef7d9                       
[D] └── full-3.0.2      → (remote)                                                            
sha256:2c2257cb94a8047cd03c59c512c295b89101e5982105e982c406ed850deef7d9                       
[D] └── light-3.0.2     → (remote)                                                            
sha256:28b31faa4a4edf5a66fb21303a86e290d7178fb57a905ef135b933cfddf7e987                       
[D] └── light-3.0.2     → (remote)                                                            
sha256:28b31faa4a4edf5a66fb21303a86e290d7178fb57a905ef135b933cfddf7e987                       
[D] └── ad-3.0.2        → (remote)                                                            
sha256:3c72c440a5e087e1f90fdadd259ac6f01b8a8f0813510405ee5b2eb6830d85cd                       
[D] └── web-3.0.1       → (remote)                                                            
sha256:901640f976728b005c1291fc791db173583be4ce77e06c656fcc9ca1d90b9f78                       
[D] └── osint-3.0.1     → (remote)                                                            
sha256:6792268d4ffd890010482584becd8b04666025b71766b0fea76ed355d6b14c4c                       
[D] └── light-3.0.1     → (remote)                                                            
sha256:7f4cf4a55f34cc2419b57c8b4286be4e5a053316ecce2e23cce5f17a38590571                       
[D] └── light-3.0.1     → (remote)                                                            
sha256:7f4cf4a55f34cc2419b57c8b4286be4e5a053316ecce2e23cce5f17a38590571                       
[D] └── full-3.0.1      → (remote)                                                            
sha256:b595b71adbf4f0edc32a388f87771de377d82e059e0f9459fb62b49eb938b5cd                       
[D] └── full-3.0.1      → (remote)                                                            
sha256:b595b71adbf4f0edc32a388f87771de377d82e059e0f9459fb62b49eb938b5cd                       
[D] └── ad-3.0.1        → (remote)                                                            
sha256:4fc6a3d2d28929f13fb74ff4e9258f51daa8986a0603aaa37ad109bacc7f9381                       
[D] └── light-3.0.0     → (remote)                                                            
sha256:2fe0e78dcf1924785bffeb20b52ecde82609f9c91c0fad883bb293dd65d7443d                       
[D] └── osint-3.0.0     → (remote)                                                            
sha256:13b3d0f9d9946b0105c997260f84a5b3ea0e35d1b1da974a033def9375c109ea                       
[D] └── web-3.0.0       → (remote)                                                            
sha256:fe361319498cdbf0c62688fc675902a54dc12ceff164ef193789d67d1140d970                       
[D] └── web-3.0.0       → (remote)                                                            
sha256:fe361319498cdbf0c62688fc675902a54dc12ceff164ef193789d67d1140d970                       
[D] └── ad-3.0.0        → (remote)                                                            
sha256:a174289246c5ce40227a52caf4d82faf81420c915791caad6bbf85c7d02cd5c9                       
[D] └── full-3.0.0      → (remote)                                                            
sha256:6751cd3bf83461623a9bfab29c36edfef8b5d4e9b80c11015cf53a0061099dce                       
[D] └── full-3.0.0      → (remote)                                                            
sha256:6751cd3bf83461623a9bfab29c36edfef8b5d4e9b80c11015cf53a0061099dce                       
[D] └── full-2.1.1      → (remote)                                                            
sha256:c19d64e74f346999991a82a740acb392bf0da6c2fbb680c2403250f2bba31cfc                       
[D] └── ad-2.1.1        → (remote)                                                            
sha256:b2b9a7642cd765daae0e0e517544cb4f5b0b77f8149f19165479fceb92f14f84                       
[D] └── web-2.1.1       → (remote)                                                            
sha256:6ce49800b576f2f97d665e63ab0cb4fb946cf3d575b5918887e93887afe3c2d8                       
[D] └── light-2.1.1     → (remote)                                                            
sha256:c048d0ebe19613e01e65d27013c5174fb41cccbe2fd9f8cde9cbb2a56b919371                       
[D] └── osint-2.1.1     → (remote)                                                            
sha256:ffe3c2d9693b0b52d11d9104dd2a33f2cf2037b412249db340d59d7ee01497fa                       
[D] └── full-2.1.0      → (remote)                                                            
sha256:2462e5169f04b72123ab28d34ae7b326d40240097bcebe65bc968ade06c36a9c                       
[D] └── ad-2.1.0        → (remote)                                                            
sha256:eda497aebe8e35d685be9057793606c297548519dd16526b302d50a8f959179d                       
[D] └── web-2.1.0       → (remote)                                                            
sha256:4520239532ce14afdfb87e4fcd9633096b90a3e8a28d8b02044e628c53cfb17f                       
[D] └── light-2.1.0     → (remote)                                                            
sha256:ffa088736d8a3e2bab9cf3e3ae2b816d779e2a6a984ed41012ef989e3524e8b3                       
[D] └── osint-2.1.0     → (remote)                                                            
sha256:f706f54024324899836f7568aeda8608dacd93a98d7114cd5f5b3fd093beba08                       
[D] └── full-2.0.2      → (remote) N/A                                                        
[D] └── light-2.0.2     → (remote) N/A                                                        
[D] └── ad-2.0.2        → (remote) N/A                                                        
[D] └── web-2.0.2       → (remote) N/A                                                        
[D] └── osint-2.0.2     → (remote) N/A                                                        
[D] └── full-2.0.1      → (remote) N/A                                                        
[D] └── ad-2.0.1        → (remote) N/A                                                        
[D] └── web-2.0.1       → (remote) N/A                                                        
[D] └── light-2.0.1     → (remote) N/A                                                        
[D] └── osint-2.0.1     → (remote) N/A                                                        
[D] └── web-2.0.0       → (remote) N/A                                                        
[D] └── light-2.0.0     → (remote) N/A                                                        
[D] └── osint-2.0.0     → (remote) N/A                                                        
[D] └── full-2.0.0b5    → (remote) N/A                                                        
[D] └── ad-2.0.0b5      → (remote) N/A                                                        
[D] └── web-2.0.0b5     → (remote) N/A                                                        
[D] └── light-2.0.0b5   → (remote) N/A                                                        
[D] └── osint-2.0.0b5   → (remote) N/A                                                        
[D] Updating image cache data                                                                 
[D] └── nightly (version: e5bc0af8)     → (remote)                                            
sha256:3ee3c437b480cb2f1437886206a94d95a3b7c9bb41b843781a82379c2ccaab31                       
[D] └── web (version: 3.1.1)    → (remote)                                                    
sha256:9108e175ebcd946d142de06f7ef8c7f8e9baaa996c83bf03c72b804239d925ba                       
[D] └── osint (version: 3.1.1)  → (remote)                                                    
sha256:4365185cd4082cac6bd05d97eab0c230ba1d2516b8c98e95e1b87e1eb125e3a3                       
[D] └── light (version: 3.1.1)  → (remote)                                                    
sha256:19a6748bfafb103cdfc51cb4a33ae931d4ffc81b8824399d20e1f9802ef744f8                       
[D] └── full (version: 3.1.1)   → (remote)                                                    
sha256:3d40ce1506e100b53cf27a653b1cad8ec7bfc1ceefeaa9a7f84e422942afeff3                       
[D] └── ad (version: 3.1.1)     → (remote)                                                    
sha256:6e7f9fbc6ec5d3609b5c9e3dfbad4584e68196a82978201509be7830a85d6357                       
[D] Loading container: exegol-prolab_zephyr_desktop                                           
[D] └── Parsing envs : DISPLAY=:0                                                             
[D] └── Parsing envs : _JAVA_AWT_WM_NONREPARENTING=1                                          
[D] └── Parsing envs : QT_X11_NO_MITSHM=1                                                     
[D] └── Parsing envs : DESKTOP_PROTO=http                                                     
[D] └── Parsing envs : DESKTOP_HOST=10.8.0.2                                                  
[D] └── Parsing envs : DESKTOP_PORT=54047                                                     
[D] └── Parsing envs : PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin      
[D] └── Parsing label : org.exegol.app                                                        
[D] └── Parsing label : org.exegol.build_date                                                 
[D] └── Parsing label : org.exegol.feature.desktop                                            
[-] It seems that something unexpected happened ...                                           
[-] To draw our attention to the problem and allow us to fix it, you can share your error with
us (by copying and pasting it with this syntax:  <error> ```) by creating a GitHub issue at
this address: https://github.com/ThePorgs/Exegol/issues                                       
[+] Thank you for your collaboration!
╭──────────────────────────── Traceback (most recent call last) ─────────────────────────────╮

Exception

╭──────────────────────────── Traceback (most recent call last) ─────────────────────────────╮
│ /opt/tools/Exegol/exegol/manager/ExegolController.py:59 in main                            │
│                                                                                            │
│   56 │   │   # Set logger verbosity depending on user input                                │
│   57 │   │   ExeLog.setVerbosity(ParametersManager().verbosity, ParametersManager().quiet) │
│   58 │   │   # Start Main controller & Executing action selected by user CLI               │
│ ❱ 59 │   │   ExegolController.call_action()                                                │
│   60 │   except KeyboardInterrupt:                                                         │
│   61 │   │   logger.empty_line()                                                           │
│   62 │   │   logger.info("Exiting")                                                        │
│                                                                                            │
│ /opt/tools/Exegol/exegol/manager/ExegolController.py:39 in call_action                     │
│                                                                                            │
│   36 │   │   │   # Fetch main operation function                                           │
│   37 │   │   │   main_action = cls.__action()                                              │
│   38 │   │   │   # Execute main function                                                   │
│ ❱ 39 │   │   │   main_action()                                                             │
│   40 │   │   else:                                                                         │
│   41 │   │   │   # TODO review required parameters                                         │
│   42 │   │   │   logger.error(f"These parameters are mandatory but missing: {','.join(miss │
│                                                                                            │
│ ╭──────────────────────────────────────── locals ────────────────────────────────────────╮ │
│ │            cls = <class 'exegol.manager.ExegolController.ExegolController'>            │ │
│ │    main_action = <bound method ExegolManager.info of <class                            │ │
│ │                  'exegol.manager.ExegolManager.ExegolManager'>>                        │ │
│ │ missing_params = []                                                                    │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                            │
│ /opt/tools/Exegol/exegol/manager/ExegolManager.py:57 in info                               │
│                                                                                            │
│    54 │   │   │   # Without any parameter, show all images and containers info             │
│    55 │   │   │   # Fetch data                                                             │
│    56 │   │   │   images = DockerUtils.listImages(include_version_tag=False)               │
│ ❱  57 │   │   │   containers = DockerUtils.listContainers()                                │
│    58 │   │   │   # List and print images                                                  │
│    59 │   │   │   color = ConsoleFormat.getArchColor(ParametersManager().arch)             │
│    60 │   │   │   logger.verbose(f"Listing local and remote Exegol images (filtering for a │
│                                                                                            │
│ ╭──────────────────────────────────────── locals ────────────────────────────────────────╮ │
│ │    cls = <class 'exegol.manager.ExegolManager.ExegolManager'>                          │ │
│ │ images = [                                                                             │ │
│ │          │   nightly (26836784/e5bc0af8 amd64) - 37.1GB - ([orange3]Update available   │ │
│ │          (v.26836784 :arrow_right: v.e5bc0af8)[/orange3], 16.9GB),                     │ │
│ │          │   web (3.1.1/3.1.1 amd64) - [bright_black]N/A[/bright_black] -              │ │
│ │          ([bright_black]Not installed[/bright_black], 6.6GB),                          │ │
│ │          │   osint (3.1.1/3.1.1 amd64) - [bright_black]N/A[/bright_black] -            │ │
│ │          ([bright_black]Not installed[/bright_black], 3.3GB),                          │ │
│ │          │   light (3.1.1/3.1.1 amd64) - [bright_black]N/A[/bright_black] -            │ │
│ │          ([bright_black]Not installed[/bright_black], 4.5GB),                          │ │
│ │          │   full (3.1.1/3.1.1 amd64) - [bright_black]N/A[/bright_black] -             │ │
│ │          ([bright_black]Not installed[/bright_black], 14.3GB),                         │ │
│ │          │   ad (3.1.1/3.1.1 amd64) - [bright_black]N/A[/bright_black] -               │ │
│ │          ([bright_black]Not installed[/bright_black], 10.1GB)                          │ │
│ │          ]                                                                             │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                            │
│ /opt/tools/Exegol/exegol/utils/DockerUtils.py:85 in listContainers                         │
│                                                                                            │
│    82 │   │   │   │   # Not reachable, critical logging will exit                          │
│    83 │   │   │   │   return  # type: ignore                                               │
│    84 │   │   │   for container in docker_containers:                                      │
│ ❱  85 │   │   │   │   cls.__containers.append(ExegolContainer(container))                  │
│    86 │   │   return cls.__containers                                                      │
│    87 │                                                                                    │
│    88 │   @classmethod                                                                     │
│                                                                                            │
│ ╭────────────────────────────── locals ──────────────────────────────╮                     │
│ │               cls = <class 'exegol.utils.DockerUtils.DockerUtils'> │                     │
│ │         container = <Container: bda305c30205>                      │                     │
│ │ docker_containers = [                                              │                     │
│ │                     │   <Container: bda305c30205>,                 │                     │
│ │                     │   <Container: 54f007659d7b>,                 │                     │
│ │                     │   <Container: e619781d4fb6>                  │                     │
│ │                     ]                                              │                     │
│ ╰────────────────────────────────────────────────────────────────────╯                     │
│                                                                                            │
│ /opt/tools/Exegol/exegol/model/ExegolContainer.py:42 in __init__                           │
│                                                                                            │
│    39 │   │   │   │   image_name = "[red bold]BROKEN[/red bold]"                           │
│    40 │   │   │   # Create Exegol container from an existing docker container              │
│    41 │   │   │   super().__init__(docker_container.name,                                  │
│ ❱  42 │   │   │   │   │   │   │    config=ContainerConfig(docker_container),               │
│    43 │   │   │   │   │   │   │    image=ExegolImage(name=image_name, docker_image=docker_ │
│    44 │   │   │   │   │   │   │    hostname=docker_container.attrs.get('Config', {}).get(' │
│    45 │   │   │   self.image.syncContainerData(docker_container)                           │
│                                                                                            │
│ ╭──────────────────────────────────────── locals ────────────────────────────────────────╮ │
│ │ docker_container = <Container: bda305c30205>                                           │ │
│ │     docker_image = <Image: 'nwodtuhs/exegol:nightly'>                                  │ │
│ │       image_name = ''                                                                  │ │
│ │            model = None                                                                │ │
│ │             self = <exegol.model.ExegolContainer.ExegolContainer object at             │ │
│ │                    0x7f1ff4fbeb90>                                                     │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                            │
│ /opt/tools/Exegol/exegol/model/ContainerConfig.py:105 in __init__                          │
│                                                                                            │
│    102 │   │   self.__passwd: Optional[str] = self.generateRandomPassword()                │
│    103 │   │                                                                               │
│    104 │   │   if container is not None:                                                   │
│ ❱  105 │   │   │   self.__parseContainerConfig(container)                                  │
│    106 │   │   else:                                                                       │
│    107 │   │   │   self.__wrapper_start_enabled = True                                     │
│    108 │   │   │   self.addVolume(str(ConstantConfig.spawn_context_path_obj), "/.exegol/sp │
│                                                                                            │
│ ╭────────────────────────────────────── locals ───────────────────────────────────────╮    │
│ │ container = <Container: bda305c30205>                                               │    │
│ │      self = <exegol.model.ContainerConfig.ContainerConfig object at 0x7f1ff4de6b90> │    │
│ ╰─────────────────────────────────────────────────────────────────────────────────────╯    │
│                                                                                            │
│ /opt/tools/Exegol/exegol/model/ContainerConfig.py:120 in __parseContainerConfig            │
│                                                                                            │
│    117 │   │   container_config = container.attrs.get("Config", {})                        │
│    118 │   │   self.tty = container_config.get("Tty", True)                                │
│    119 │   │   self.__parseEnvs(container_config.get("Env", []))                           │
│ ❱  120 │   │   self.__parseLabels(container_config.get("Labels", {}))                      │
│    121 │   │   self.interactive = container_config.get("OpenStdin", True)                  │
│    122 │   │   self.__enable_gui = False                                                   │
│    123 │   │   for env in self.__envs:                                                     │
│                                                                                            │
│ ╭──────────────────────────────────────── locals ────────────────────────────────────────╮ │
│ │        container = <Container: bda305c30205>                                           │ │
│ │ container_config = {                                                                   │ │
│ │                    │   'Hostname': 'exegol-prolab_zephyr_desktop',                     │ │
│ │                    │   'Domainname': '',                                               │ │
│ │                    │   'User': '',                                                     │ │
│ │                    │   'AttachStdin': False,                                           │ │
│ │                    │   'AttachStdout': False,                                          │ │
│ │                    │   'AttachStderr': False,                                          │ │
│ │                    │   'Tty': True,                                                    │ │
│ │                    │   'OpenStdin': True,                                              │ │
│ │                    │   'StdinOnce': False,                                             │ │
│ │                    │   'Env': [                                                        │ │
│ │                    │   │   'DISPLAY=:0',                                               │ │
│ │                    │   │   '_JAVA_AWT_WM_NONREPARENTING=1',                            │ │
│ │                    │   │   'QT_X11_NO_MITSHM=1',                                       │ │
│ │                    │   │   'DESKTOP_PROTO=http',                                       │ │
│ │                    │   │   'DESKTOP_HOST=10.8.0.2',                                    │ │
│ │                    │   │   'DESKTOP_PORT=54047',                                       │ │
│ │                    │   │                                                               │ │
│ │                    'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' │ │
│ │                    │   ],                                                              │ │
│ │                    │   ... +7                                                          │ │
│ │                    }                                                                   │ │
│ │             self = <exegol.model.ContainerConfig.ContainerConfig object at             │ │
│ │                    0x7f1ff4de6b90>                                                     │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                            │
│ /opt/tools/Exegol/exegol/model/ContainerConfig.py:179 in __parseLabels                     │
│                                                                                            │
│    176 │   │   │   │   │   # reflective execution of the feature enable method (add label  │
│    177 │   │   │   │   │   if value == "Enabled":                                          │
│    178 │   │   │   │   │   │   value = ""                                                  │
│ ❱  179 │   │   │   │   │   getattr(self, enable_function)(value)                           │
│    180 │                                                                                   │
│    181 │   def __parseMounts(self, mounts: Optional[List[Dict]], name: str):               │
│    182 │   │   """Parse Mounts object"""                                                   │
│                                                                                            │
│ ╭──────────────────────────────────────── locals ────────────────────────────────────────╮ │
│ │ enable_function = 'configureDesktop'                                                   │ │
│ │             key = 'org.exegol.feature.desktop'                                         │ │
│ │          labels = {                                                                    │ │
│ │                   │   'org.exegol.app': 'Exegol',                                      │ │
│ │                   │   'org.exegol.build_date': '2023-09-15T13:47:06Z',                 │ │
│ │                   │   'org.exegol.feature.desktop': 'http:10.8.0.2:54047',             │ │
│ │                   │   'org.exegol.metadata.creation_date': '2023-09-22T17:00:04Z',     │ │
│ │                   │   'org.exegol.metadata.passwd': '',  │ │
│ │                   │   'org.exegol.src_repository':                                     │ │
│ │                   'https://github.com/ThePorgs/Exegol-images',                         │ │
│ │                   │   'org.exegol.tag': 'nightly',                                     │ │
│ │                   │   'org.exegol.version': '26836784'                                 │ │
│ │                   }                                                                    │ │
│ │            self = <exegol.model.ContainerConfig.ContainerConfig object at              │ │
│ │                   0x7f1ff4de6b90>                                                      │ │
│ │           value = 'http:10.8.0.2:54047'                                                │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                            │
│ /opt/tools/Exegol/exegol/model/ContainerConfig.py:519 in configureDesktop                  │
│                                                                                            │
│    516 │   │   │   │   │   logger.critical(f"The desktop mode '{data}' is not supported. P │
│    517 │   │   │   elif i == 1 and data:                                                   │
│    518 │   │   │   │   self.__desktop_host = data                                          │
│ ❱  519 │   │   │   │   self.__desktop_port = self.__findAvailableRandomPort(self.__desktop │
│    520 │   │   │   elif i == 2:                                                            │
│    521 │   │   │   │   try:                                                                │
│    522 │   │   │   │   │   self.__desktop_port = int(data)                                 │
│                                                                                            │
│ ╭──────────────────────────────────────── locals ────────────────────────────────────────╮ │
│ │           data = '10.8.0.2'                                                            │ │
│ │ desktop_config = 'http:10.8.0.2:54047'                                                 │ │
│ │              i = 1                                                                     │ │
│ │           self = <exegol.model.ContainerConfig.ContainerConfig object at               │ │
│ │                  0x7f1ff4de6b90>                                                       │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                            │
│ /opt/tools/Exegol/exegol/model/ContainerConfig.py:749 in __findAvailableRandomPort         │
│                                                                                            │
│    746 │   │   """Find an available random port. Using the socket system to """            │
│    747 │   │   import socket                                                               │
│    748 │   │   sock = socket.socket()                                                      │
│ ❱  749 │   │   sock.bind((interface, 0))  # Using port 0 let the system decide for a rando │
│    750 │   │   random_port = sock.getsockname()[1]                                         │
│    751 │   │   sock.close()                                                                │
│    752 │   │   return random_port                                                          │
│                                                                                            │
│ ╭──────────────────────────────────────── locals ────────────────────────────────────────╮ │
│ │ interface = '10.8.0.2'                                                                 │ │
│ │      sock = <socket.socket fd=17, family=AddressFamily.AF_INET,                        │ │
│ │             type=SocketKind.SOCK_STREAM, proto=0, laddr=('0.0.0.0', 0)>                │ │
│ │    socket = <module 'socket' from '/usr/lib/python3.10/socket.py'>                     │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────╯ │
╰────────────────────────────────────────────────────────────────────────────────────────────╯
OSError: [Errno 99] Cannot assign requested address

Anything else?

No response

@Skileau Skileau added the bug Something isn't working label Sep 25, 2023
@ShutdownRepo ShutdownRepo changed the title [BUG] Desktop on a missing network interface leads to stacktrace on wrapper [BUG] Desktop (beta) on a missing network interface leads to stacktrace on all wrapper commands Sep 26, 2023
@ShutdownRepo
Copy link
Member

Thank you @Skileau for raising the issue on this beta feature, for people reading this thread, this only affects the dev branch right now since the Desktop feature is in beta-testing.

@ShutdownRepo
Copy link
Member

Should be fixed by #184, can you confirm @Skileau?

@Skileau
Copy link
Author

Skileau commented Sep 28, 2023

Yes, the stacktrace issue is fixed.
There is no error message when the interface does not exist at container start (cf. image). Maybe you should add one ?
image

@ShutdownRepo
Copy link
Member

Indeed, closing this issue here as it'll be fixed with #184
Opening an internal ticket to improve what you described and identify whether a host and port are available when starting a container

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants