Bug Description
I don't know what's going on, because I got this to work yesterday, but build-ui will not run successfully.
Expected behavior
hyperglass build-ui will complete without errors.
Steps to Reproduce
I tried this once and couldn't get it to work, but yesterday it worked when I did the same thing on another (I think identical) VM at work, so I deleted this VM and started over. Here are the exact steps I took after installation, pulled from my .bash_history and session logs:
from a fresh install of Centos 7 (minimal ISO):
- configure firewall
yum update -y
- install some things I like to have (nano screen whois traceroute wget open-vm-tools)
yum install centos-release-scl python3-devel rh-python36
python3 --version (shows python 3.6.8)
wget https://rpm.nodesource.com/setup_14.x (executing from curl is never a good idea)
sh setup_14.x
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo
yum -y install epel-release
yum update
yum -y install gcc-c++ make nodejs yarn redis
pip3 install hyperglass (no errors)
useradd -r hyperglass (I will use this user to run hyperglass once all the setup is done - for now it's not used though)
hyperglass setup
cd /etc/hyperglass/
- edit config files (see below for their contents)
hyperglass build-ui (1) (see logs below)
reboot (I remembered I never rebooted after my yum update so I was still using the old kernel)
hyperglass build-ui (2)
cd /usr/local/lib/python3.6/site-packages/hyperglass/ui (since there was no error message - maybe if I run the build more directly I'll get more info?)
20a. top (3) (output taken while running 21)
npm run-script build (4)
cat /root/.npm/_logs/2020-07-18T04_38_24_259Z-debug.log (5)
setenforce 0 (sometimes selinux causes issues)
npm run-script build (6) (I got a different result here, but I'm pretty sure I got this the first time around while selinux was enabled, so I think that's a coincidence. I'm including it anyway because it has a bit more info.)
- give up and type up this bug report
I didn't feel like doing it again but the first time around I also tried running next build by itself and it also got killed due to OOM.
Local Configurations
devices.yaml
---
# Credentials
credentials:
- credential: &credential1
username: *******
password: *******
# Networks
networks:
- network: &net_primary
name: primary
display_name: Main Network
# VRFs
vrfs:
- &vrf_default
name: default
display_name: Global
ipv4:
access_list: &vrf_default_ipv4_acl
- network: 10.0.0.0/8
action: deny
- network: 192.168.0.0/16
action: deny
- network: 172.16.0.0/12
action: deny
- network: 0.0.0.0/0
action: permit
ge: 8
le: 24
ipv6:
access_list: &vrf_default_ipv6_acl
- network: ::/0
action: permit
ge: 32
le: 64
# Routers
routers:
- name: core2_iad4
address: 10.x.x.x
network: *net_primary
credential: *credential1
display_name: core2.iad4
port: 18443
nos: bird
vrfs:
- <<: *vrf_default
ipv4:
source_address: x.x.x.x
access_list: *vrf_default_ipv4_acl
ipv6:
source_address: x:x:x:x::x
access_list: *vrf_default_ipv6_acl
proxy: null
hyperglass.yaml
debug: true
developer_mode: true
primary_asn: "25682"
org_name: "Fork Systems"
site_title: "Fork Systems looking glass"
site_description: "a looking glass for AS25682"
request_timeout: 30
#listen_address: "127.0.0.1"
listen_address: "0.0.0.0"
listen_port: 8080
queries:
bgp_route:
enable: true
bgp_community:
enable: false
bgp_aspath:
enable: false
ping:
enable: true
traceroute:
enable: true
Logs
1:
# hyperglass build-ui
[INFO] 20200718 00:08:38 | hyperglass.configuration:43 | <module> ? Configuration directory: /etc/hyperglass
[DEBUG] 20200718 00:08:38 | hyperglass.log:46 | set_log_level ? Debugging enabled
[DEBUG] 20200718 00:08:38 | hyperglass.configuration:165 | <module> ? Unvalidated configuration from /etc/hyperglass/hyperglass.yaml: <snip>
[DEBUG] 20200718 00:08:38 | hyperglass.configuration:174 | <module> ? Unvalidated commands from /etc/hyperglass/commands.yaml: {}
[DEBUG] 20200718 00:08:38 | hyperglass.configuration:181 | <module> ? Unvalidated devices from /etc/hyperglass/devices.yaml: <snip>
[DEBUG] 20200718 00:08:39 | hyperglass.log:83 | enable_file_logging ? Logging to file enabled
Starting new UI build...
[DEBUG] 20200718 00:08:39 | hyperglass.util:414 | read_package_json ? package.json:
{'name': 'ui', 'version': '1.0.0', 'description': 'UI for hyperglass, the modern network looking glass', 'author': 'Matt Love', 'license': 'BSD-3-Clause-Clear', 'private': False, 'scripts': {'dev': 'node nextdev', 'build': 'next build && next export -o ../hyperglass/static/ui', 'start': 'next start', 'clean': 'rimraf --no-glob ./.next ./out', 'check:es:build': "es-check es5 './.next/static/**/*.js' -v", 'check:es:export': "es-check es5 './out/**/*.js' -v"}, 'browserslist': '> 0.25%, not dead', 'dependencies': {'@chakra-ui/core': '^0.8', '@emotion/core': '^10.0.28', '@emotion/styled': '^10.0.27', '@styled-system/should-forward-prop': '^5.1.5', 'axios': '^0.19.2', 'axios-hooks': '^1.9.0', 'chroma-js': '^2.1.0', 'dayjs': '^1.8.25', 'emotion-theming': '^10.0.27', 'favicons': '^6.1.0', 'framer-motion': '^1.10.0', 'html-to-react': '^1.4.3', 'lodash': '^4.17.15', 'next': '^9.4', 'react': '^16.13.1', 'react-countdown': '^2.2.1', 'react-dom': '^16.13.1', 'react-hook-form': '^5.7', 'react-icons': '^3.9.0', 'react-markdown': '^4.3.1', 'react-select': '^3.0.8', 'react-string-replace': '^0.4.4', 'react-table': '^7.0.4', 'string-format': '^2.0.0', 'styled-system': '^5.1.5', 'tempy': '^0.5.0', 'use-media': '^1.4.0', 'yup': '^0.28.3'}, 'devDependencies': {'@typescript-eslint/eslint-plugin': '^2.24.0', '@typescript-eslint/parser': '^2.24.0', 'babel-eslint': '^10.1.0', 'es-check': '^5.1.0', 'eslint': '^6.8.0', 'eslint-config-airbnb': '^18.1.0', 'eslint-config-prettier': '^6.10.0', 'eslint-config-react-app': '^5.2.0', 'eslint-import-resolver-webpack': '^0.12.1', 'eslint-plugin-flowtype': '^4.6.0', 'eslint-plugin-import': '^2.20.1', 'eslint-plugin-jsx-a11y': '^6.2.3', 'eslint-plugin-prettier': '^3.1.2', 'eslint-plugin-react': '^7.19.0', 'eslint-plugin-react-hooks': '^2.3.0', 'express': '^4.17.1', 'http-proxy-middleware': '0.20.0', 'prettier': '^1.19.1'}, 'eslintConfig': {'parser': 'babel-eslint', 'rules': {'max-len': ['error', 100], 'react/prop-types': 0, 'react/jsx-filename-extension': 0, 'react/jsx-props-no-spreading': 0, 'no-bitwise': 0, 'object-shorthand': 0, 'no-plusplus': 0, 'no-param-reassign': 0, 'no-unused-expressions': 0, 'no-nested-ternary': 0, 'no-underscore-dangle': 0, 'camelcase': 0}, 'extends': ['airbnb', 'prettier', 'prettier/react'], 'env': {'browser': True}, 'settings': {'import/core-modules': ['styled-jsx/css'], 'import/resolver': {'webpack': {'config': 'webpack.config.js'}}}}}
[DEBUG] 20200718 00:08:39 | hyperglass.util:622 | build_frontend ? node_modules has not been initialized. Starting initialization...
? Error building UI:
2:
[INFO] 20200718 00:12:21 | hyperglass.configuration:43 | <module> ? Configuration directory: /etc/hy perglass
[DEBUG] 20200718 00:12:21 | hyperglass.log:46 | set_log_level ? Debugging enabled
[DEBUG] 20200718 00:12:21 | hyperglass.configuration:165 | <module> ? Unvalidated configuration from /etc/hyperglass/hyperglass.yaml: <snip>
[DEBUG] 20200718 00:12:21 | hyperglass.configuration:174 | <module> ? Unvalidated commands from /etc /hyperglass/commands.yaml: {}
[DEBUG] 20200718 00:12:21 | hyperglass.configuration:181 | <module> ? Unvalidated devices from /etc/ hyperglass/devices.yaml: <snip>
[DEBUG] 20200718 00:12:21 | hyperglass.log:83 | enable_file_logging ? Logging to file enabled
Starting new UI build...
[DEBUG] 20200718 00:12:21 | hyperglass.util:414 | read_package_json ? package.json:
{'name': 'ui', 'version': '1.0.0', 'description': 'UI for hyperglass, the modern network looking gla ss', 'author': 'Matt Love', 'license': 'BSD-3-Clause-Clear', 'private': False, 'scripts': {'dev': 'n ode nextdev', 'build': 'next build && next export -o ../hyperglass/static/ui', 'start': 'next start' , 'clean': 'rimraf --no-glob ./.next ./out', 'check:es:build': "es-check es5 './.next/static/**/*.js ' -v", 'check:es:export': "es-check es5 './out/**/*.js' -v"}, 'browserslist': '> 0.25%, not dead', ' dependencies': {'@chakra-ui/core': '^0.8', '@emotion/core': '^10.0.28', '@emotion/styled': '^10.0.27 ', '@styled-system/should-forward-prop': '^5.1.5', 'axios': '^0.19.2', 'axios-hooks': '^1.9.0', 'chr oma-js': '^2.1.0', 'dayjs': '^1.8.25', 'emotion-theming': '^10.0.27', 'favicons': '^6.1.0', 'framer- motion': '^1.10.0', 'html-to-react': '^1.4.3', 'lodash': '^4.17.15', 'next': '^9.4', 'react': '^16.1 3.1', 'react-countdown': '^2.2.1', 'react-dom': '^16.13.1', 'react-hook-form': '^5.7', 'react-icons' : '^3.9.0', 'react-markdown': '^4.3.1', 'react-select': '^3.0.8', 'react-string-replace': '^0.4.4', 'react-table': '^7.0.4', 'string-format': '^2.0.0', 'styled-system': '^5.1.5', 'tempy': '^0.5.0', 'u se-media': '^1.4.0', 'yup': '^0.28.3'}, 'devDependencies': {'@typescript-eslint/eslint-plugin': '^2. 24.0', '@typescript-eslint/parser': '^2.24.0', 'babel-eslint': '^10.1.0', 'es-check': '^5.1.0', 'esl int': '^6.8.0', 'eslint-config-airbnb': '^18.1.0', 'eslint-config-prettier': '^6.10.0', 'eslint-conf ig-react-app': '^5.2.0', 'eslint-import-resolver-webpack': '^0.12.1', 'eslint-plugin-flowtype': '^4. 6.0', 'eslint-plugin-import': '^2.20.1', 'eslint-plugin-jsx-a11y': '^6.2.3', 'eslint-plugin-prettier ': '^3.1.2', 'eslint-plugin-react': '^7.19.0', 'eslint-plugin-react-hooks': '^2.3.0', 'express': '^4 .17.1', 'http-proxy-middleware': '0.20.0', 'prettier': '^1.19.1'}, 'eslintConfig': {'parser': 'babel -eslint', 'rules': {'max-len': ['error', 100], 'react/prop-types': 0, 'react/jsx-filename-extension' : 0, 'react/jsx-props-no-spreading': 0, 'no-bitwise': 0, 'object-shorthand': 0, 'no-plusplus': 0, 'n o-param-reassign': 0, 'no-unused-expressions': 0, 'no-nested-ternary': 0, 'no-underscore-dangle': 0, 'camelcase': 0}, 'extends': ['airbnb', 'prettier', 'prettier/react'], 'env': {'browser': True}, 'se ttings': {'import/core-modules': ['styled-jsx/css'], 'import/resolver': {'webpack': {'config': 'webp ack.config.js'}}}}}
[DEBUG] 20200718 00:12:21 | hyperglass.util:620 | build_frontend ? node_modules is already initializ ed
[INFO] 20200718 00:12:21 | hyperglass.util:654 | build_frontend ? Starting UI build...
[DEBUG] 20200718 00:12:21 | hyperglass.util:656 | build_frontend ? Created temporary UI config file: '/tmp/hyperglass_gkook_u2.json' for build b91c039a4562644192a196189a87d29127b1a6577cb0dd5b2c9efc208 2c6e723
? Error building UI:
Messages:
Creating an optimized production build...
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous prog ram, by visiting the following URL:
https://nextjs.org/telemetry
Errors:
3:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
65 root 20 0 0 0 0 S 100.0 0.0 0:40.07 kswapd0
2268 root 20 0 5082672 801044 0 D 40.3 79.0 1:15.85 node
4:
# npm run-script build
> [email protected] build /usr/local/lib/python3.6/site-packages/hyperglass/ui
> next build && next export -o ../hyperglass/static/ui
Creating an optimized production build ..sh: line 1: 2268 Killed next build
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! [email protected] build: `next build && next export -o ../hyperglass/static/ui`
npm ERR! Exit status 137
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-07-18T04_38_24_259Z-debug.log
5:
# cat /root/.npm/_logs/2020-07-18T04_38_24_259Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run-script', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 info lifecycle [email protected]~build: [email protected]
7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/local/lib/python3.6/site-packages/hyperglass/ui/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
9 verbose lifecycle [email protected]~build: CWD: /usr/local/lib/python3.6/site-packages/hyperglass/ui
10 silly lifecycle [email protected]~build: Args: [ '-c', 'next build && next export -o ../hyperglass/static/ui' ]
11 silly lifecycle [email protected]~build: Returned: code: 137 signal: null
12 info lifecycle [email protected]~build: Failed to exec build script
13 verbose stack Error: [email protected] build: `next build && next export -o ../hyperglass/static/ui`
13 verbose stack Exit status 137
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1051:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid [email protected]
15 verbose cwd /usr/local/lib/python3.6/site-packages/hyperglass/ui
16 verbose Linux 3.10.0-1127.13.1.el7.x86_64
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run-script" "build"
18 verbose node v14.5.0
19 verbose npm v6.14.5
20 error code ELIFECYCLE
21 error errno 137
22 error [email protected] build: `next build && next export -o ../hyperglass/static/ui`
22 error Exit status 137
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 137, true ]
6:
# npm run-script build
> [email protected] build /usr/local/lib/python3.6/site-packages/hyperglass/ui
> next build && next export -o ../hyperglass/static/ui
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/favicon-16x16.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/favicon-32x32.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/android-chrome-36x36.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/android-chrome-48x48.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/android-chrome-72x72.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/android-chrome-96x96.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/android-chrome-144x144.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/android-chrome-192x192.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/android-chrome-256x256.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/android-chrome-384x384.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/android-chrome-512x512.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-icon-57x57.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-icon-60x60.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-icon-72x72.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-icon-76x76.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-icon-114x114.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-icon-120x120.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-icon-144x144.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-icon-152x152.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-icon-167x167.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-icon-180x180.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-icon-1024x1024.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-icon.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-icon-precomposed.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-640x1136.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-750x1334.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-828x1792.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-1125x2436.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-1242x2208.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-1242x2688.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-1536x2048.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-1668x2224.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-1668x2388.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-1136x640.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-2048x2732.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-2160x1620.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-1620x2160.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-1334x750.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-1792x828.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-2436x1125.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-2208x1242.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-2688x1242.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-2048x1536.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-2224x1668.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-2388x1668.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/apple-touch-startup-image-2732x2048.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/coast-228x228.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/firefox_app_60x60.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/firefox_app_128x128.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/firefox_app_512x512.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/mstile-70x70.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/mstile-144x144.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/mstile-150x150.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/mstile-310x150.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/mstile-310x310.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/yandex-browser-50x50.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/manifest.json'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/manifest.webapp'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/browserconfig.xml'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/yandex-browser-manifest.json'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/favicon-48x48.png'
ENOENT: no such file or directory, open '/etc/hyperglass/static/images/favicons/favicon.ico'
Creating an optimized production build .internal/child_process.js:406
throw errnoException(err, 'spawn');
^
Error: spawn ENOMEM
at ChildProcess.spawn (internal/child_process.js:406:11)
at spawn (child_process.js:553:9)
at Object.fork (child_process.js:121:10)
at ChildProcessWorker.initialize (/usr/local/lib/python3.6/site-packages/hyperglass/ui/node_modules/jest-worker/build/workers/ChildProcessWorker.js:137:44)
at ChildProcessWorker.onExit (/usr/local/lib/python3.6/site-packages/hyperglass/ui/node_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)
at ChildProcess.emit (events.js:314:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12) {
errno: -12,
code: 'ENOMEM',
syscall: 'spawn'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `next build && next export -o ../hyperglass/static/ui`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-07-18T04_45_49_229Z-debug.log
Possible Solution
I have absolutely no idea.
Environment
Server
- OS: Centos 7
- Python Version: 3.6.8
- hyperglass Version: 1.0.0-beta.51
this server has 1G of RAM and 1G of swap so it should definitely be able to handle this build.
Bug Description
I don't know what's going on, because I got this to work yesterday, but build-ui will not run successfully.
Expected behavior
hyperglass build-uiwill complete without errors.Steps to Reproduce
I tried this once and couldn't get it to work, but yesterday it worked when I did the same thing on another (I think identical) VM at work, so I deleted this VM and started over. Here are the exact steps I took after installation, pulled from my
.bash_historyand session logs:from a fresh install of Centos 7 (minimal ISO):
yum update -yyum install centos-release-scl python3-devel rh-python36python3 --version(shows python 3.6.8)wget https://rpm.nodesource.com/setup_14.x(executing from curl is never a good idea)sh setup_14.xcurl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repoyum -y install epel-releaseyum updateyum -y install gcc-c++ make nodejs yarn redispip3 install hyperglass(no errors)useradd -r hyperglass(I will use this user to run hyperglass once all the setup is done - for now it's not used though)hyperglass setupcd /etc/hyperglass/hyperglass build-ui(1) (see logs below)reboot(I remembered I never rebooted after myyum updateso I was still using the old kernel)hyperglass build-ui(2)cd /usr/local/lib/python3.6/site-packages/hyperglass/ui(since there was no error message - maybe if I run the build more directly I'll get more info?)20a.
top(3) (output taken while running 21)npm run-script build(4)cat /root/.npm/_logs/2020-07-18T04_38_24_259Z-debug.log(5)setenforce 0(sometimes selinux causes issues)npm run-script build(6) (I got a different result here, but I'm pretty sure I got this the first time around while selinux was enabled, so I think that's a coincidence. I'm including it anyway because it has a bit more info.)I didn't feel like doing it again but the first time around I also tried running
next buildby itself and it also got killed due to OOM.Local Configurations
devices.yaml
hyperglass.yaml
Logs
1:
2:
3:
4:
5:
6:
Possible Solution
I have absolutely no idea.
Environment
Server
this server has 1G of RAM and 1G of swap so it should definitely be able to handle this build.