thatmattlove / hyperglass

hyperglass is the network looking glass that tries to make the internet better.
https://hyperglass.dev
BSD 3-Clause Clear License
647 stars 104 forks source link

Error Building UI #111

Closed MrFloffy closed 3 years ago

MrFloffy commented 3 years ago

Hi everyone,

I hope you are well.

When i running hyperglass build-ui i have this error: [ERROR] 20210128 15:04:12 | hyperglass.util:648 | build_frontend → 90 second timeout exceeded while building UI ❌ Error building UI: 90 second timeout exceeded while building UI

Expected behavior

I would like to can run hyperglass build-ui without errors

Steps to Reproduce

  1. sudo apt install -y python3.6-dev
  2. sudo apt install python3-pip
  3. curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
  4. curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
  5. echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
  6. sudo apt update
  7. sudo apt install -y nodejs yarn redis-server
  8. sudo systemctl enable redis-server
  9. sudo systemctl restart redis-server
  10. pip3 install hyperglass
  11. hyperglass setup [?] Choose a directory for hyperglass: /Users/ml/hyperglass /home/user/hyperglass

    /etc/hyperglass

  12. hyperglass build-ui

Logs

root@hyperglass:~# hyperglass build-ui
[INFO] 20210128 15:02:36 | hyperglass.configuration.main:44 | <module> → Configuration directory: /etc/hyperglass
[WARNING] 20210128 15:02:36 | hyperglass.configuration.main:73 | _check_config_files → '/etc/hyperglass/hyperglass.yaml' was not found, but is not required to run hyperglass. Defaults will be used.
[WARNING] 20210128 15:02:36 | hyperglass.configuration.main:73 | _check_config_files → '/etc/hyperglass/commands.yaml' was not found, but is not required to run hyperglass. Defaults will be used.
[DEBUG] 20210128 15:02:36 | hyperglass.log:75 | set_log_level → Debugging enabled
[DEBUG] 20210128 15:02:36 | hyperglass.configuration.main:124 | <module> → Unvalidated configuration from None: {}
[DEBUG] 20210128 15:02:36 | hyperglass.configuration.main:137 | <module> → Unvalidated commands from None: {}
[DEBUG] 20210128 15:02:36 | hyperglass.configuration.main:142 | <module> → Unvalidated devices from /etc/hyperglass/devices.yaml: {'routers': [{'name': 'jun-edge-mi1', 'address': '10.255.255.250', 'network': {'name': 'production', 'display_name': 'AS21559'}, 'credential': {'username': 'osnetread', 'password': '0Sn@it4o4o'}, 'display_name': 'Miami, FL', 'port': 22, 'nos': 'junos', 'vrfs': [{'name': 'default', 'ipv4': {'source_address': '172.16.9.100'}}]}]}
[DEBUG] 20210128 15:02:37 | hyperglass.log:118 | enable_file_logging → Logging to /tmp/hyperglass.log enabled
Starting new UI build...
[DEBUG] 20210128 15:02:37 | hyperglass.util:343 | 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': True, 'scripts': {'lint': 'eslint . --ext .ts --ext .tsx', 'dev': 'node nextdev', 'start': 'next start', 'typecheck': 'tsc --noEmit', 'format': 'prettier -c .', 'clean': 'rimraf --no-glob ./.next ./out', 'check:es:export': "es-check es5 './out/**/*.js' -v", 'check:es:build': "es-check es5 './.next/static/**/*.js' -v", 'build': 'next build && next export -o ../hyperglass/static/ui'}, 'browserslist': '> 0.25%, not dead', 'dependencies': {'@chakra-ui/react': '^1.1.6', '@emotion/react': '^11.1.4', '@emotion/styled': '^11.0.0', '@hookform/resolvers': '^1.2.0', '@hookstate/core': '^3.0.3', '@hookstate/persistence': '^3.0.0', '@meronex/icons': '^4.0.0', 'color2k': '^1.1.1', 'dayjs': '^1.8.25', 'framer-motion': '^3.2.2-rc.1', 'lodash': '^4.17.15', 'next': '^10.0.5', 'react': '^17.0.1', 'react-countdown': '^2.2.1', 'react-device-detect': '^1.15.0', 'react-dom': '^17.0.1', 'react-fast-compare': '^3.2.0', 'react-flow-renderer': '^8.2.3', 'react-ga': '^3.3.0', 'react-hook-form': '^6.14.2', 'react-markdown': '^5.0.3', 'react-query': '^3.6.0', 'react-select': '^3.1.1', 'react-table': '^7.6.2', 'string-format': '^2.0.0', 'yup': '^0.32.8'}, 'devDependencies': {'@hookstate/devtools': '^3.0.0', '@types/node': '^14.14.17', '@types/react': '^17.0.0', '@types/react-select': '^3.0.28', '@types/react-table': '^7.0.25', '@types/string-format': '^2.0.0', '@types/yup': '^0.29.9', '@typescript-eslint/eslint-plugin': '^4.11.1', '@typescript-eslint/parser': '^4.11.1', '@upstatement/eslint-config': '^0.4.3', '@upstatement/prettier-config': '^0.3.0', 'babel-eslint': '^10.1.0', 'eslint': '^6.8.0', 'eslint-config-prettier': '^7.1.0', 'eslint-config-react-app': '^5.2.0', 'eslint-import-resolver-typescript': '^2.3.0', 'eslint-plugin-import': '^2.22.1', 'eslint-plugin-jest': '^24.1.3', 'eslint-plugin-json': '^2.1.2', 'eslint-plugin-jsx-a11y': '^6.2.3', 'eslint-plugin-prettier': '^3.3.0', 'eslint-plugin-react': '^7.22.0', 'eslint-plugin-react-hooks': '^4.2.0', 'express': '^4.17.1', 'http-proxy-middleware': '0.20.0', 'onchange': '^7.1.0', 'prettier': '^2.2.1', 'prettier-eslint': '^12.0.0', 'typescript': '^4.0.3'}}
[DEBUG] 20210128 15:02:37 | hyperglass.util:555 | build_frontend → node_modules is already initialized
colinear!
colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
colinear!
colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
colinear!
colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
colinear!
colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
colinear!
colinear!
x_order_2: colinear!
x_order_2: colinear!
colinear!
colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
colinear!
colinear!
colinear!
colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
x_order_2: colinear!
[DEBUG] 20210128 15:02:39 | hyperglass.util:577 | build_frontend → Generated 21 favicons
[INFO] 20210128 15:02:39 | hyperglass.util:609 | build_frontend → Starting UI build...
[DEBUG] 20210128 15:02:39 | hyperglass.util:611 | build_frontend → Created temporary UI config file: '/tmp/hyperglass_25uq_6az.json' for build f36ced46a044ae875e51ac378759c1fb5002bdf9c7bed524e5d9d2633233e16b
[ERROR] 20210128 15:04:12 | hyperglass.util:648 | build_frontend → 90 second timeout exceeded while building UI
❌ Error building UI: 90 second timeout exceeded while building UI

Environment

Server

Metric Value
hyperglass Version 1.0.0-beta.74
hyperglass Path /etc/hyperglass
Python Version 3.6.9
Platform Info Linux-4.15.0-135-generic-x86_64-with-Ubuntu-18.04-bionic
CPU Info Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz
Logical Cores 8
Physical Cores 8
Processor Speed 2.2GHz
Total Memory 8.36 GB
Memory Utilization 5.1%
Total Disk Space 19.94 GB
Disk Utilization 42.6%

Client

No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.5 LTS Release: 18.04 Codename: bionic

thatmattlove commented 3 years ago

Hey there,

Give v1.0.0-beta.75 a try. If you still get the same results, try adding the new --timeout flag with a value above 180. For example, build-ui --timeout 600.

MrFloffy commented 3 years ago

Thanks!! After trying v1.0.0-beta.75 i can build without problems.