iotaledger / one-click-tangle

"One Click Tangle" intends to make lives easier to IOTA adopters by providing pre-configured scripts and recipes that allow to deploy IOTA Networks and Nodes "in one click".
MIT License
55 stars 36 forks source link

Private Tangle Explorer Docker Build broken #64

Open dschmag opened 2 years ago

dschmag commented 2 years ago

Bug description

Following the README.md install process the docker build can not be completed due to an error

Docker and docker-compose version

Which version of Docker and docker-compose are you running?

Hardware specification

Steps To reproduce the bug

Explain how the maintainer can reproduce the bug.

  1. follow README.md instructions
  2. execute ./tangle-explorer.sh install

Expected behaviour

docker build shall complete

Actual behaviour

npm install fails

Errors

explorer[chrysalis]$ ./tangle-explorer.sh install
Cloning into './explorer-src'...
remote: Enumerating objects: 7216, done.
remote: Counting objects: 100% (2233/2233), done.
remote: Compressing objects: 100% (672/672), done.
remote: Total 7216 (delta 1684), reused 2039 (delta 1518), pack-reused 4983
Receiving objects: 100% (7216/7216), 6.91 MiB | 5.33 MiB/s, done.
Resolving deltas: 100% (5514/5514), done.
Stopping containers...
[+] Building 1943.9s (9/12)                                                                                                                                                                              
 => [internal] load build definition from Dockerfile                                                                                                                                                0.0s
 => => transferring dockerfile: 703B                                                                                                                                                                0.0s
 => [internal] load .dockerignore                                                                                                                                                                   0.0s
 => => transferring context: 57B                                                                                                                                                                    0.0s
 => [internal] load metadata for docker.io/library/node:16-alpine3.14                                                                                                                               1.3s
 => [1/8] FROM docker.io/library/node:16-alpine3.14@sha256:3bca55259ada636e5fee8f2836aba7fa01fed7afd0652e12773ad44af95868b9                                                                         0.0s
 => [internal] load build context                                                                                                                                                                   0.0s
 => => transferring context: 743.60kB                                                                                                                                                               0.0s
 => CACHED [2/8] RUN apk --no-cache add git curl python3 build-base cmake                                                                                                                           0.0s
 => CACHED [3/8] WORKDIR /usr/src/app                                                                                                                                                               0.0s
 => [4/8] COPY . ./                                                                                                                                                                                 0.1s
 => ERROR [5/8] RUN npm install                                                                                                                                                                  1942.3s
------
 > [5/8] RUN npm install:
#9 1942.2 npm notice 
#9 1942.2 npm notice New patch version of npm available! 8.1.0 -> 8.1.2
#9 1942.2 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.1.2>
#9 1942.2 npm notice Run `npm install -g npm@8.1.2` to update!
#9 1942.2 npm notice 
#9 1942.2 npm ERR! code 1
#9 1942.2 npm ERR! path /usr/src/app/node_modules/zeromq
#9 1942.2 npm ERR! command failed
#9 1942.2 npm ERR! command sh -c node-gyp-build || npm run build:libzmq
#9 1942.2 npm ERR! make: Entering directory '/usr/src/app/node_modules/zeromq/build'
#9 1942.2 npm ERR!   ACTION binding_gyp_libzmq_target_prepare_build zmq/BUILD_SUCCESS
#9 1942.2 npm ERR! make: Leaving directory '/usr/src/app/node_modules/zeromq/build'
#9 1942.2 npm ERR! 
#9 1942.2 npm ERR! > zeromq@5.2.8 build:libzmq
#9 1942.2 npm ERR! > node-gyp rebuild
#9 1942.2 npm ERR! 
#9 1942.2 npm ERR! make: Entering directory '/usr/src/app/node_modules/zeromq/build'
#9 1942.2 npm ERR!   ACTION binding_gyp_libzmq_target_prepare_build zmq/BUILD_SUCCESS
#9 1942.2 npm ERR! make: Leaving directory '/usr/src/app/node_modules/zeromq/build'
#9 1942.2 npm ERR! gyp info it worked if it ends with ok
#9 1942.2 npm ERR! gyp info using node-gyp@8.2.0
#9 1942.2 npm ERR! gyp info using node@16.13.0 | linux | x64
#9 1942.2 npm ERR! gyp info find Python using Python version 3.9.5 found at "/usr/bin/python3"
#9 1942.2 npm ERR! gyp http GET https://unofficial-builds.nodejs.org/download/release/v16.13.0/node-v16.13.0-headers.tar.gz
#9 1942.2 npm ERR! gyp http 200 https://unofficial-builds.nodejs.org/download/release/v16.13.0/node-v16.13.0-headers.tar.gz
#9 1942.2 npm ERR! gyp http GET https://unofficial-builds.nodejs.org/download/release/v16.13.0/SHASUMS256.txt
#9 1942.2 npm ERR! gyp http 200 https://unofficial-builds.nodejs.org/download/release/v16.13.0/SHASUMS256.txt
#9 1942.2 npm ERR! gyp info spawn /usr/bin/python3
#9 1942.2 npm ERR! gyp info spawn args [
#9 1942.2 npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
#9 1942.2 npm ERR! gyp info spawn args   'binding.gyp',
#9 1942.2 npm ERR! gyp info spawn args   '-f',
#9 1942.2 npm ERR! gyp info spawn args   'make',
#9 1942.2 npm ERR! gyp info spawn args   '-I',
#9 1942.2 npm ERR! gyp info spawn args   '/usr/src/app/node_modules/zeromq/build/config.gypi',
#9 1942.2 npm ERR! gyp info spawn args   '-I',
#9 1942.2 npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
#9 1942.2 npm ERR! gyp info spawn args   '-I',
#9 1942.2 npm ERR! gyp info spawn args   '/root/.cache/node-gyp/16.13.0/include/node/common.gypi',
#9 1942.2 npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
#9 1942.2 npm ERR! gyp info spawn args   '-Dvisibility=default',
#9 1942.2 npm ERR! gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/16.13.0',
#9 1942.2 npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
#9 1942.2 npm ERR! gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/16.13.0/<(target_arch)/node.lib',
#9 1942.2 npm ERR! gyp info spawn args   '-Dmodule_root_dir=/usr/src/app/node_modules/zeromq',
#9 1942.2 npm ERR! gyp info spawn args   '-Dnode_engine=v8',
#9 1942.2 npm ERR! gyp info spawn args   '--depth=.',
#9 1942.2 npm ERR! gyp info spawn args   '--no-parallel',
#9 1942.2 npm ERR! gyp info spawn args   '--generator-output',
#9 1942.2 npm ERR! gyp info spawn args   'build',
#9 1942.2 npm ERR! gyp info spawn args   '-Goutput_dir=.'
#9 1942.2 npm ERR! gyp info spawn args ]
#9 1942.2 npm ERR! gyp info spawn make
#9 1942.2 npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
#9 1942.2 npm ERR! Error: read ETIMEDOUT
#9 1942.2 npm ERR!     at TLSWrap.onStreamRead (node:internal/stream_base_commons:220:20) {
#9 1942.2 npm ERR!   errno: -110,
#9 1942.2 npm ERR!   code: 'ETIMEDOUT',
#9 1942.2 npm ERR!   syscall: 'read'
#9 1942.2 npm ERR! }
#9 1942.2 npm ERR! make: *** [libzmq.target.mk:13: zmq/BUILD_SUCCESS] Error 1
#9 1942.2 npm ERR! gyp ERR! build error 
#9 1942.2 npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
#9 1942.2 npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
#9 1942.2 npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
#9 1942.2 npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
#9 1942.2 npm ERR! gyp ERR! System Linux 5.8.0-55-generic
#9 1942.2 npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
#9 1942.2 npm ERR! gyp ERR! cwd /usr/src/app/node_modules/zeromq
#9 1942.2 npm ERR! gyp ERR! node -v v16.13.0
#9 1942.2 npm ERR! gyp ERR! node-gyp -v v8.2.0
#9 1942.2 npm ERR! gyp ERR! not ok 
#9 1942.2 npm ERR! gyp info it worked if it ends with ok
#9 1942.2 npm ERR! gyp info using node-gyp@8.2.0
#9 1942.2 npm ERR! gyp info using node@16.13.0 | linux | x64
#9 1942.2 npm ERR! gyp info find Python using Python version 3.9.5 found at "/usr/bin/python3"
#9 1942.2 npm ERR! gyp info spawn /usr/bin/python3
#9 1942.2 npm ERR! gyp info spawn args [
#9 1942.2 npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
#9 1942.2 npm ERR! gyp info spawn args   'binding.gyp',
#9 1942.2 npm ERR! gyp info spawn args   '-f',
#9 1942.2 npm ERR! gyp info spawn args   'make',
#9 1942.2 npm ERR! gyp info spawn args   '-I',
#9 1942.2 npm ERR! gyp info spawn args   '/usr/src/app/node_modules/zeromq/build/config.gypi',
#9 1942.2 npm ERR! gyp info spawn args   '-I',
#9 1942.2 npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
#9 1942.2 npm ERR! gyp info spawn args   '-I',
#9 1942.2 npm ERR! gyp info spawn args   '/root/.cache/node-gyp/16.13.0/include/node/common.gypi',
#9 1942.2 npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
#9 1942.2 npm ERR! gyp info spawn args   '-Dvisibility=default',
#9 1942.2 npm ERR! gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/16.13.0',
#9 1942.2 npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
#9 1942.2 npm ERR! gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/16.13.0/<(target_arch)/node.lib',
#9 1942.2 npm ERR! gyp info spawn args   '-Dmodule_root_dir=/usr/src/app/node_modules/zeromq',
#9 1942.2 npm ERR! gyp info spawn args   '-Dnode_engine=v8',
#9 1942.2 npm ERR! gyp info spawn args   '--depth=.',
#9 1942.2 npm ERR! gyp info spawn args   '--no-parallel',
#9 1942.2 npm ERR! gyp info spawn args   '--generator-output',
#9 1942.2 npm ERR! gyp info spawn args   'build',
#9 1942.2 npm ERR! gyp info spawn args   '-Goutput_dir=.'
#9 1942.2 npm ERR! gyp info spawn args ]
#9 1942.2 npm ERR! gyp info spawn make
#9 1942.2 npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
#9 1942.2 npm ERR! Error: read ETIMEDOUT
#9 1942.2 npm ERR!     at TLSWrap.onStreamRead (node:internal/stream_base_commons:220:20) {
#9 1942.2 npm ERR!   errno: -110,
#9 1942.2 npm ERR!   code: 'ETIMEDOUT',
#9 1942.2 npm ERR!   syscall: 'read'
#9 1942.2 npm ERR! }
#9 1942.2 npm ERR! make: *** [libzmq.target.mk:13: zmq/BUILD_SUCCESS] Error 1
#9 1942.2 npm ERR! gyp ERR! build error 
#9 1942.2 npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
#9 1942.2 npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
#9 1942.2 npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
#9 1942.2 npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
#9 1942.2 npm ERR! gyp ERR! System Linux 5.8.0-55-generic
#9 1942.2 npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
#9 1942.2 npm ERR! gyp ERR! cwd /usr/src/app/node_modules/zeromq
#9 1942.2 npm ERR! gyp ERR! node -v v16.13.0
#9 1942.2 npm ERR! gyp ERR! node-gyp -v v8.2.0
#9 1942.2 npm ERR! gyp ERR! not ok
#9 1942.3 
#9 1942.3 npm ERR! A complete log of this run can be found in:
#9 1942.3 npm ERR!     /root/.npm/_logs/2021-11-02T16_59_03_962Z-debug.log
------
executor failed running [/bin/sh -c npm install]: exit code: 1
Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 11, in <module>
    load_entry_point('docker-compose==1.25.0', 'console_scripts', 'docker-compose')()
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 72, in main
    command()
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 128, in perform_command
    handler(command, command_options)
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1107, in up
    to_attach = up(False)
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1088, in up
    return self.project.up(
  File "/usr/lib/python3/dist-packages/compose/project.py", line 542, in up
    svc.ensure_image_exists(do_build=do_build, silent=silent, cli=cli)
  File "/usr/lib/python3/dist-packages/compose/service.py", line 350, in ensure_image_exists
    self.build(cli=cli)
  File "/usr/lib/python3/dist-packages/compose/service.py", line 1108, in build
    all_events = list(stream_output(build_output, output_stream))
  File "/usr/lib/python3/dist-packages/compose/progress_stream.py", line 25, in stream_output
    for event in utils.json_stream(output):
  File "/usr/lib/python3/dist-packages/compose/utils.py", line 61, in split_buffer
    for data in stream_as_text(stream):
  File "/usr/lib/python3/dist-packages/compose/utils.py", line 37, in stream_as_text
    for data in stream:
  File "/usr/lib/python3/dist-packages/compose/service.py", line 1816, in build
    with open(iidfile) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp9k16zp2o'
peterokwara commented 2 years ago

I tested on Amazon Linux and there seems to be no problem installing the explorer

jmcanterafonseca-iota commented 2 years ago

it seems to be an error while building the Docker images that some network connection could not be performed

can you double check @dschmag ?

dschmag commented 2 years ago

I fear it is a proxy topic. I've modivied the tangle-explorer.sh script that it does not overwrite do the clone again (I've the latest version) and added the ENV variables for the proxy in the dockerfile. Further I've added RUN npm config set proxy <myproxy>

For me it seems that npm does some shell call

#12 1942.7 npm ERR! command sh -c node-gyp-build || npm run build:libzmq and this has not proxy information :-(