herlesupreeth / docker_open5gs

Docker files to run open5gs + IMS + eNB + gNB + NR-UE in a docker
BSD 2-Clause "Simplified" License
305 stars 171 forks source link

docker build failed in step 6 #49

Closed myonlystarWang closed 3 years ago

myonlystarWang commented 3 years ago

Hi, I have tried the installation with in a Ubuntu18.04 VM.But I met some error in STEP 6

Step 6/21 : RUN git clone --recursive https://hub.fastgit.org/open5gs/open5gs && cd open5gs &&     git checkout main && meson build --prefix=`pwd`/install &&     ninja -C build && cd build && ninja install
 ---> Running in 7b364147c2b9
Cloning into 'open5gs'...
Already on 'main'
Your branch is up to date with 'origin/main'.
The Meson build system
Version: 0.53.2
Source dir: /open5gs
Build dir: /open5gs/build
Build type: native build
Project name: open5gs
Project version: 2.3.2
C compiler for the host machine: cc (gcc 9.3.0 "cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0")
C linker for the host machine: cc ld.bfd 2.34
C++ compiler for the host machine: c++ (gcc 9.3.0 "c++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0")
C++ linker for the host machine: c++ ld.bfd 2.34
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program git found: YES (/usr/bin/git)
Program python3 found: YES (/usr/bin/python3)
Program /usr/bin/python3 found: YES (/usr/bin/python3)
Compiler for C supports arguments -Wextra: YES
Compiler for C supports arguments -Wlogical-op: YES
Compiler for C supports arguments -Werror=missing-include-dirs: YES
Compiler for C supports arguments -Werror=pointer-arith: YES
Compiler for C supports arguments -Werror=init-self: YES
Compiler for C supports arguments -Wfloat-equal: YES
Compiler for C supports arguments -Wsuggest-attribute=noreturn: YES
Compiler for C supports arguments -Werror=missing-prototypes: YES
Compiler for C supports arguments -Werror=missing-declarations: YES
Compiler for C supports arguments -Werror=implicit-function-declaration: YES
Compiler for C supports arguments -Werror=return-type: YES
Compiler for C supports arguments -Werror=incompatible-pointer-types: YES
Compiler for C supports arguments -Werror=format=2: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wredundant-decls: YES
Compiler for C supports arguments -Wimplicit-fallthrough=5: YES
Compiler for C supports arguments -Wendif-labels: YES
Compiler for C supports arguments -Wstrict-aliasing=3: YES
Compiler for C supports arguments -Wwrite-strings: YES
Compiler for C supports arguments -Werror=overflow: YES
Compiler for C supports arguments -Werror=shift-count-overflow: YES
Compiler for C supports arguments -Werror=shift-overflow=2: YES
Compiler for C supports arguments -Wdate-time: YES
Compiler for C supports arguments -Wnested-externs: YES
Compiler for C supports arguments -Wunused: YES
Compiler for C supports arguments -Wduplicated-branches: YES
Compiler for C supports arguments -Wmisleading-indentation: YES
Compiler for C supports arguments -Wno-sign-compare -Wsign-compare: YES
Compiler for C supports arguments -Wno-unused-parameter -Wunused-parameter: YES
Compiler for C supports arguments -ffast-math: YES
Compiler for C supports arguments -fdiagnostics-show-option: YES
Compiler for C supports arguments -fstack-protector: YES
Compiler for C supports arguments -fstack-protector-strong: YES
Compiler for C supports arguments --param=ssp-buffer-size=4: YES
meson.build:108: WARNING: Consider using the built-in warning_level option instead of using "-Wextra".
Configuring sample.yaml using configuration
Configuring 310014.yaml using configuration
Configuring csfb.yaml using configuration
Configuring volte.yaml using configuration
Configuring vonr.yaml using configuration
Configuring slice.yaml using configuration
Configuring srslte.yaml using configuration
WARNING: Output file "configs/sample.yaml" for configure_file() at configs/meson.build:49 overwrites configure_file() output at configs/meson.build:49
Configuring sample.yaml using configuration
Configuring non3gpp.yaml using configuration
Program /usr/bin/python3 found: YES (/usr/bin/python3)
Configuring mme.yaml using configuration
Configuring sgwc.yaml using configuration
Configuring sgwu.yaml using configuration
Configuring smf.yaml using configuration
Configuring amf.yaml using configuration
Configuring upf.yaml using configuration
Configuring hss.yaml using configuration
Configuring pcrf.yaml using configuration
Configuring nrf.yaml using configuration
Configuring ausf.yaml using configuration
Configuring udm.yaml using configuration
Configuring udr.yaml using configuration
Configuring pcf.yaml using configuration
Configuring nssf.yaml using configuration
Configuring bsf.yaml using configuration
Program /usr/bin/python3 found: YES (/usr/bin/python3)
Configuring mme.conf using configuration
Configuring hss.conf using configuration
Configuring smf.conf using configuration
Configuring pcrf.conf using configuration
Configuring cacert.pem using configuration
Configuring mme.cert.pem using configuration
Configuring mme.key.pem using configuration
Configuring hss.cert.pem using configuration
Configuring hss.key.pem using configuration
Configuring smf.cert.pem using configuration
Configuring smf.key.pem using configuration
Configuring pcrf.cert.pem using configuration
Configuring pcrf.key.pem using configuration
Configuring open5gs-mmed.service using configuration
Configuring open5gs-sgwcd.service using configuration
Configuring open5gs-smfd.service using configuration
Configuring open5gs-amfd.service using configuration
Configuring open5gs-sgwud.service using configuration
Configuring open5gs-upfd.service using configuration
Configuring open5gs-hssd.service using configuration
Configuring open5gs-pcrfd.service using configuration
Configuring open5gs-nrfd.service using configuration
Configuring open5gs-ausfd.service using configuration
Configuring open5gs-udmd.service using configuration
Configuring open5gs-pcfd.service using configuration
Configuring open5gs-nssfd.service using configuration
Configuring open5gs-bsfd.service using configuration
Configuring open5gs-udrd.service using configuration
Configuring 99-open5gs.netdev using configuration
Configuring 99-open5gs.network using configuration
Configuring open5gs using configuration
Configuring open5gs.conf using configuration
Has header "arpa/inet.h" : YES
Has header "ctype.h" : YES
Has header "errno.h" : YES
Has header "execinfo.h" : YES
Has header "fcntl.h" : YES
Has header "ifaddrs.h" : YES
Has header "netdb.h" : YES
Has header "pthread.h" : YES
Has header "signal.h" : YES
Has header "stdarg.h" : YES
Has header "stddef.h" : YES
Has header "stdio.h" : YES
Has header "stdint.h" : YES
Has header "stdbool.h" : YES
Has header "stdlib.h" : YES
Has header "string.h" : YES
Has header "strings.h" : YES
Has header "time.h" : YES
Has header "sys/time.h" : YES
Has header "unistd.h" : YES
Has header "net/if.h" : YES
Has header "netinet/in.h" : YES
Has header "netinet/in_systm.h" : YES
Has header "netinet/udp.h" : YES
Has header "netinet/tcp.h" : YES
Has header "sys/ioctl.h" : YES
Has header "sys/param.h" : YES
Has header "sys/random.h" : YES
Has header "sys/socket.h" : YES
Has header "sys/stat.h" : YES
Has header "limits.h" : YES
Has header "sys/syslimits.h" : NO
Has header "sys/types.h" : YES
Has header "sys/wait.h" : YES
Has header "sys/uio.h" : YES
Checking for function "arc4random" : NO
Checking for function "arc4random_buf" : NO
Checking for function "getrandom" : YES
Checking for function "localtime_r" : YES
Checking for function "getifaddrs" : YES
Checking for function "getenv" : YES
Checking for function "putenv" : YES
Checking for function "setenv" : YES
Checking for function "unsetenv" : YES
Checking for function "strerror_r" : YES
Checking for function "sigaction" : YES
Checking for function "sigwait" : YES
Checking for function "sigsuspend" : YES
Checking for function "eventfd" : YES
Checking for function "kqueue" : NO
Checking for function "epoll_ctl" : YES
Run-time dependency threads found: YES
Header <pthread.h> has symbol "pthread_barrier_wait" : YES
Header <signal.h> has symbol "sys_siglist" : YES
Checking if "strerror_r() returns char *" compiles: YES
Library execinfo found: NO
Checking for function "backtrace" : YES
Checking if "clock_gettime()" links: YES
Checking if "eventfd(2) system call" links: YES
Library socket found: NO
Checking if "socket()" links: YES
Configuring core-config-private.h using configuration
Configuring core-config.h using configuration
Compiler for C supports arguments -Wno-shift-negative-value -Wshift-negative-value: YES
Compiler for C supports arguments -Wno-unused-but-set-variable -Wunused-but-set-variable: YES
Compiler for C supports arguments -Wno-unknown-warning-option -Wunknown-warning-option: NO
Cloning into 'freeDiameter'...
fatal: unable to access 'https://github.com/open5gs/freeDiameter.git/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mesonbuild/mesonmain.py", line 129, in run
    return options.run_func(options)
  File "/usr/lib/python3/dist-packages/mesonbuild/msetup.py", line 245, in run
    app.generate()
  File "/usr/lib/python3/dist-packages/mesonbuild/msetup.py", line 159, in generate
    self._generate(env)
  File "/usr/lib/python3/dist-packages/mesonbuild/msetup.py", line 192, in _generate
    intr.run()
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreter.py", line 4167, in run
    super().run()
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 412, in run
    self.evaluate_codeblock(self.ast, start=1)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 436, in evaluate_codeblock
    raise e
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 430, in evaluate_codeblock
    self.evaluate_statement(cur)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 441, in evaluate_statement
    return self.function_call(cur)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 788, in function_call
    return func(node, posargs, kwargs)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 285, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 174, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreter.py", line 3689, in func_subdir
    self.evaluate_codeblock(codeblock)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 436, in evaluate_codeblock
    raise e
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 430, in evaluate_codeblock
    self.evaluate_statement(cur)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 441, in evaluate_statement
    return self.function_call(cur)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 788, in function_call
    return func(node, posargs, kwargs)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 285, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 174, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreter.py", line 3689, in func_subdir
    self.evaluate_codeblock(codeblock)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 436, in evaluate_codeblock
    raise e
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 430, in evaluate_codeblock
    self.evaluate_statement(cur)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 441, in evaluate_statement
    return self.function_call(cur)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 788, in function_call
    return func(node, posargs, kwargs)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 285, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 174, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreter.py", line 3689, in func_subdir
    self.evaluate_codeblock(codeblock)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 436, in evaluate_codeblock
    raise e
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 430, in evaluate_codeblock
    self.evaluate_statement(cur)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 443, in evaluate_statement
    return self.assignment(cur)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 1064, in assignment
    value = self.evaluate_statement(node.value)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 441, in evaluate_statement
    return self.function_call(cur)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 788, in function_call
    return func(node, posargs, kwargs)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 285, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 174, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreterbase.py", line 143, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreter.py", line 2540, in func_subproject
    return self.do_subproject(dirname, 'meson', kwargs)
  File "/usr/lib/python3/dist-packages/mesonbuild/interpreter.py", line 2582, in do_subproject
    resolved = r.resolve(dirname, method)
  File "/usr/lib/python3/dist-packages/mesonbuild/wrap/wrap.py", line 187, in resolve
    self.get_git()
  File "/usr/lib/python3/dist-packages/mesonbuild/wrap/wrap.py", line 282, in get_git
    verbose_git(['clone', self.wrap.get('url'), self.directory], self.subdir_root, check=True)
  File "/usr/lib/python3/dist-packages/mesonbuild/wrap/wrap.py", line 62, in verbose_git
    return git(cmd, workingdir, check=check).returncode == 0
  File "/usr/lib/python3/dist-packages/mesonbuild/mesonlib.py", line 61, in git
    pc = subprocess.run([GIT, '-C', workingdir] + cmd,
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/git', '-C', '/open5gs/subprojects', 'clone', 'https://github.com/open5gs/freeDiameter.git', 'freeDiameter']' returned non-zero exit status 128.
Compiler for C supports arguments -Wno-missing-prototypes -Wmissing-prototypes: YES
Compiler for C supports arguments -Wno-missing-declarations -Wmissing-declarations: YES
Compiler for C supports arguments -Wno-discarded-qualifiers -Wdiscarded-qualifiers: YES
Compiler for C supports arguments -Wno-redundant-decls -Wredundant-decls: YES
Compiler for C supports arguments -Wno-shift-overflow -Wshift-overflow: YES
Compiler for C supports arguments -Wno-float-equal -Wfloat-equal: YES
Compiler for C supports arguments -Wno-implicit-fallthrough -Wimplicit-fallthrough: YES
Compiler for C supports arguments -Wno-incompatible-pointer-types-discards-qualifiers -Wincompatible-pointer-types-discards-qualifiers: NO
Compiler for C supports arguments -Wno-format-nonliteral -Wformat-nonliteral: YES
Compiler for C supports arguments -Wno-cpp -Wcpp: YES
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency yaml-0.1 found: YES 0.2.2
Has header "netinet/sctp.h" : YES
Library sctp found: YES
Configuring sctp-config.h using configuration
Run-time dependency libmongoc-1.0 found: YES 1.16.1
Removing intermediate container 7b364147c2b9
The command '/bin/sh -c git clone --recursive https://hub.fastgit.org/open5gs/open5gs && cd open5gs &&     git checkout main && meson build --prefix=`pwd`/install &&     ninja -C build && cd build && ninja install' returned a non-zero code: 2
root@user:/home/user/volte/docker_open5gs/base#

It seems git clone error,I use https://hub.fastgit.org/***.git to download faster than https://github.com/***.git for geographical reasons.So how should I replace this address https://github.com/open5gs/freeDiameter.git? Thanks in advance!

myonlystarWang commented 3 years ago

Update I use VPN to improve the network environment,and execute git clone https://github.com/open5gs/freeDiameter.git in VM,it works fine.

root@user:/home/user# git clone https://github.com/open5gs/freeDiameter
Cloning into 'freeDiameter'...
remote: Enumerating objects: 749, done.
remote: Counting objects: 100% (749/749), done.
remote: Compressing objects: 100% (462/462), done.
remote: Total 749 (delta 288), reused 727 (delta 266), pack-reused 0
Receiving objects: 100% (749/749), 1.24 MiB | 1.86 MiB/s, done.
Resolving deltas: 100% (288/288), done.

But when I execute docker build --no-cache --force-rm -t docker_open5gs . it failed in STEP 6 the same error once agian..

myonlystarWang commented 3 years ago

Hi I resolved this issue. I find a solution for ERRORGnuTLS recv error (-110),that is add 3 commands in Dockfile as below:

RUN apt-get install gnutls-bin
RUN git config --global http.sslVerify false
RUN git config --global http.postBuffer 1048576000

Then the error disappeared.I will continue with the installation and there may be other problems, but this issuecan be closed,thanks.