Error building ONOS master with bazel

2,940 views
Skip to first unread message

Ramon Casellas

unread,
Oct 15, 2018, 4:17:24 AM10/15/18
to ONOS Developers
Hi all,

I am a bit lost with the following errror. It's happening in two ubuntu
boxes (18.04),

I have tried with bazel 17 (from repository) and bazel 15.2 (manually
installed)

Any hint is appreciated (there is no uid 501 ...)

Thanks

Ramon


root@P01-C2-MH-145:~# git clone https://gerrit.onosproject.org/onos
Cloning into 'onos'...
...
Checking out files: 100% (12671/12671), done.

root@P01-C2-MH-145:~# cd onos
root@P01-C2-MH-145:~/onos# export ONOS_ROOT=$(pwd)
root@P01-C2-MH-145:~/onos# source $ONOS_ROOT/tools/dev/bash_profile
root@P01-C2-MH-145:~/onos# bazel build onos
Starting local Bazel server and connecting to it...
...............
INFO: Analysed target //:onos (714 packages loaded).
INFO: Found 1 target...
ERROR: /root/onos/BUILD:22:1: Executing genrule //:onos-karaf failed
(Exit 2)
tar:
apache-karaf-3.0.8/system/org/apache/karaf/shell/org.apache.karaf.shell.console/3.0.8/._org.apache.karaf.shell.console-3.0.8.jar:
Cannot change ownership to uid 501, gid 50: Invalid argument
tar:
apache-karaf-3.0.8/system/org/apache/karaf/shell/org.apache.karaf.shell.console/3.0.8/org.apache.karaf.shell.console-3.0.8.jar:
Cannot change ownership to uid 501, gid 50: Invalid argument
tar:
apache-karaf-3.0.8/system/org/apache/karaf/shell/org.apache.karaf.shell.console/3.0.8:
Cannot change ownership to uid 501, gid 50: Invalid argument
tar:
apache-karaf-3.0.8/system/org/apache/karaf/shell/org.apache.karaf.shell.console:
Cannot change ownership to uid 501, gid 50: Invalid argument
tar: apache-karaf-3.0.8/system/org/apache/karaf/shell: Cannot change
ownership to uid 501, gid 50: Invalid argument
tar: apache-karaf-3.0.8/system/org/apache/karaf: Cannot change ownership
to uid 501, gid 50: Invalid argument
tar: apache-karaf-3.0.8/system/org/apache: Cannot change ownership to
uid 501, gid 50: Invalid argument
tar: apache-karaf-3.0.8/system/org: Cannot change ownership to uid 501,
gid 50: Invalid argument
tar: apache-karaf-3.0.8/system: Cannot change ownership to uid 501, gid
50: Invalid argument
tar: apache-karaf-3.0.8: Cannot change ownership to uid 501, gid 50:
Invalid argument
tar: Exiting with failure status due to previous errors
Target //:onos failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 22.714s, Critical Path: 6.21s
INFO: 5 processes: 1 linux-sandbox, 4 worker.
FAILED: Build did NOT complete successfully

laszl...@hubersuhner.com

unread,
Oct 15, 2018, 4:19:45 AM10/15/18
to ramon.c...@gmail.com, onos...@onosproject.org
Is it a clean build?



For information
concerning the processing of your personal data according to Art. 13, 14 GDPR
please refer to our Data Protection Statement at
https://www.hubersuhner.com/en/data-protection-statement.

This message
is confidential. It may also be privileged or otherwise protected by work
product immunity or other legal rules. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system. Please note that any views or opinions presented
in this email are solely those of the author and do not necessarily represent
those of the company. All deliveries and services are subject to our General
Terms and Conditions of Sales.

Although the company has taken reasonable
precautions to ensure no viruses are present in this email, the company cannot
accept responsibility for any loss or damage arising from the use of this email
or attachments.


________________________________________
From: Ramon Casellas [ramon.c...@gmail.com]
Sent: 15 October 2018 09:17
To: ONOS Developers
Subject: [onos-dev] Error building ONOS master with bazel
--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/ecf173e1-6cc0-0f24-3627-1e27fcf8feb6%40gmail.com.

laszl...@hubersuhner.com

unread,
Oct 15, 2018, 4:22:55 AM10/15/18
to ramon.c...@gmail.com, onos...@onosproject.org

Ramon Casellas

unread,
Oct 15, 2018, 4:23:29 AM10/15/18
to laszl...@hubersuhner.com, onos...@onosproject.org
Hi,

AFAIK yes, rm'ed  /root/.cache and to avoid any issue, ONOS root is a
git clone

I am quite new to bazel, so usually I try rm bazel links, rm .cache,
bazel clean etc. to no avail

R.

laszl...@hubersuhner.com

unread,
Oct 15, 2018, 4:24:39 AM10/15/18
to ramon.c...@gmail.com, onos...@onosproject.org
Also, why do you build as root? I would advise you to use a non-privileged user for this.
________________________________________
From: Ramon Casellas [ramon.c...@gmail.com]
Sent: 15 October 2018 09:23
To: Papp Laszlo; onos...@onosproject.org
Subject: Re: [onos-dev] Error building ONOS master with bazel

Ramon Casellas

unread,
Oct 15, 2018, 4:29:30 AM10/15/18
to laszl...@hubersuhner.com, onos...@onosproject.org

El 15/10/2018 a las 10:22, laszl...@hubersuhner.com escribió:
> What filesystem is this? Do you have enough space?

Plenty of space,

root@P01-C2-MH-145:~/onos# df
Filesystem     1K-blocks     Used Available Use% Mounted on
udev            32903784        0  32903784   0% /dev
tmpfs            6586872     1976   6584896   1% /run
/dev/sda1      895348344 10794716 839049528   2% /

/dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
I checked both, thanks. It is not a disk quota exceeded or a permission
denied, but an "Invalid argument" error.  IT's ext4 with plenty of
space. Users 501 and gid 50 do not exist.

I could try to add flags to tar but not sure how bazel is managing the files

R.

Ramon Casellas

unread,
Oct 15, 2018, 4:34:13 AM10/15/18
to laszl...@hubersuhner.com, onos...@onosproject.org
HI again Laszlo,

Thanks for your help.

On the root note, these are usually machines in a lab testbed - I am
well aware of the implications of building as root - but it has worked
in the past :?

If this error is caused by building as root, I would like to clearly see
the cause.

Thanks

Ramon

Thomas Vachuska

unread,
Oct 15, 2018, 11:48:10 AM10/15/18
to Ramon Casellas, laszl...@hubersuhner.com, onos...@onosproject.org
While I can’t answer your question without additional information, I would highly recommend not to build as a privileged user.

Thomas

Ramon Casellas

unread,
Oct 16, 2018, 2:37:11 AM10/16/18
to Thomas Vachuska, laszl...@hubersuhner.com, onos...@onosproject.org
El 15/10/2018 a las 17:48, Thomas Vachuska escribió:
While I can’t answer your question without additional information, I would highly recommend not to build as a privileged user.

Thomas


Hi Thomas, Laszlo

Thank you for the heads up. I followed your advice, using an unpriviledged user.

While it does seem that I didn't hit the previous issue, I am getting another error

INFO: Analysed target //:onos (714 packages loaded).
INFO: Found 1 target...

ERROR: /home/cttc/onos/web/gui/BUILD:96:1: Executing genrule //web/gui:_onos-gui-npm-install failed (Exit 1): bash failed: error executing command
  (cd /home/cttc/.cache/bazel/_bazel_cttc/2539a2bcd4004d28123e434eca1f9b5a/execroot/org_onosproject_onos && \
  exec env - \
    PATH=/bin:/usr/bin \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh;  ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/genfiles/web/gui/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=$ROOT/external/nodejs/bin/npm && mkdir -p tools/gui && cd tools/gui && jar xf ../../bazel-out/k8-fastbuild/genfiles/tools/gui/tools-gui-gulp.jar && $NPM $NPM_ARGS install  --no-cache --loglevel=error >npm-install.out 2>&1 && find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done && find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \; && jar Mcf $ROOT/bazel-out/k8-fastbuild/genfiles/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks')

Use --sandbox_debug to see verbose messages from the sandbox


Target //:onos failed to build


A web search yielded:

https://groups.google.com/a/onosproject.org/forum/#!topic/onos-dev/2jUh_kNMY_0

I made sure npm is installed, I am not using a proxy, I added .npmrc and .bowerrc as described

Checked: cttc@P01-C2-MH-145:~/.cache/bazel/_bazel_cttc/2539a2bcd4004d28123e434eca1f9b5a/execroot/org_onosproject_onos$ vi ./bazel-out/k8-fastbuild/genfiles/web/gui2-fw-lib/onos-gui2-npm-install.log

Binary found at /home/cttc/.cache/bazel/_bazel_cttc/2539a2bcd4004d28123e434eca1f9b5a/sandbox/linux-sandbox/497/execroot/org_onosproject_onos/web/gui2-fw-lib/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine

> @angular/c...@6.0.8 postinstall /home/cttc/.cache/bazel/_bazel_cttc/2539a2bcd4004d28123e434eca1f9b5a/sandbox/linux-sandbox/497/execroot/org_onosproject_onos/web/gui2-fw-lib/node_modules/@angular/cli
> node ./bin/ng-update-message.js

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1319 packages in 82.047s


Any further advice is appreciated

R.

Ray Milkey

unread,
Oct 16, 2018, 9:50:10 AM10/16/18
to ramon.c...@gmail.com, Thomas Vachuska, laszl...@hubersuhner.com, onos...@onosproject.org
The Bazel build does not use the locally installed npm, it installs it's own version and uses that. The instructions you were referring to are for buck and only apply to version 1.13 and lower.

As to your build problem, I can't tell from the output what is happening. Please try

bazel clean --expunge

and retry the build.

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.

Ankur Aggarwal

unread,
May 28, 2019, 5:44:36 AM5/28/19
to ONOS Developers, ramon.c...@gmail.com, t...@opennetworking.org, laszl...@hubersuhner.com
Hi All,

I am facing the same issue while compiling onos-2.1. I am not running as priviledged user and bazel clean --expunge does not seem to solve this. 


ankur@ubuntu:~/onos$ bazel clean --expunge
INFO: Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes.

ankur@ubuntu:~/onos$ bazel build onos --verbose_failures
Starting local Bazel server and connecting to it...

DEBUG
: Rule 'build_bazel_rules_nodejs' modified arguments {"commit": "70406e05de721520ca568a17186de73e972d7651", "shallow_since": "1551145517 -0800"} and dropped ["tag"]
INFO
: SHA256 (https://github.com/bazelbuild/rules_go/releases/download/0.16.3/rules_go-0.16.3.tar.gz) = b7a62250a3a73277ade0ce306d22f122365b513f5402222403e507f2f997d421
DEBUG
: Rule 'io_bazel_rules_go' modified arguments {"sha256": "b7a62250a3a73277ade0ce306d22f122365b513f5402222403e507f2f997d421"}
INFO
: SHA256 (https://github.com/bazelbuild/buildtools/archive/db073457c5a56d810e46efc18bb93a4fd7aa7b5e.zip) = e0b5b400cfef17d65886365dc7289cb4ef8dfe07066165607413a271a32aa2a4
DEBUG
: Rule 'com_github_bazelbuild_buildtools' modified arguments {"sha256": "e0b5b400cfef17d65886365dc7289cb4ef8dfe07066165607413a271a32aa2a4"}
INFO
: Analysed target //:onos (771 packages loaded, 13237 targets configured).
INFO
: Found 1 target...
INFO
: From Generating Java (Immutable) proto_library @com_github_openconfig_gnmi//:gnmi_proto:
external
/com_google_protobuf: warning: directory does not exist.
INFO
: From Generating Java (Immutable) proto_library @com_github_openconfig_gnoi//:gnoi_system_proto:
external
/com_google_protobuf: warning: directory does not exist.
INFO
: From Generating Java (Immutable) proto_library @com_github_openconfig_gnoi//:gnoi_types_proto:
external
/com_google_protobuf: warning: directory does not exist.
INFO
: From Generating Java (Immutable) proto_library @com_github_openconfig_gnoi//:gnoi_common_proto:
external
/com_google_protobuf: warning: directory does not exist.
INFO
: From Generating Java (Immutable) proto_library @com_github_p4lang_p4runtime//:p4runtime_proto:
external
/com_google_protobuf: warning: directory does not exist.
INFO
: From Generating Java (Immutable) proto_library @com_github_p4lang_p4runtime//:p4info_proto:
external
/com_google_protobuf: warning: directory does not exist.
ERROR
: /home/ankur/onos/web/gui/BUILD:94:1: Executing genrule //web/gui:_onos-gui-npm-install failed (Exit 1) bash failed: error executing command
 
(cd /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/814/execroot/org_onosproject_onos && \

 
exec env - \
    PATH
=/bin:/usr/bin \
 
/bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh;  ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/genfiles/web/gui/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=$ROOT/external/nodejs/bin/npm && mkdir -p tools/gui && cd tools/gui && jar xf ../../bazel-out/k8-fastbuild/genfiles/tools/gui/tools-gui-gulp.jar && $NPM $NPM_ARGS install  --no-cache --loglevel=error >npm-install.out 2>&1 && find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done && find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \; && jar Mcf $ROOT/bazel-out/k8-fastbuild/genfiles/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks
')
Execution platform: @bazel_tools//platforms:host_platform


Use --sandbox_debug to see verbose messages from the sandbox: bash failed: error executing command
  (cd /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/814/execroot/org_onosproject_onos && \

  exec env - \
    PATH=/bin:/usr/bin \
  /bin/bash -c '
source external/bazel_tools/tools/genrule/genrule-setup.sh;  ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/genfiles/web/gui/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=$ROOT/external/nodejs/bin/npm && mkdir -p tools/gui && cd tools/gui && jar xf ../../bazel-out/k8-fastbuild/genfiles/tools/gui/tools-gui-gulp.jar && $NPM $NPM_ARGS install  --no-cache --loglevel=error >npm-install.out 2>&1 && find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done && find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \; && jar Mcf $ROOT/bazel-out/k8-fastbuild/genfiles/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks')
Execution platform: @bazel_tools//platforms:host_platform



Use --sandbox_debug to see verbose messages from the sandbox
Target //:onos failed to build
INFO: Elapsed time: 736.109s, Critical Path: 73.78s
INFO: 816 processes: 813 linux-sandbox, 3 worker.

FAILED: Build did NOT complete successfully



Can anyone help me with potential solutions? (I am using bazel version 0.23.2 and oracle JDK version 1.8.0_211)

Best Regards,
Ankur



On Tuesday, October 16, 2018 at 7:20:10 PM UTC+5:30, Ray Milkey wrote:
The Bazel build does not use the locally installed npm, it installs it's own version and uses that. The instructions you were referring to are for buck and only apply to version 1.13 and lower.

As to your build problem, I can't tell from the output what is happening. Please try

bazel clean --expunge

and retry the build.

On Mon, Oct 15, 2018 at 11:37 PM Ramon Casellas <ramon....@gmail.com> wrote:
El 15/10/2018 a las 17:48, Thomas Vachuska escribió:
While I can’t answer your question without additional information, I would highly recommend not to build as a privileged user.

Thomas


Hi Thomas, Laszlo

Thank you for the heads up. I followed your advice, using an unpriviledged user.

While it does seem that I didn't hit the previous issue, I am getting another error

INFO: Analysed target //:onos (714 packages loaded).
INFO: Found 1 target...
ERROR: /home/cttc/onos/web/gui/BUILD:96:1: Executing genrule //web/gui:_onos-gui-npm-install failed (Exit 1): bash failed: error executing command
  (cd /home/cttc/.cache/bazel/_bazel_cttc/2539a2bcd4004d28123e434eca1f9b5a/execroot/org_onosproject_onos && \
  exec env - \
    PATH=/bin:/usr/bin \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh;  ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/genfiles/web/gui/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=$ROOT/external/nodejs/bin/npm && mkdir -p tools/gui && cd tools/gui && jar xf ../../bazel-out/k8-fastbuild/genfiles/tools/gui/tools-gui-gulp.jar && $NPM $NPM_ARGS install  --no-cache --loglevel=error >npm-install.out 2>&1 && find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done && find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \; && jar Mcf $ROOT/bazel-out/k8-fastbuild/genfiles/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks')

Use --sandbox_debug to see verbose messages from the sandbox
Target //:onos failed to build


A web search yielded:

https://groups.google.com/a/onosproject.org/forum/#!topic/onos-dev/2jUh_kNMY_0

I made sure npm is installed, I am not using a proxy, I added .npmrc and .bowerrc as described

Checked: ct...@P01-C2-MH-145:~/.cache/bazel/_bazel_cttc/2539a2bcd4004d28123e434eca1f9b5a/execroot/org_onosproject_onos$ vi ./bazel-out/k8-fastbuild/genfiles/web/gui2-fw-lib/onos-gui2-npm-install.log

Binary found at /home/cttc/.cache/bazel/_bazel_cttc/2539a2bcd4004d28123e434eca1f9b5a/sandbox/linux-sandbox/497/execroot/org_onosproject_onos/web/gui2-fw-lib/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine

> @angular/c...@6.0.8 postinstall /home/cttc/.cache/bazel/_bazel_cttc/2539a2bcd4004d28123e434eca1f9b5a/sandbox/linux-sandbox/497/execroot/org_onosproject_onos/web/gui2-fw-lib/node_modules/@angular/cli
> node ./bin/ng-update-message.js

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1319 packages in 82.047s


Any further advice is appreciated

R.

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos...@onosproject.org.

Sean Condon

unread,
May 28, 2019, 6:01:14 AM5/28/19
to Ankur Aggarwal, ONOS Developers, ramon.c...@gmail.com, Thomas Vachuska, laszl...@hubersuhner.com
Do you have npm installed locally on your machine? It might be creating a clash.

Are you behind a proxy - I know there are issues in downloading NPM if you're behind a proxy

To isolate it you can run 
bazel build //web/gui:_onos-gui-npm-install --verbose_failures --sandbox_debug

To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.

To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.


--
Sean Condon
Member of Technical Staff
Open Networking Foundation

aggarwala...@gmail.com

unread,
May 28, 2019, 10:29:28 AM5/28/19
to ONOS Developers, aggarwala...@gmail.com, ramon.c...@gmail.com, t...@opennetworking.org, laszl...@hubersuhner.com
Hi Sean,

No, I do not have npm installed locally, and I am not behind a proxy.

I did run the command as described by you. Below is the output, hopefully you can suggest something to solve the problem:


$ npm
The program 'npm' is currently not installed. You can install it by typing:
sudo apt install npm

$ bazel build //web/gui:_onos-gui-npm-install --verbose_failures --sandbox_debug
Starting local Bazel server and connecting to it...

INFO
: Analysed target //web/gui:_onos-gui-npm-install (5 packages loaded, 34 targets configured).
INFO
: Found 1 target...
ERROR
: /home/ankur/onos/web/gui/BUILD:94:1: Executing genrule //web/gui:_onos-gui-npm-install failed (Exit 1) linux-sandbox failed: error executing command
 
(cd /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos && \

 
exec env - \
    PATH
=/bin:/usr/bin \

    TMPDIR
=/tmp \
  /
home/ankur/.cache/bazel/_bazel_ankur/install/6f98dd1afced7c8dc211ce7a461c786c/_embedded_binaries/linux-sandbox -t 15 -w /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos -w /tmp -w /dev/shm -D -- /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh;  ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/genfiles/web/gui/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=$ROOT/external/nodejs/bin/npm && mkdir -p tools/gui && cd tools/gui && jar xf ../../bazel-out/k8-fastbuild/genfiles/tools/gui/tools-gui-gulp.jar && $NPM $NPM_ARGS install  --no-cache --loglevel=error >npm-install.out 2>&1 && find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done && find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \; && jar Mcf $ROOT/bazel-out/k8-fastbuild/genfiles/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks'): linux-sandbox failed: error executing command
  (cd /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos && \

  exec env - \
    PATH=/bin:/usr/bin \
    TMPDIR=/tmp \
  /home/ankur/.cache/bazel/_bazel_ankur/install/6f98dd1afced7c8dc211ce7a461c786c/_embedded_binaries/linux-sandbox -t 15 -w /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos -w /tmp -w /dev/shm -D -- /bin/bash -c '
source external/bazel_tools/tools/genrule/genrule-setup.sh;  ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/genfiles/web/gui/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=$ROOT/external/nodejs/bin/npm && mkdir -p tools/gui && cd tools/gui && jar xf ../../bazel-out/k8-fastbuild/genfiles/tools/gui/tools-gui-gulp.jar && $NPM $NPM_ARGS install  --no-cache --loglevel=error >npm-install.out 2>&1 && find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done && find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \; && jar Mcf $ROOT/bazel-out/k8-fastbuild/genfiles/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks')
src/main/tools/linux-sandbox.cc:154: linux-sandbox-pid1 has PID 32372
src/main/tools/linux-sandbox-pid1.cc:175: working dir: /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos
src/main/tools/linux-sandbox-pid1.cc:194: writable: /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos
src/main/tools/linux-sandbox-pid1.cc:194: writable: /tmp
src/main/tools/linux-sandbox-pid1.cc:194: writable: /dev/shm
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /dev
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /dev/pts
src/main/tools/linux-sandbox-pid1.cc:265: remount rw: /dev/shm
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /dev/hugepages
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /dev/mqueue
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /run
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /run/lock
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /run/user/0
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/kernel/security
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/systemd
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/net_cls,net_prio
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/blkio
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/cpu,cpuacct
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/perf_event
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/memory
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/pids
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/hugetlb
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/freezer
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/devices
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/cgroup/cpuset
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/pstore
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/kernel/debug
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /sys/fs/fuse/connections
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /proc
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /proc/sys/fs/binfmt_misc
src/main/tools/linux-sandbox-pid1.cc:265: remount ro: /var/lib/lxcfs
src/main/tools/linux-sandbox-pid1.cc:265: remount rw: /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos
src/main/tools/linux-sandbox-pid1.cc:265: remount rw: /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos
src/main/tools/linux-sandbox-pid1.cc:265: remount rw: /tmp
src/main/tools/linux-sandbox-pid1.cc:265: remount rw: /dev/shm
src/main/tools/process-tools.cc:118: sigaction(32, &sa, nullptr) failed
src/main/tools/process-tools.cc:118: sigaction(33, &sa, nullptr) failed
src/main/tools/linux-sandbox-pid1.cc:437: waitpid returned 2
src/main/tools/linux-sandbox-pid1.cc:457: child exited with code 1
src/main/tools/linux-sandbox.cc:204: child exited normally with exitcode 1
Target //web/gui:_onos-gui-npm-install failed to build
INFO: Elapsed time: 83.522s, Critical Path: 70.93s
INFO: 0 processes.

FAILED: Build did NOT complete successfully

Best,
Ankur

Sean Condon

unread,
May 28, 2019, 11:36:24 AM5/28/19
to Ankur Aggarwal, ONOS Developers, ramon.c...@gmail.com, Thomas Vachuska, laszl...@hubersuhner.com
Ankur 

I cannot reproduce the problem you are seeing here, but you could use the method I follow for getting to the bottom of these kind of errors.
1) In a separate terminal window cd in to the folder 
/home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos

2) Take the command (from above) and break it up in to individual commands to see which one is broken. Rather than "jar -xf" use "ls" to see if the jar file was extracted 
ROOT=`pwd`
export HOME=.
export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/genfiles/web/gui/config
export BABEL_DISABLE_CACHE=1
if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi
NPM=$ROOT/external/nodejs/bin/npm
mkdir -p tools/gui
cd tools/gui
jar xf ../../bazel-out/k8-fastbuild/genfiles/tools/gui/tools-gui-gulp.jar
$NPM $NPM_ARGS install  --no-cache --loglevel=error >npm-install.out 2>&1
find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done
find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \;
jar Mcf $ROOT/bazel-out/k8-fastbuild/genfiles/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks'

If you want more information on it - this command is generated by the 

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.

aggarwala...@gmail.com

unread,
May 30, 2019, 7:05:41 AM5/30/19
to ONOS Developers, aggarwala...@gmail.com, ramon.c...@gmail.com, t...@opennetworking.org, laszl...@hubersuhner.com
Hi Sean,

We did try this and found that the jar is indeed not extracting.

However, when I manually did the following:
cd /home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos/bazel-out/k8-fastbuild/genfiles/tools/gui/
jar -xf tools-gui-gulp.jar

the jar was in fact extracting fine.

Can you please suggest the changes I need to in web/gui/BUILD file to solve this problem? Or does it seem to be some other issue to you?

Thanks for all your help in debugging this

Best Regards,
Ankur Aggarwal

On Tuesday, May 28, 2019 at 9:06:24 PM UTC+5:30, Sean Condon wrote:
Ankur 

I cannot reproduce the problem you are seeing here, but you could use the method I follow for getting to the bottom of these kind of errors.
1) In a separate terminal window cd in to the folder 
/home/ankur/.cache/bazel/_bazel_ankur/42ce72a06c8af14269f42b451d721f16/sandbox/linux-sandbox/1/execroot/org_onosproject_onos

2) Take the command (from above) and break it up in to individual commands to see which one is broken. Rather than "jar -xf" use "ls" to see if the jar file was extracted 
ROOT=`pwd`
export HOME=.
export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/genfiles/web/gui/config
export BABEL_DISABLE_CACHE=1
if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi
NPM=$ROOT/external/nodejs/bin/npm
mkdir -p tools/gui
cd tools/gui
jar xf ../../bazel-out/k8-fastbuild/genfiles/tools/gui/tools-gui-gulp.jar
$NPM $NPM_ARGS install  --no-cache --loglevel=error >npm-install.out 2>&1
find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done
find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \;
jar Mcf $ROOT/bazel-out/k8-fastbuild/genfiles/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks'

If you want more information on it - this command is generated by the 

To unsubscribe from this group and stop receiving emails from it, send an email to onos...@onosproject.org.

Kieran McPeake

unread,
Jun 10, 2019, 10:27:23 AM6/10/19
to ONOS Developers, aggarwala...@gmail.com, ramon.c...@gmail.com, t...@opennetworking.org, laszl...@hubersuhner.com

Folks, 


I also got a build failed in the   //web/gui:_onos-gui-npm-install   phase, when building  master branch on CentOS 7 recently and reason was not obvious at start. I had followed steps at https://wiki.onosproject.org/display/ONOS/Developer+Quick+Start but  //web/gui:_onos-gui-npm-install   phase failed.  See  reference [1] below for logs with "--verbose_failures --sandbox_debug" added.


I then followed the troubleshooting steps suggested by Sean Condon earlier in this thread; and realised it was npm that was failing, and when I looked at the npm-install.out there was an error saying :


   bzip2: Cannot exec: No such file or directory tar (child): Error is not recoverable: exiting now


 After installing "bzip2" it worked fine. 


I have updated the above wiki regarding bzip2


So I am sending this e-mail in case it saves someone else a few headaches !


Regards,

Kieran


Reference [1]


bazel build //web/gui:_onos-gui-npm-install --verbose_failures --sandbox_debug

Starting local Bazel server and connecting to it...

INFO: Analyzed target //web/gui:_onos-gui-npm-install (5 packages loaded, 35 targets configured).

INFO: Found 1 target...

ERROR: /root/kieran/onos/web/gui/BUILD:94:1: Executing genrule //web/gui:_onos-gui-npm-install failed (Exit 1) process-wrapper failed: error executing command 

  (cd /root/.cache/bazel/_bazel_root/8243756b584a9ad919bdf59ee1a6f315/sandbox/processwrapper-sandbox/2/execroot/org_onosproject_onos && \

  exec env - \

    PATH=/bin:/usr/bin \

    TMPDIR=/tmp \

  /root/.cache/bazel/_bazel_root/install/157630649b08e7b4de5a16dc302dcbd4/_embedded_binaries/process-wrapper '--timeout=0' '--kill_delay=15' /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh;  ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/bin/web/gui/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=$ROOT/external/nodejs/bin/npm && mkdir -p tools/gui && cd tools/gui && jar xf ../../bazel-out/k8-fastbuild/bin/tools/gui/tools-gui-gulp.jar && $NPM $NPM_ARGS install  --no-cache --loglevel=error >npm-install.out 2>&1 && find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done && find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \; && jar Mcf $ROOT/bazel-out/k8-fastbuild/bin/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks'): process-wrapper failed: error executing command 

  (cd /root/.cache/bazel/_bazel_root/8243756b584a9ad919bdf59ee1a6f315/sandbox/processwrapper-sandbox/2/execroot/org_onosproject_onos && \

  exec env - \

    PATH=/bin:/usr/bin \

    TMPDIR=/tmp \

  /root/.cache/bazel/_bazel_root/install/157630649b08e7b4de5a16dc302dcbd4/_embedded_binaries/process-wrapper '--timeout=0' '--kill_delay=15' /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh;  ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/bin/web/gui/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=$ROOT/external/nodejs/bin/npm && mkdir -p tools/gui && cd tools/gui && jar xf ../../bazel-out/k8-fastbuild/bin/tools/gui/tools-gui-gulp.jar && $NPM $NPM_ARGS install  --no-cache --loglevel=error >npm-install.out 2>&1 && find . -name package.json | while read pjson; do egrep -v '\''/execroot/'\'' $pjson > ptmp; mv ptmp $pjson; done && find package.json gulpfile.babel.js node_modules gulp-tasks -type f -exec touch -t 201806280000 {} \; && jar Mcf $ROOT/bazel-out/k8-fastbuild/bin/web/gui/onos-gui-npm-install.jar package.json gulpfile.babel.js node_modules gulp-tasks')

Target //web/gui:_onos-gui-npm-install failed to build

INFO: Elapsed time: 32.604s, Critical Path: 21.29s

INFO: 1 process: 1 processwrapper-sandbox.

FAILED: Build did NOT complete successfully



Reference [2]

cat npm-install.out


> phantomjs...@2.1.16 install /root/.cache/bazel/_bazel_root/8243756b584a9ad919bdf59ee1a6f315/sandbox/processwrapper-sandbox/2/execroot/org_onosproject_onos/tools/gui/node_modules/karma-phantomjs-launcher/node_modules/phantomjs-prebuilt

> node install.js


PhantomJS not found on PATH

Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2

Verified checksum of previously downloaded file

Extracting tar contents (via spawned process)

Error extracting archive

Phantom installation failed { Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2

tar (child): bzip2: Cannot exec: No such file or directory

tar (child): Error is not recoverable: exiting now

tar: Child returned status 2

tar: Error is not recoverable: exiting now


    at ChildProcess.exithandler (child_process.js:275:12)

    at emitTwo (events.js:126:13)

    at ChildProcess.emit (events.js:214:7)

    at maybeClose (internal/child_process.js:925:16)

    at Socket.stream.socket.on (internal/child_process.js:346:11)

    at emitOne (events.js:116:13)

    at Socket.emit (events.js:211:7)

    at Pipe._handle.close [as _onclose] (net.js:567:12)

  killed: false,

  code: 2,

  signal: null,

// SNIP

devesh...@gmail.com

unread,
Jun 11, 2019, 6:47:30 AM6/11/19
to ONOS Developers, aggarwala...@gmail.com, ramon.c...@gmail.com, t...@opennetworking.org, laszl...@hubersuhner.com
Hi,

Can anybody please help with this error.

ERROR: /home/stack/Devesh/onos/protocols/p4runtime/proto/BUILD:15:1: Compiling Java headers protocols/p4runtime/proto/libonos-protocols-p4runtime-proto-native-hjar.jar (6 files) failed (Exit 1) linux-sandbox failed: error executing command
  (cd /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/39/execroot/org_onosproject_onos && \
  exec env - \
    LC_CTYPE=en_US.UTF-8 \
    PATH=/bin:/usr/bin \
    TMPDIR=/tmp \
  /home/stack/.cache/bazel/_bazel_stack/install/6d3fb10895e05e30e7c0d70ff072919e/_embedded_binaries/linux-sandbox -t 15 -w /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/39/execroot/org_onosproject_onos -w /tmp -w /dev/shm -D -- external/remotejdk11_linux/bin/java -Xverify:none -XX:+UseParallelOldGC -XX:-CompactStrings '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED' '--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' '--patch-module=java.compiler=external/remote_java_tools_linux/java_tools/java_compiler.jar' '--patch-module=jdk.compiler=external/remote_java_tools_linux/java_tools/jdk_compiler.jar' '--add-opens=java.base/java.nio=ALL-UNNAMED' '--add-opens=java.base/java.lang=ALL-UNNAMED' -jar external/remote_java_tools_linux/java_tools/turbine_direct_binary_deploy.jar --output bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/libonos-protocols-p4runtime-proto-native-hjar.jar --output_deps bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/libonos-protocols-p4runtime-proto-native-hjar.jdeps --temp_dir bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/_javac/onos-protocols-p4runtime-proto-native/libonos-protocols-p4runtime-proto-native-hjar_temp --bootclasspath bazel-out/k8-fastbuild/bin/external/bazel_tools/tools/jdk/platformclasspath.jar --source_jars bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/onos-protocols-p4runtime-proto-java-grpc__do_not_reference__srcjar.srcjar bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/bazel-out/k8-fastbuild/bin/external/com_github_p4lang_p4runtime/p4info_proto-speed.srcjar bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/bazel-out/k8-fastbuild/bin/external/com_github_p4lang_p4runtime/p4types_proto-speed.srcjar bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/bazel-out/k8-fastbuild/bin/external/com_github_p4lang_p4runtime/p4data_proto-speed.srcjar bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/bazel-out/k8-fastbuild/bin/external/com_github_p4lang_p4runtime/p4runtime_proto-speed.srcjar bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/bazel-out/k8-fastbuild/bin/external/com_github_p4lang_pi/p4config_proto-speed.srcjar --javacopts -source 8 -target 8 '-XDskipDuplicateBridges=true' -g -parameters -XepDisableAllChecks -- --target_label //protocols/p4runtime/proto:onos-protocols-p4runtime-proto-native --classpath bazel-out/k8-fastbuild/bin/external/com_google_protobuf/libprotobuf_java-hjar.jar external/com_google_guava_guava/guava-22.0.jar bazel-out/k8-fastbuild/bin/external/io_grpc_grpc_java/core/libcore-hjar.jar bazel-out/k8-fastbuild/bin/external/io_grpc_grpc_java/stub/libstub-hjar.jar bazel-out/k8-fastbuild/bin/external/io_grpc_grpc_java/protobuf/libprotobuf-hjar.jar external/com_google_api_grpc_proto_google_common_protos/proto-google-common-protos-1.12.0.jar --nojavac_fallback): linux-sandbox failed: error executing command
  (cd /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/39/execroot/org_onosproject_onos && \
  exec env - \
    LC_CTYPE=en_US.UTF-8 \
    PATH=/bin:/usr/bin \
    TMPDIR=/tmp \
  /home/stack/.cache/bazel/_bazel_stack/install/6d3fb10895e05e30e7c0d70ff072919e/_embedded_binaries/linux-sandbox -t 15 -w /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/39/execroot/org_onosproject_onos -w /tmp -w /dev/shm -D -- external/remotejdk11_linux/bin/java -Xverify:none -XX:+UseParallelOldGC -XX:-CompactStrings '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED' '--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' '--patch-module=java.compiler=external/remote_java_tools_linux/java_tools/java_compiler.jar' '--patch-module=jdk.compiler=external/remote_java_tools_linux/java_tools/jdk_compiler.jar' '--add-opens=java.base/java.nio=ALL-UNNAMED' '--add-opens=java.base/java.lang=ALL-UNNAMED' -jar external/remote_java_tools_linux/java_tools/turbine_direct_binary_deploy.jar --output bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/libonos-protocols-p4runtime-proto-native-hjar.jar --output_deps bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/libonos-protocols-p4runtime-proto-native-hjar.jdeps --temp_dir bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/_javac/onos-protocols-p4runtime-proto-native/libonos-protocols-p4runtime-proto-native-hjar_temp --bootclasspath bazel-out/k8-fastbuild/bin/external/bazel_tools/tools/jdk/platformclasspath.jar --source_jars bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/onos-protocols-p4runtime-proto-java-grpc__do_not_reference__srcjar.srcjar bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/bazel-out/k8-fastbuild/bin/external/com_github_p4lang_p4runtime/p4info_proto-speed.srcjar bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/bazel-out/k8-fastbuild/bin/external/com_github_p4lang_p4runtime/p4types_proto-speed.srcjar bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/bazel-out/k8-fastbuild/bin/external/com_github_p4lang_p4runtime/p4data_proto-speed.srcjar bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/bazel-out/k8-fastbuild/bin/external/com_github_p4lang_p4runtime/p4runtime_proto-speed.srcjar bazel-out/k8-fastbuild/bin/protocols/p4runtime/proto/bazel-out/k8-fastbuild/bin/external/com_github_p4lang_pi/p4config_proto-speed.srcjar --javacopts -source 8 -target 8 '-XDskipDuplicateBridges=true' -g -parameters -XepDisableAllChecks -- --target_label //protocols/p4runtime/proto:onos-protocols-p4runtime-proto-native --classpath bazel-out/k8-fastbuild/bin/external/com_google_protobuf/libprotobuf_java-hjar.jar external/com_google_guava_guava/guava-22.0.jar bazel-out/k8-fastbuild/bin/external/io_grpc_grpc_java/core/libcore-hjar.jar bazel-out/k8-fastbuild/bin/external/io_grpc_grpc_java/stub/libstub-hjar.jar bazel-out/k8-fastbuild/bin/external/io_grpc_grpc_java/protobuf/libprotobuf-hjar.jar external/com_google_api_grpc_proto_google_common_protos/proto-google-common-protos-1.12.0.jar --nojavac_fallback)
src/main/tools/linux-sandbox.cc:154: linux-sandbox-pid1 has PID 29529
src/main/tools/linux-sandbox-pid1.cc:175: working dir: /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/39/execroot/org_onosproject_onos
src/main/tools/linux-sandbox-pid1.cc:194: writable: /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/39/execroot/org_onosproject_onos


thanks,
devesh

devesh...@gmail.com

unread,
Jun 11, 2019, 9:31:50 AM6/11/19
to ONOS Developers, aggarwala...@gmail.com, ramon.c...@gmail.com, t...@opennetworking.org, laszl...@hubersuhner.com, devesh...@gmail.com
Hi all,

After doing some changes , I am getting this error. Did know what is wrong?

ERROR: /home/stack/Devesh/onos/web/gui2-fw-lib/BUILD:168:1: NodeJS npm install //web/gui2-fw-lib:onos-gui2-fw-npm-install failed (Exit 1) linux-sandbox failed: error executing command

(cd /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/21/execroot/org_onosproject_onos && \

  exec env - \

    PATH=/bin:/usr/bin \

    TMPDIR=/tmp \

  /home/stack/.cache/bazel/_bazel_stack/install/6d3fb10895e05e30e7c0d70ff072919e/_embedded_binaries/linux-sandbox -t 15 -w /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/21/execroot/org_onosproject_onos -w /tmp -w /dev/shm -D -- /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh;  ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=external/nodejs/bin/npm && export PATH=$ROOT/$(dirname ${NPM}):$PATH && npm -v > $ROOT/bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-npm-install.log 2>&1 && cd web/gui2-fw-lib &&  npm $NPM_ARGS install --no-cache >> $ROOT/bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-npm-install.log 2>&1 && jar Mcf $ROOT/bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-npm-install.jar node_modules && touch $ROOT/bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-npm-install.log'): linux-sandbox failed: error executing command

  (cd /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/21/execroot/org_onosproject_onos && \

  exec env - \

    PATH=/bin:/usr/bin \

    TMPDIR=/tmp \

  /home/stack/.cache/bazel/_bazel_stack/install/6d3fb10895e05e30e7c0d70ff072919e/_embedded_binaries/linux-sandbox -t 15 -w /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/21/execroot/org_onosproject_onos -w /tmp -w /dev/shm -D -- /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh;  ROOT=`pwd` && export HOME=. && export XDG_CONFIG_HOME=bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/config && export BABEL_DISABLE_CACHE=1 && if [[ ! -z ${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi && NPM=external/nodejs/bin/npm && export PATH=$ROOT/$(dirname ${NPM}):$PATH && npm -v > $ROOT/bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-npm-install.log 2>&1 && cd web/gui2-fw-lib &&  npm $NPM_ARGS install --no-cache >> $ROOT/bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-npm-install.log 2>&1 && jar Mcf $ROOT/bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-npm-install.jar node_modules && touch $ROOT/bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-npm-install.log')

src/main/tools/linux-sandbox.cc:154: linux-sandbox-pid1 has PID 2136

src/main/tools/linux-sandbox-pid1.cc:175: working dir: /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/21/execroot/org_onosproject_onos

src/main/tools/linux-sandbox-pid1.cc:194: writable: /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/21/execroot/org_onosproject_onos

Sean Condon

unread,
Jun 11, 2019, 9:33:04 AM6/11/19
to devesh...@gmail.com, ONOS Developers, Ankur Aggarwal, ramon.c...@gmail.com, Thomas Vachuska, laszl...@hubersuhner.com
Are you running behind a firewall - "npm install" is trying to run but failing

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.

To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.

devesh...@gmail.com

unread,
Jun 11, 2019, 10:15:34 AM6/11/19
to ONOS Developers, devesh...@gmail.com, aggarwala...@gmail.com, ramon.c...@gmail.com, t...@opennetworking.org, laszl...@hubersuhner.com
Hi sean,

I am not sure about npm install but I have tried building onos after installing npm. Also, i tried after removing it. It didnt workout both time.

Thanks,
Devesh

Sean Condon

unread,
Jun 11, 2019, 10:23:28 AM6/11/19
to devesh...@gmail.com, ONOS Developers, Ankur Aggarwal, ramon.c...@gmail.com, Thomas Vachuska, laszl...@hubersuhner.com
Installing it yourself won't have any effect - the Bazel build will try to pull it from the web - hence the question about proxy

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.

devesh...@gmail.com

unread,
Jun 12, 2019, 5:03:21 AM6/12/19
to ONOS Developers, devesh...@gmail.com, aggarwala...@gmail.com, ramon.c...@gmail.com, t...@opennetworking.org, laszl...@hubersuhner.com
Hi sean,

no i am not working behind any proxy. Though this time i deleted the buck-out folder which i think created when i tried buck building. Now, its reaching upto certain point and then, getting stuck. here is the last line where it is stuck.

[2,347 / 2,354] Executing genrule //web/gui:_onos-gui-npm-install; 15236s linux-sandbox

Thanks,
Devesh

Sean Condon

unread,
Jun 12, 2019, 5:49:04 AM6/12/19
to devesh...@gmail.com, ONOS Developers, Ankur Aggarwal, ramon.c...@gmail.com, Thomas Vachuska, laszl...@hubersuhner.com
There was a comment on something like this in the groups last week


--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.

devesh...@gmail.com

unread,
Jun 12, 2019, 9:46:01 AM6/12/19
to ONOS Developers, devesh...@gmail.com, aggarwala...@gmail.com, ramon.c...@gmail.com, t...@opennetworking.org, laszl...@hubersuhner.com
Hi sean,

I followed the steps given by you and found that npm was failing. then i checked npm-install.out and found this :

npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/stack/.cache/bazel/_bazel_stack/8768f012864786bba03af85ab03e2f26/sandbox/linux-sandbox/1/execroot/org_onosproject_onos/tools/gui/false/_logs/2019-06-12T11_21_59_567Z-debug.log

 I am not behind a proxy.... 

Thanks,
Devesh

Sean Condon

unread,
Jun 12, 2019, 10:14:21 AM6/12/19
to devesh...@gmail.com, ONOS Developers, Ankur Aggarwal, ramon.c...@gmail.com, Thomas Vachuska, laszl...@hubersuhner.com
It says
npm ERR! network This is a problem related to network connectivity.

you should see if you can reach the web from this build machine

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.

devesh...@gmail.com

unread,
Jun 13, 2019, 1:59:06 AM6/13/19
to ONOS Developers, devesh...@gmail.com, aggarwala...@gmail.com, ramon.c...@gmail.com, t...@opennetworking.org, laszl...@hubersuhner.com
Hi sean,

I was able to build //web/gui:_onos-gui-npm-install successfully but now, its showing errors in //web/gui2-fw-lib:onos-gui2-fw-npm-install . I am posting onos-gui2-npm-install.log here and also, it is able to get onos-gui2-npm-install.jar.


5.6.0
npm WARN @ngtools/web...@6.0.8 requires a peer of typescript@~2.4.0 || ~2.5.0 || ~2.6.0 || ~2.7.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng-pa...@3.0.6 requires a peer of @angular/compiler@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng-pa...@3.0.6 requires a peer of @angular/compiler-cli@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN tsi...@0.33.1 requires a peer of types...@3.1.3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

up to date in 12.588s

Thanks ,
Devesh

Sean Condon

unread,
Jun 13, 2019, 7:28:24 AM6/13/19
to devesh...@gmail.com, ONOS Developers, Ankur Aggarwal, ramon.c...@gmail.com, Thomas Vachuska, laszl...@hubersuhner.com
is there an "npm" installed on your system already, and in your PATH? It might be taking precedence over the npm in this installation. It also might be worth doing "bazel clean" and building again

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.

devesh...@gmail.com

unread,
Jun 13, 2019, 10:07:33 AM6/13/19
to ONOS Developers, devesh...@gmail.com, aggarwala...@gmail.com, ramon.c...@gmail.com, t...@opennetworking.org, laszl...@hubersuhner.com
Hi Sean,

I had already removed npm from my machine and yes it build succesfully after bazel clean --expunge.

Thanks,
Devesh

Sean Condon

unread,
Jun 16, 2019, 9:06:41 AM6/16/19
to Ankur Aggarwal, ONOS Developers, ramon.c...@gmail.com, Thomas Vachuska, laszl...@hubersuhner.com
Hi Ankur

I'm surprised you're still having problems with this.

There was a message a couple of weeks ago about some error on web/gui building. 
Kieran found that bzip2 was required for the install.

Also see the message from Devesh at

He did "bazel clean --expunge" and after that the build worked.

To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.

To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.

aggarwala...@gmail.com

unread,
Jun 16, 2019, 9:15:11 AM6/16/19
to ONOS Developers, aggarwala...@gmail.com, ramon.c...@gmail.com, t...@opennetworking.org, laszl...@hubersuhner.com
Hi,


Since the problem is solved, you can mark this as completed. Sorry, I did not post this on this thread earlier.

Best Regards,
Ankur

On Sunday, June 16, 2019 at 6:36:41 PM UTC+5:30, Sean Condon wrote:
Hi Ankur

I'm surprised you're still having problems with this.

There was a message a couple of weeks ago about some error on web/gui building. 
Kieran found that bzip2 was required for the install.

Also see the message from Devesh at

He did "bazel clean --expunge" and after that the build worked.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages