opencomputeproject / OpenNetworkLinux

Open Network Linux - An Operating System for Bare Metal Switches
https://www.opennetlinux.org
Other
567 stars 341 forks source link

ONL Build Issues #461

Open shakeeelmohamed opened 5 years ago

shakeeelmohamed commented 5 years ago

Hi,

I am trying to build ONL on Debian 8.2 VM which runs on Ubuntu Server 18.04 LTS Kernel Version : Linux 4.1.4 Docker Version : 17

Please let me know how to fix these errors

Ign copy: ./ InRelease Ign copy: ./ InRelease Ign copy: ./ Release.gpg Ign copy: ./ Release.gpg Ign copy: ./ Release Ign copy: ./ Release Get:1 copy: ./ Packages [8134 B] Ign copy: ./ Translation-en Get:2 copy: ./ Packages [213 kB] Ign copy: ./ Translation-en Ign http://127.0.0.1:3142 jessie InRelease Ign http://127.0.0.1:3142 unstable InRelease Ign http://127.0.0.1:3142 jessie Release.gpg Ign http://127.0.0.1:3142 unstable Release.gpg Ign http://127.0.0.1:3142 jessie Release Ign http://127.0.0.1:3142 unstable Release Err http://127.0.0.1:3142 jessie/main amd64 Packages 503 Service Unavailable Ign http://127.0.0.1:3142 jessie/main Translation-en Err http://127.0.0.1:3142 unstable/main amd64 Packages 503 Service Unavailable Ign http://127.0.0.1:3142 unstable/main Translation-en Fetched 221 kB in 11s (19.7 kB/s) W: Failed to fetch http://127.0.0.1:3142/mirrors.kernel.org/debian/dists/jessie/main/binary-amd64/Packages 503 Service Unavailable

W: Failed to fetch http://127.0.0.1:3142/apt.opennetlinux.org/debian/dists/unstable/main/binary-amd64/Packages 503 Service Unavailable

E: Some index files failed to download. They have been ignored, or old ones used instead. apt update failed. Exit value: 100 INFO:onlrfs:[profiler] sudo /usr/sbin/multistrap -d rootfs-amd64.d -f /tmp/tmpOf9Ef : 12.3234260082 seconds (0.20539043347 minutes) DEBUG:onlrfs:Executing:sudo mount -t devtmpfs dev rootfs-amd64.d/dev INFO:onlrfs:[profiler] sudo mount -t devtmpfs dev rootfs-amd64.d/dev : 0.0104780197144 seconds (0.000174633661906 minutes) DEBUG:onlrfs:Executing:sudo mount -t proc proc rootfs-amd64.d/proc mount: mount point rootfs-amd64.d/proc does not exist ERROR:onlrfs:Exception 'Could not mount proc in rfs.' in OnlRfsContext::enter DEBUG:onlrfs:Executing:sudo umount -l rootfs-amd64.d/dev rootfs-amd64.d/proc umount: rootfs-amd64.d/proc: mountpoint not found ERROR:onlrfs:Could not unmount dev and proc /root/OpenNetworkLinux/make/rfs.mk:36: recipe for target 'RFS' failed make[3]: *** [RFS] Error 1 Traceback (most recent call last): File "/root/OpenNetworkLinux/tools/onlpm.py", line 1282, in pm.build(p) File "/root/OpenNetworkLinux/tools/onlpm.py", line 967, in build products = pg.build(dir=dir_) File "/root/OpenNetworkLinux/tools/onlpm.py", line 626, in build self.gmake_locked("", 'Build') File "/root/OpenNetworkLinux/tools/onlpm.py", line 601, in gmake_locked ex=OnlPackageError('%s failed.' % operation)) File "/root/OpenNetworkLinux/tools/onlu.py", line 126, in execute raise ex onlpm.OnlPackageError: 'Build failed.' /root/OpenNetworkLinux/make/pkg.mk:30: recipe for target 'pkgall' failed make[2]: [pkgall] Error 1 /root/OpenNetworkLinux/make/subdirs.mk:15: recipe for target 'all' failed make[1]: [all] Error 1 make[1]: Leaving directory '/root/OpenNetworkLinux/builds/amd64' Makefile:23: recipe for target 'amd64' failed make: [amd64] Error 2 Makefile:56: recipe for target 'docker' failed make: [docker] Error 2

Thanks!

saswat108 commented 5 years ago

Did you find any solution to this error? I am also running into a similar error at onlrfs while building ONL for amd64.

Regards.

bhuvanesh-eswara commented 4 years ago

Ran into similar issue. On analysis it was found that port number 3142 is used by apt-cacher-ng. Below steps helped me.

  1. Run apt-cacher-ng
  2. Rerun the build procedure

Thanks, Bhuvan

kul2241 commented 4 years ago

hi All, i am also facing few issues similar to above mails, like "apt update failed error 100" and "proc mount failed ". running apt-cacher-ng is not solving issue. please find the logs below,

onl-kernel-4.19-lts-x86-64-all-modules efibootmgr gdisk acpid onl-upgrade onlp-x86-64-kvm-x86-64-r0 onl-platform-config-x86-64-kvm-x86-64-r0 : 1.07959389687 seconds (0.0179932316144 minutes) INFO:onlrfs:Updating /home/kusingh/onl_i/onl_latest/opennetworklinux/REPO/buster/packages/binary-amd64 DEBUG:onlrfs:Executing:make -C /home/kusingh/onl_i/onl_latest/opennetworklinux/REPO/buster/packages/binary-amd64 make[4]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. Updating Package Manifest... dpkg-scanpackages: info: Wrote 20 entries to output Packages file. INFO:onlrfs:[profiler] make -C /home/kusingh/onl_i/onl_latest/opennetworklinux/REPO/buster/packages/binary-amd64 : 4.02554988861 seconds (0.0670924981435 minutes) INFO:onlrfs:Updating /home/kusingh/onl_i/onl_latest/opennetworklinux/REPO/buster/packages/binary-all DEBUG:onlrfs:Executing:make -C /home/kusingh/onl_i/onl_latest/opennetworklinux/REPO/buster/packages/binary-all make[4]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. INFO:onlrfs:[profiler] make -C /home/kusingh/onl_i/onl_latest/opennetworklinux/REPO/buster/packages/binary-all : 0.010115146637 seconds (0.000168585777283 minutes) DEBUG:onlrfs:Executing:sudo /usr/sbin/multistrap -d buster/rootfs-amd64.d -f /tmp/tmpVY_Ayi Use of uninitialized value in join or string at /usr/sbin/multistrap line 1294. Use of uninitialized value in join or string at /usr/sbin/multistrap line 1294. multistrap 2.2.10 using /tmp/tmpVY_Ayi multistrap 2.2.10 using /tmp/tmpVY_Ayi Defaulting architecture to native: amd64 multistrap building amd64 multistrap on 'amd64' I: Setting /home/kusingh/onl_i/onl_latest/opennetworklinux/builds/amd64/rootfs/builds/buster/rootfs-amd64.d/lib64 -> /home/kusingh/onl_i/onl_latest/opennetworklinux/builds/amd64/rootfs/builds/buster/rootfs-amd64.d/lib symbolic link. Getting package lists: APT_CONFIG=/tmp/multistrap.b3rDm0 apt-get -o Apt::Architecture=amd64 -o Dir::Etc::TrustedParts=/home/kusingh/onl_i/onl_latest/opennetworklinux/builds/amd64/rootfs/builds/buster/rootfs-amd64.d/etc/apt/trusted.gpg.d -o Dir::Etc::Trusted=/home/kusingh/onl_i/onl_latest/opennetworklinux/builds/amd64/rootfs/builds/buster/rootfs-amd64.d/etc/apt/trusted.gpg -o Apt::Get::AllowUnauthenticated=true -o Apt::Get::Download-Only=true -o Apt::Install-Recommends=false -o Dir=/home/kusingh/onl_i/onl_latest/opennetworklinux/builds/amd64/rootfs/builds/buster/rootfs-amd64.d/ -o Dir::Etc=/home/kusingh/onl_i/onl_latest/opennetworklinux/builds/amd64/rootfs/builds/buster/rootfs-amd64.d/etc/apt/ -o Dir::Etc::Parts=/home/kusingh/onl_i/onl_latest/opennetworklinux/builds/amd64/rootfs/builds/buster/rootfs-amd64.d/etc/apt/apt.conf.d/ -o Dir::Etc::PreferencesParts=/home/kusingh/onl_i/onl_latest/opennetworklinux/builds/amd64/rootfs/builds/buster/rootfs-amd64.d/etc/apt/preferences.d/ -o APT::Default-Release='*' -o Dir::State=/home/kusingh/onl_i/onl_latest/opennetworklinux/builds/amd64/rootfs/builds/buster/rootfs-amd64.d/var/lib/apt/ -o Dir::State::Status=/home/kusingh/onl_i/onl_latest/opennetworklinux/builds/amd64/rootfs/builds/buster/rootfs-amd64.d/var/lib/dpkg/status -o Dir::Cache=/home/kusingh/onl_i/onl_latest/opennetworklinux/builds/amd64/rootfs/builds/buster/rootfs-amd64.d/var/cache/apt/ update Ign:1 copy:/home/kusingh/onl_i/onl_latest/opennetworklinux/REPO/buster/packages/binary-all ./ InRelease Ign:2 copy:/home/kusingh/onl_i/onl_latest/opennetworklinux/REPO/buster/packages/binary-amd64 ./ InRelease Err:3 copy:/home/kusingh/onl_i/onl_latest/opennetworklinux/REPO/buster/packages/binary-all ./ Release Failed to stat - stat (2: No such file or directory) Err:4 copy:/home/kusingh/onl_i/onl_latest/opennetworklinux/REPO/buster/packages/binary-amd64 ./ Release Failed to stat - stat (2: No such file or directory) Get:5 http://127.0.0.1:3142/mirrors.kernel.org/debian buster InRelease [122 kB] Err:5 http://127.0.0.1:3142/mirrors.kernel.org/debian buster InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY DCC9EFBF77E11517 Ign:6 http://127.0.0.1:3142/apt.opennetlinux.org/debian unstable InRelease Get:7 http://127.0.0.1:3142/apt.opennetlinux.org/debian unstable Release [7726 B] Ign:8 http://127.0.0.1:3142/apt.opennetlinux.org/debian unstable Release.gpg Reading package lists... Done E: The repository 'copy:/home/kusingh/onl_i/onl_latest/opennetworklinux/REPO/buster/packages/binary-all ./ Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'copy:/home/kusingh/onl_i/onl_latest/opennetworklinux/REPO/buster/packages/binary-amd64 ./ Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://127.0.0.1:3142/mirrors.kernel.org/debian buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY DCC9EFBF77E11517 E: The repository 'http://127.0.0.1:3142/mirrors.kernel.org/debian buster InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://127.0.0.1:3142/apt.opennetlinux.org/debian unstable Release' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. apt update failed. Exit value: 100 INFO:onlrfs:[profiler] sudo /usr/sbin/multistrap -d buster/rootfs-amd64.d -f /tmp/tmpVY_Ayi : 3.39929986 seconds (0.0566549976667 minutes) DEBUG:onlrfs:Executing:sudo mount -t devtmpfs dev buster/rootfs-amd64.d/dev INFO:onlrfs:[profiler] sudo mount -t devtmpfs dev buster/rootfs-amd64.d/dev : 0.0160229206085 seconds (0.000267048676809 minutes) DEBUG:onlrfs:Executing:sudo mount -t proc proc buster/rootfs-amd64.d/proc mount: buster/rootfs-amd64.d/proc: mount point does not exist. ERROR:onlrfs:Exception 'Could not mount proc in rfs.' in OnlRfsContext::enter DEBUG:onlrfs:Executing:sudo umount -l buster/rootfs-amd64.d/dev buster/rootfs-amd64.d/proc umount: buster/rootfs-amd64.d/proc: no mount point specified. ERROR:onlrfs:Could not unmount dev and proc make[3]: [/home/kusingh/onl_i/onl_latest/opennetworklinux/make/rfs.mk:51: RFS] Error 1 Traceback (most recent call last): File "/home/kusingh/onl_i/onl_latest/opennetworklinux/tools/onlpm.py", line 1412, in pm.build(p) File "/home/kusingh/onl_i/onllatest/opennetworklinux/tools/onlpm.py", line 1087, in build products = pg.build(dir=dir_) File "/home/kusingh/onl_i/onl_latest/opennetworklinux/tools/onlpm.py", line 690, in build self.gmake_locked("", 'Build') File "/home/kusingh/onl_i/onl_latest/opennetworklinux/tools/onlpm.py", line 665, in gmake_locked ex=OnlPackageError('%s failed.' % operation)) File "/home/kusingh/onl_i/onl_latest/opennetworklinux/tools/onlu.py", line 126, in execute raise ex onlpm.OnlPackageError: 'Build failed.' make[2]: [/home/kusingh/onl_i/onl_latest/opennetworklinux/make/pkg.mk:30: pkgall] Error 1 make[1]: [/home/kusingh/onl_i/onl_latest/opennetworklinux/make/subdirs.mk:15: all] Error 1 make[1]: Leaving directory '/home/kusingh/onl_i/onl_latest/opennetworklinux/builds/amd64' make: [Makefile:23: amd64] Error 2

as per my understanding , at first onlrfs.py running multistrip with config file, but was not able to get 'Release' files for buster from specified mirror link. after that it run 'apt update' and then run again 'multistrip' to collect 'Release' and 'InRelease' files for buster but since 'apt update' itself faild, so multistrip failed again. but i did not understand how dev mounting is done but proc monunt get failed?

same build is working fine for debian stretch. there is did not find nay 'apt update error' and there 'Release' and 'InRelease ' both files are present in 'apt update'.

if any one have solution for this problem or any idea about it, please let me know.

Thanks, Kulvendra

kul2241 commented 4 years ago

hi , i was think to try with build the fresh OpenNetworkLinux from github. to check either we are seeing same issue there or not . there i found new problem, some cross compiler issue,

make[2]: Leaving directory '/home/kusingh/repo/OpenNetworkLinux/packages/base/any/initrds/buildroot/builds/buildroot-powerpc/build/host-ccache-3.1.8'

Checking external toolchain settings Cannot execute cross-compiler '/usr/buildroot/toolchains/powerpc/bin/powerpc-buildroot-linux-uclibc-gcc' make[1]: [toolchain/toolchain-external/ext-tool.mk:337: /home/kusingh/repo/OpenNetworkLinux/packages/base/any/initrds/buildroot/builds/buildroot-powerpc/stamps/ext-toolchain-checked] Error 1 make[1]: Leaving directory '/home/kusingh/repo/OpenNetworkLinux/packages/base/any/initrds/buildroot/builds/buildroot-mirror' make: [Makefile:93: buildroot-powerpc] Error 2 root@in-thanos-qa3:/home/kusingh/repo/OpenNetworkLinux/packages/base/

i think it is because of submodule commits, when it checked git submodule, there we are still using old commit, below are logs.

thanosadmin:$ git submodule 5e1a5c1ef7bac890845920809147ee2070dc96ea packages/base/any/initrds/buildroot/builds/buildroot-mirror (heads/master) 9cabf0dd1e9fea8d68fc3091d7530db07effe599 packages/base/any/kernels/legacy/linux-3.8.13 (heads/master) d0512f06933736dd3c49c78e89d07fa254ffec36 packages/base/any/kernels/legacy/linux-3.9.6 (v3.9.6-1-21-gd0512f06) -52a63355e1a4da6326a3ee341e07604582516cd6 packages/platforms-closed 2df6c06594b12de559ad3189c13d70adda68ee8e sm/bigcode (heads/master) aa92be2faa3a4b3822bedeecd6d756e7755ed8ed sm/build-artifacts (aa92be2) d323f34967127c82bfd6c7ee28fef1e21c544d98 sm/infra (heads/master) thanosadmin:$ pwd

if any one have idea how to fix it, please let me know.

Thanks, Kulvendra

jouhnpeng commented 4 years ago

Ran into similar issue. On analysis it was found that port number 3142 is used by apt-cacher-ng. Below steps helped me.

  1. Run apt-cacher-ng
  2. Rerun the build procedure

Thanks, Bhuvan

I have the same error, i could not solve it by using "apt-cacher-ng";

dogukangulyasar commented 2 years ago

Hello guys,

3142 port will be used for some tasks while you are trying to build ONL but at the same time, apt-cacher-ng is using this port as well. You can try to stop apt-cacher-ng and start the build process again.

$ sudo service apt-cacher-ng stop