canonical / action-build

A Github action for building Snapcraft projects
MIT License
42 stars 22 forks source link

Fails to connect to network when running on Ubuntu 22.04 image #39

Closed MehdiChinoune closed 2 years ago

MehdiChinoune commented 2 years ago
* Command that failed: 'lxc --project snapcraft exec local:snapcraft-makhber-791253 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 apt-get update'
* Command exit code: 100
* Command output: b'Ign:1 http://security.ubuntu.com/ubuntu jammy-security InRelease\nIgn:2 http://archive.ubuntu.com/ubuntu jammy InRelease\nIgn:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease\nIgn:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease\nIgn:2 http://archive.ubuntu.com/ubuntu jammy InRelease\nIgn:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease\nIgn:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease\nIgn:1 http://security.ubuntu.com/ubuntu jammy-security InRelease\nIgn:2 http://archive.ubuntu.com/ubuntu jammy InRelease\nIgn:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease\nIgn:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease\nIgn:1 http://security.ubuntu.com/ubuntu jammy-security InRelease\nErr:2 http://archive.ubuntu.com/ubuntu jammy InRelease\n  Could not connect to archive.ubuntu.com:80 (2620:2d:4000:1::19). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (2001:[67](https://github.com/MehdiChinoune/makhber/runs/6940338738?check_suite_focus=true#step:4:69)c:1562::15). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (2620:2d:4000:1::16). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (185.125.190.39), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.91.39), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to archive.ubuntu.com:80 (185.125.190.36), connection timed out\nErr:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease\n  Unable to connect to archive.ubuntu.com:80:\nErr:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease\n  Unable to connect to archive.ubuntu.com:80:\nErr:1 http://security.ubuntu.com/ubuntu jammy-security InRelease\n  Could not connect to security.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (2620:2d:4000:1::19). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (2620:2d:4000:1::16). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (185.125.190.36), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to security.ubuntu.com:80 (185.125.190.39), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.39), connection timed out\nReading package lists...\n'
* Command standard error output: b'E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy/InRelease  Could not connect to archive.ubuntu.com:80 (2620:2d:4000:1::19). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (2620:2d:4000:1::16). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (185.125.190.39), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.91.39), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to archive.ubuntu.com:80 (185.125.190.36), connection timed out\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease  Unable to connect to archive.ubuntu.com:80:\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease  Unable to connect to archive.ubuntu.com:80:\nE: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jammy-security/InRelease  Could not connect to security.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (2620:2d:4000:1::19). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (2620:2d:4000:1::16). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (185.125.190.36), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to security.ubuntu.com:80 (185.125.190.39), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.39), connection timed out\nE: Some index files failed to download. They have been ignored, or old ones used instead.\n'                                                                   
2022-06-17 17:33:15.774 Traceback (most recent call last):                     
2022-06-17 17:33:15.774   File "/snap/snapcraft/7717/lib/python3.8/site-packages/craft_providers/bases/buildd.py", line 367, in _setup_apt                     
2022-06-17 17:33:15.774     executor.execute_run(                              
2022-06-17 17:33:15.774   File "/snap/snapcraft/7717/lib/python3.8/site-packages/craft_providers/lxd/lxd_instance.py", line 221, in execute_run                
2022-06-17 17:33:15.774     return self.lxc.exec(                              
2022-06-17 17:33:15.774   File "/snap/snapcraft/7717/lib/python3.8/site-packages/craft_providers/lxd/lxc.py", line 326, in exec                                
2022-06-17 17:33:15.774     return runner(final_cmd, **kwargs)  # pylint: disable=subprocess-run-check                                                         
2022-06-17 17:33:15.774   File "/snap/snapcraft/7717/usr/lib/python3.8/subprocess.py", line 516, in run                                                        
2022-06-17 17:33:15.774     raise CalledProcessError(retcode, process.args,    
2022-06-17 17:33:15.774 subprocess.CalledProcessError: Command '['lxc', '--project', 'snapcraft', 'exec', 'local:snapcraft-makhber-791253', '--', 'env', 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin', 'SNAPCRAFT_MANAGED_MODE=1', 'apt-get', 'update']' returned non-zero exit status 100.   
2022-06-17 17:33:15.774                                                        
2022-06-17 17:33:15.774 The above exception was the direct cause of the following exception:                                                                   
2022-06-17 17:33:15.774 Traceback (most recent call last):                     
2022-06-17 17:33:15.774   File "/snap/snapcraft/7717/lib/python3.8/site-packages/snapcraft/providers/_lxd.py", line 172, in launched_environment               
2022-06-17 17:33:15.774     instance = lxd.launch(                             
2022-06-17 17:33:15.774   File "/snap/snapcraft/7717/lib/python3.8/site-packages/craft_providers/lxd/launcher.py", line 212, in launch                         
2022-06-17 17:33:15.774     base_configuration.setup(executor=instance)        
2022-06-17 17:33:15.774   File "/snap/snapcraft/7717/lib/python3.8/site-packages/snapcraft/providers/_buildd.py", line 119, in setup                           
2022-06-17 17:33:15.774     super().setup(executor=executor, retry_wait=retry_wait, timeout=timeout)                                                           
2022-06-17 17:33:15.774   File "/snap/snapcraft/7717/lib/python3.8/site-packages/craft_providers/bases/buildd.py", line 274, in setup                          
2022-06-17 17:33:15.774     self._setup_apt(executor=executor, deadline=deadline)                                                                              
2022-06-17 17:33:15.774   File "/snap/snapcraft/7717/lib/python3.8/site-packages/craft_providers/bases/buildd.py", line 373, in _setup_apt                     
2022-06-17 17:33:15.774     raise BaseConfigurationError(                      
2022-06-17 17:33:15.774 craft_providers.bases.errors.BaseConfigurationError: Failed to update apt cache.                                                       
2022-06-17 17:33:15.774 * Command that failed: 'lxc --project snapcraft exec local:snapcraft-makhber-791253 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 apt-get update'        
2022-06-17 17:33:15.774 * Command exit code: 100                               
2022-06-17 17:33:15.775 * Command output: b'Ign:1 http://security.ubuntu.com/ubuntu jammy-security InRelease\nIgn:2 http://archive.ubuntu.com/ubuntu jammy InRelease\nIgn:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease\nIgn:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease\nIgn:2 http://archive.ubuntu.com/ubuntu jammy InRelease\nIgn:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease\nIgn:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease\nIgn:1 http://security.ubuntu.com/ubuntu jammy-security InRelease\nIgn:2 http://archive.ubuntu.com/ubuntu jammy InRelease\nIgn:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease\nIgn:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease\nIgn:1 http://security.ubuntu.com/ubuntu jammy-security InRelease\nErr:2 http://archive.ubuntu.com/ubuntu jammy InRelease\n  Could not connect to archive.ubuntu.com:80 (2620:2d:4000:1::19). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (2620:2d:4000:1::16). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (185.125.190.39), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.91.39), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to archive.ubuntu.com:80 (185.125.190.36), connection timed out\nErr:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease\n  Unable to connect to archive.ubuntu.com:80:\nErr:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease\n  Unable to connect to archive.ubuntu.com:80:\nErr:1 http://security.ubuntu.com/ubuntu jammy-security InRelease\n  Could not connect to security.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (2620:2d:4000:1::19). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (2620:2d:4000:1::16). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (185.125.190.36), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to security.ubuntu.com:80 (185.125.190.39), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.39), connection timed out\nReading package lists...\n'                                                
2022-06-17 17:33:15.775 * Command standard error output: b'E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy/InRelease  Could not connect to archive.ubuntu.com:80 (2620:2d:4000:1::19). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (2620:2d:4000:1::16). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (185.125.190.39), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.91.39), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to archive.ubuntu.com:80 (185.125.190.36), connection timed out\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease  Unable to connect to archive.ubuntu.com:80:\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease  Unable to connect to archive.ubuntu.com:80:\nE: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jammy-security/InRelease  Could not connect to security.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (2620:2d:4000:1::19). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (2620:2d:4000:1::16). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (185.125.190.36), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to security.ubuntu.com:80 (185.125.190.39), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.39), connection timed out\nE: Some index files failed to download. They have been ignored, or old ones used instead.\n'                
2022-06-17 17:33:15.775 Full execution log: '/home/runner/.cache/snapcraft/log/snapcraft-20220617-1[73](https://github.com/MehdiChinoune/makhber/runs/6940338738?check_suite_focus=true#step:4:75)218.0[78](https://github.com/MehdiChinoune/makhber/runs/6940338738?check_suite_focus=true#step:4:80)735.log'

It runs successfully on ubuntu-20.04 image