Went to deploy my site, it worked fine earlier today, but has now brought up this error. Anyone have any pointers? New to dealing with websites. I use the blogdown package in R and the theme LoveIt. The repository is on Git, and deploys via Netlify.
9:46:35 PM: ────────────────────────────────────────────────────────────────
9:46:35 PM: 1. build.command from netlify.toml
9:46:35 PM: ────────────────────────────────────────────────────────────────
9:46:35 PM:
9:46:35 PM: $ hugo
9:46:35 PM: Start building sites …
9:46:35 PM: hugo v0.101.0-466fa43c16709b4483689930a4f9ac8add5c9f66+extended linux/amd64 BuildDate=2022-06-16T07:09:16Z VendorInfo=gohugoio
9:46:35 PM: ERROR 2022/08/22 02:46:35 render of "page" failed: "/opt/build/repo/themes/LoveIt/layouts/posts/single.html:41:33": execute of template failed: template: posts/single.html:41:33: executing "content" at <.Params.categories>: range can't iterate over Research
Error: Error building site: failed to render pages: render of "home" failed: "/opt/build/repo/themes/LoveIt/layouts/index.html:36:20": execute of template failed: template: index.html:36:20: executing "content" at <.Render>: error calling Render: "/opt/build/repo/content/posts/mosquito-activity-and-weather/index.en.md:1:1": failed to execute template _default/summary.html: "/opt/build/repo/themes/LoveIt/layouts/_default/summary.html:41:25": execute of template failed: template: _default/summary.html:41:25: executing "_default/summary.html" at <.Params.categories>: range can't iterate over Research
Total in 236 ms
9:46:35 PM:
9:46:35 PM: ────────────────────────────────────────────────────────────────
9:46:35 PM: "build.command" failed
9:46:35 PM: ────────────────────────────────────────────────────────────────
9:46:35 PM:
9:46:35 PM: Error message
9:46:35 PM: Command failed with exit code 255: hugo (https://ntl.fyi/exit-code-255)
9:46:35 PM:
9:46:35 PM: Error location
9:46:35 PM: In build.command from netlify.toml:
9:46:35 PM: hugo
9:46:35 PM:
9:46:35 PM: Resolved config
9:46:35 PM: build:
9:46:35 PM: command: hugo
9:46:35 PM: commandOrigin: config
9:46:35 PM: environment:
9:46:35 PM: - HUGO_VERSION
9:46:35 PM: - NETLIFY_GRAPH_TOKEN
9:46:35 PM: - ONEGRAPH_AUTHLIFY_TOKEN
9:46:35 PM: - HUGO_ENV
9:46:35 PM: publish: /opt/build/repo/public
9:46:35 PM: publishOrigin: config
9:46:36 PM: Caching artifacts
9:46:36 PM: Started saving build plugins
9:46:36 PM: Finished saving build plugins
9:46:36 PM: Started saving pip cache
9:46:36 PM: Finished saving pip cache
9:46:36 PM: Started saving emacs cask dependencies
9:46:36 PM: Finished saving emacs cask dependencies
9:46:36 PM: Started saving maven dependencies
9:46:36 PM: Finished saving maven dependencies
9:46:36 PM: Started saving boot dependencies
9:46:36 PM: Finished saving boot dependencies
9:46:36 PM: Started saving rust rustup cache
9:46:36 PM: Finished saving rust rustup cache
9:46:36 PM: Started saving go dependencies
9:46:36 PM: Finished saving go dependencies
9:46:37 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:46:37 PM: Creating deploy upload records
9:46:37 PM: Failing build: Failed to build site
9:46:37 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
9:46:37 PM: Finished processing build request in 13.962789296s
In R, when I try to deploy the site locally, I get this error:
Launching the server via the command:
C:/Users/12045/AppData/Roaming/Hugo/0.101.0/hugo.exe server --bind 127.0.0.1 -p 4321 --themesDir themes -t LoveIt -D -F --navigateToChanged
Error: Error building site: failed to render pages: render of "home" failed: "C:\Projects\Website\themes\LoveIt\layouts\index.html:36:20": execute of template failed: template: index.html:36:20: executing "content" at <.Render>: error calling Render: "C:\Projects\Website\content\posts\mosquito-activity-and-weather\index.en.md:1:1": failed to execute template _default/summary.html: "C:\Projects\Website\themes\LoveIt\layouts\_default\summary.html:41:25": execute of template failed: template: _default/summary.html:41:25: executing "_default/summary.html" at <.Params.categories>: range can't iterate over Research
In addition: Warning message:
In if (is.na(c3)) vars = c(vars, HUGO_IGNOREERRORS = "error-remote-getjson") :
the condition has length > 1 and only the first element will be used
I am deploying my site on netlify but facing this error so long.
Could it be API error, SSL certificate error or Any build error?
I am not getting the exact issue arises here.
Here is error logs
1:55:08 PM: 2. Build command from Netlify app
1:55:08 PM: ────────────────────────────────────────────────────────────────
1:55:08 PM: $ yarn build
1:55:08 PM: yarn run v1.22.10
1:55:08 PM: $ next build
1:55:09 PM: info - Checking validity of types...
1:55:09 PM: warn - No ESLint configuration detected. Run next lint to begin setup
1:55:09 PM: info - Creating an optimized production build...
1:55:28 PM: info - Compiled successfully
1:55:28 PM: info - Collecting page data...
1:55:31 PM: > Build error occurred
1:55:31 PM: FetchError: request to https://content.wrirk.com/blogs?_sort=createdAt:DESC failed, reason: certificate has expired
1:55:31 PM: at ClientRequest.<anonymous> (/opt/build/repo/node_modules/next/dist/compiled/node-fetch/index.js:1:64142)
1:55:31 PM: at ClientRequest.emit (node:events:527:28)
1:55:31 PM: at TLSSocket.socketErrorListener (node:_http_client:454:9)
1:55:31 PM: at TLSSocket.emit (node:events:527:28)
1:55:31 PM: at emitErrorNT (node:internal/streams/destroy:157:8)
1:55:31 PM: at emitErrorCloseNT (node:internal/streams/destroy:122:3)
1:55:31 PM: at processTicksAndRejections (node:internal/process/task_queues:83:21) {
1:55:31 PM: type: 'system',
1:55:31 PM: errno: 'CERT_HAS_EXPIRED',
1:55:31 PM: code: 'CERT_HAS_EXPIRED'
1:55:31 PM: }
1:55:31 PM: error Command failed with exit code 1. (https://ntl.fyi/exit-code-1)
1:55:31 PM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
1:55:31 PM: ────────────────────────────────────────────────────────────────
1:55:31 PM: "build.command" failed
1:55:31 PM: ────────────────────────────────────────────────────────────────
1:55:31 PM: Error message
1:55:31 PM: Command failed with exit code 1: yarn build (https://ntl.fyi/exit-code-1)
1:55:31 PM: Error location
1:55:31 PM: In Build command from Netlify app:
1:55:31 PM: yarn build
1:55:31 PM: Resolved config
1:55:31 PM: build:
1:55:31 PM: command: yarn build
1:55:31 PM: commandOrigin: ui
1:55:31 PM: environment:
1:55:31 PM: - NEXT_PRIVATE_TARGET
1:55:31 PM: publish: /opt/build/repo/.next
1:55:31 PM: publishOrigin: ui
1:55:31 PM: plugins:
1:55:31 PM: - inputs: {}
1:55:31 PM: origin: ui
1:55:31 PM: package: '#netlify/plugin-nextjs'
1:55:32 PM: Caching artifacts
1:55:32 PM: Started saving node modules
Well, I have pushed my TypeScript project to github, and it has these scripts:
"scripts": {
"test": "jest",
"test:cov": "jest --coverage -i",
"test:unit": "jest unit --coverage -i",
"test:int": "jest int --coverage -i",
"build": "rimraf ./dist && tsc",
"start": "node ./dist/index.js",
"dev": "ts-node-dev --respawn --transpile-only --inspect -- ./src/index.ts"
}
After that, I created a github action workflow, making it run my tests and if they all pass, it deploys to heroku, but when the deployment is made, the heroku app crashes instantly.
This is the workflow:
main.yml:
name: Main workflow
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.18.1]
steps:
- uses: actions/checkout#v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node#v2.4.1
with:
node-version: ${{ matrix.node-version }}
- name: Install deps
run: yarn --frozen-lockfile
- name: Test
env:
MONGODB_URL_TEST: ${{secrets.MONGODB_URL_TEST}}
AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
run: yarn test
- name: Build the project
run: yarn build
- name: Deploy the project
if: ${{github.ref == 'refs/heads/main'}}
uses: akhileshns/heroku-deploy#v3.12.12
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "testjvcapi"
heroku_email: "joaovitorcasarin#hotmail.com"
env:
HD_MONGODB_URL: ${{secrets.MONGODB_URL}}
HD_AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
This is the last action that I triggered: https://github.com/joaocasarin/test-selfapi/actions/runs/1365239970
This is the repo: https://github.com/joaocasarin/test-selfapi/
This is the log after the deployment to heroku:
2021-10-20T20:33:33.000000+00:00 app[api]: Build started by user *****#hotmail.com
2021-10-20T20:34:16.052764+00:00 app[api]: Release v6 created by user *****#hotmail.com
2021-10-20T20:34:16.052764+00:00 app[api]: Deploy 1192ce7c by user *****#hotmail.com
2021-10-20T20:34:16.359307+00:00 heroku[web.1]: State changed from crashed to starting
2021-10-20T20:34:18.914264+00:00 heroku[web.1]: Starting process with command `npm start`
2021-10-20T20:34:20.660465+00:00 app[web.1]: [heroku-exec] Starting
2021-10-20T20:34:20.956196+00:00 app[web.1]:
2021-10-20T20:34:20.956213+00:00 app[web.1]: > self-api#1.0.0 start /app
2021-10-20T20:34:20.956214+00:00 app[web.1]: > node ./dist/index.js
2021-10-20T20:34:20.956214+00:00 app[web.1]:
2021-10-20T20:34:21.713756+00:00 app[web.1]: Listening on port 8260
2021-10-20T20:34:21.775734+00:00 heroku[web.1]: State changed from starting to up
2021-10-20T20:34:21.911902+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-10-20T20:34:21.912248+00:00 app[web.1]: npm ERR! errno 1
2021-10-20T20:34:21.926340+00:00 app[web.1]: npm ERR! self-api#1.0.0 start: `node ./dist/index.js`
2021-10-20T20:34:21.926408+00:00 app[web.1]: npm ERR! Exit status 1
2021-10-20T20:34:21.926490+00:00 app[web.1]: npm ERR!
2021-10-20T20:34:21.926548+00:00 app[web.1]: npm ERR! Failed at the self-api#1.0.0 start script.
2021-10-20T20:34:21.926604+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-10-20T20:34:21.933864+00:00 app[web.1]:
2021-10-20T20:34:21.933977+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-10-20T20:34:21.934035+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-10-20T20_34_21_928Z-debug.log
2021-10-20T20:34:22.121378+00:00 heroku[web.1]: Process exited with status 1
2021-10-20T20:34:22.265731+00:00 heroku[web.1]: State changed from up to crashed
2021-10-20T20:34:22.288685+00:00 heroku[web.1]: State changed from crashed to starting
2021-10-20T20:34:24.000000+00:00 app[api]: Build succeeded
2021-10-20T20:34:24.543897+00:00 heroku[web.1]: Starting process with command `npm start`
2021-10-20T20:34:25.605048+00:00 app[web.1]: [heroku-exec] Starting
2021-10-20T20:34:25.900511+00:00 app[web.1]:
2021-10-20T20:34:25.900518+00:00 app[web.1]: > self-api#1.0.0 start /app
2021-10-20T20:34:25.900518+00:00 app[web.1]: > node ./dist/index.js
2021-10-20T20:34:25.900519+00:00 app[web.1]:
2021-10-20T20:34:26.661060+00:00 app[web.1]: Listening on port 33178
2021-10-20T20:34:26.671025+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-10-20T20:34:26.674395+00:00 app[web.1]: npm ERR! errno 1
2021-10-20T20:34:26.676324+00:00 app[web.1]: npm ERR! self-api#1.0.0 start: `node ./dist/index.js`
2021-10-20T20:34:26.676389+00:00 app[web.1]: npm ERR! Exit status 1
2021-10-20T20:34:26.676462+00:00 app[web.1]: npm ERR!
2021-10-20T20:34:26.676511+00:00 app[web.1]: npm ERR! Failed at the self-api#1.0.0 start script.
2021-10-20T20:34:26.676557+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-10-20T20:34:26.682667+00:00 app[web.1]:
2021-10-20T20:34:26.682776+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-10-20T20:34:26.682829+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-10-20T20_34_26_677Z-debug.log
2021-10-20T20:34:26.877812+00:00 heroku[web.1]: Process exited with status 1
2021-10-20T20:34:27.141848+00:00 heroku[web.1]: State changed from starting to crashed
Can someone please give me a light? This is the first time I try github actions.
Thanks
Edit.: This is the Deploy the project step information:
Run akhileshns/heroku-deploy#v3.12.12
Created and wrote to ~/.netrc
Successfully logged into heroku
› Warning: Our terms of service have changed:
› https://dashboard.heroku.com/terms-of-service
Added git remote heroku
Setting MONGODB_URL, AUTH_TOKEN and restarting testjvcapi... done, v5
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/nodejs
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: USE_YARN_CACHE=true
remote: NODE_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): unspecified
remote: engines.npm (package.json): unspecified (use default)
remote: engines.yarn (package.json): unspecified (use default)
remote:
remote: Resolving node version 14.x...
remote: Downloading and installing node 14.18.1...
remote: Using default npm version: 6.14.15
remote: Resolving yarn version 1.22.x...
remote: Downloading and installing yarn (1.22.17)
remote: Installed yarn 1.22.17
remote:
remote: -----> Restoring cache
remote: - yarn cache
remote:
remote: -----> Installing dependencies
remote: Installing node modules (yarn.lock)
remote: yarn install v1.22.17
remote: [1/4] Resolving packages...
remote: [2/4] Fetching packages...
remote: [3/4] Linking dependencies...
remote: [4/4] Building fresh packages...
remote: Done in 7.59s.
remote:
remote: -----> Build
remote: Running build (yarn)
remote: yarn run v1.22.17
remote: $ rimraf ./dist && tsc
remote: Done in 11.61s.
remote:
remote: -----> Pruning devDependencies
remote: yarn install v1.22.17
remote: [1/4] Resolving packages...
remote: [2/4] Fetching packages...
remote: [3/4] Linking dependencies...
remote: [4/4] Building fresh packages...
remote: warning Ignored scripts due to flag.
remote: Done in 3.65s.
remote:
remote: -----> Caching build
remote: - yarn cache
remote:
remote: -----> Build succeeded!
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote: Default types for buildpack -> web
remote:
remote: -----> Compressing...
remote: Done: 41.9M
remote: -----> Launching...
remote: Released v6
remote: https://testjvcapi.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/testjvcapi.git
f9075d9..1192ce7 HEAD -> main
As Bertrand said, there was something wrong with the mongodb connection, so I just found that the variable MONGODB_URL was not set, only the test one was, so it was making the app crash because it was undefined for mongoose, making it exit.
I want to generate the Thingsboard dependency jars, which I want to use in my application to call Thingsboard API's from my java application.
To use Thingsboard dependency jars, I have to build the application as these jars not available in a public repository.
I am trying to build ThingsBoard application from source, I am following the instructions mentioned in
link - https://thingsboard.io/docs/user-guide/install/building-from-source/
I clone the ThingsBoard report and then checked out "release-1.4" branch and ran the mvn clean install command.
The application build is failing with below mentioned error.
[INFO] Installing npm version 3.10.8
[INFO] Unpacking /var/root/.m2/repository/com/github/eirslett/npm/3.10.8/npm-3.10.8.tar.gz into /Users/admin/workspaces/IOT/ThingsBoard/source/thingsboard/ui/target/node/node_modules
[INFO] Installed npm locally.
[INFO]
[INFO] --- frontend-maven-plugin:1.0:npm (npm install) # ui ---
[INFO] Running 'npm install' in /Users/admin/workspaces/IOT/ThingsBoard/source/thingsboard/ui
[WARNING] npm WARN deprecated angular-ui-router#0.3.2: This npm package 'angular-ui-router' has been renamed to '#uirouter/angularjs'. Please update your package.json. See https://ui-router.github.io/blog/uirouter-scoped-packages/
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/fabiobiondi/angular-fullscreen.git /Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489: Cloning into bare repository '/Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489'...
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/fabiobiondi/angular-fullscreen.git /Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489: fatal: unable to connect to github.com:
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/fabiobiondi/angular-fullscreen.git /Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489: github.com[0: 192.30.253.113]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/fabiobiondi/angular-fullscreen.git /Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489: github.com[1: 192.30.253.112]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/thingsboard/flot.git /Users/admin/.npm/_git-remotes/git-github-com-thingsboard-flot-git-0-9-work-799e39f1: Cloning into bare repository '/Users/admin/.npm/_git-remotes/git-github-com-thingsboard-flot-git-0-9-work-799e39f1'...
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/thingsboard/flot.git /Users/admin/.npm/_git-remotes/git-github-com-thingsboard-flot-git-0-9-work-799e39f1: fatal: unable to connect to github.com:
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/thingsboard/flot.git /Users/admin/.npm/_git-remotes/git-github-com-thingsboard-flot-git-0-9-work-799e39f1: github.com[0: 192.30.253.113]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/thingsboard/flot.git /Users/admin/.npm/_git-remotes/git-github-com-thingsboard-flot-git-0-9-work-799e39f1: github.com[1: 192.30.253.112]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/MichaelZinsmaier/CurvedLines.git /Users/admin/.npm/_git-remotes/git-github-com-MichaelZinsmaier-CurvedLines-git-master-843e4689: Cloning into bare repository '/Users/admin/.npm/_git-remotes/git-github-com-MichaelZinsmaier-CurvedLines-git-master-843e4689'...
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/MichaelZinsmaier/CurvedLines.git /Users/admin/.npm/_git-remotes/git-github-com-MichaelZinsmaier-CurvedLines-git-master-843e4689: fatal: unable to connect to github.com:
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/MichaelZinsmaier/CurvedLines.git /Users/admin/.npm/_git-remotes/git-github-com-MichaelZinsmaier-CurvedLines-git-master-843e4689: github.com[0: 192.30.253.113]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/MichaelZinsmaier/CurvedLines.git /Users/admin/.npm/_git-remotes/git-github-com-MichaelZinsmaier-CurvedLines-git-master-843e4689: github.com[1: 192.30.253.112]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/alenaksu/mdPickers.git /Users/admin/.npm/_git-remotes/git-github-com-alenaksu-mdPickers-git-0-7-5-ca6ad268: Cloning into bare repository '/Users/admin/.npm/_git-remotes/git-github-com-alenaksu-mdPickers-git-0-7-5-ca6ad268'...
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/alenaksu/mdPickers.git /Users/admin/.npm/_git-remotes/git-github-com-alenaksu-mdPickers-git-0-7-5-ca6ad268: fatal: unable to connect to github.com:
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/alenaksu/mdPickers.git /Users/admin/.npm/_git-remotes/git-github-com-alenaksu-mdPickers-git-0-7-5-ca6ad268: github.com[0: 192.30.253.113]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/alenaksu/mdPickers.git /Users/admin/.npm/_git-remotes/git-github-com-alenaksu-mdPickers-git-0-7-5-ca6ad268: github.com[1: 192.30.253.112]: errno=Operation timed out
[ERROR] npm ERR! Darwin 16.7.0
[ERROR] npm ERR! argv "/Users/admin/workspaces/IOT/ThingsBoard/source/thingsboard/ui/target/node/node" "/Users/admin/workspaces/IOT/ThingsBoard/source/thingsboard/ui/target/node/node_modules/npm/bin/npm-cli.js" "install"
[ERROR] npm ERR! node v6.9.1
[ERROR] npm ERR! npm v3.10.8
[ERROR] npm ERR! code 128
[ERROR]
[ERROR] npm ERR! Command failed: git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/fabiobiondi/angular-fullscreen.git /Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489
[ERROR] npm ERR! Cloning into bare repository '/Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489'...
[ERROR] npm ERR! fatal: unable to connect to github.com:
[ERROR] npm ERR! github.com[0: 192.30.253.113]: errno=Operation timed out
[ERROR] npm ERR! github.com[1: 192.30.253.112]: errno=Operation timed out
---
---
[INFO] Thingsboard ........................................ SUCCESS [ 1.895 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [ 0.070 s]
[INFO] Thingsboard Server Common Data ..................... SUCCESS [ 4.105 s]
[INFO] Thingsboard Server Common Messages ................. SUCCESS [ 0.716 s]
[INFO] Thingsboard Server Common Transport components ..... SUCCESS [ 0.739 s]
[INFO] Thingsboard Server DAO Layer ....................... SUCCESS [ 8.202 s]
[INFO] Thingsboard Server Extensions API .................. SUCCESS [ 1.109 s]
[INFO] Thingsboard Server Core Extensions ................. SUCCESS [ 4.167 s]
[INFO] Thingsboard Extensions ............................. SUCCESS [ 0.054 s]
[INFO] Thingsboard Server RabbitMQ Extension .............. SUCCESS [ 1.810 s]
[INFO] Thingsboard Server REST API Call Extension ......... SUCCESS [ 0.704 s]
[INFO] Thingsboard Server Kafka Extension ................. SUCCESS [ 2.283 s]
[INFO] Thingsboard Server MQTT Extension .................. SUCCESS [ 0.536 s]
[INFO] Thingsboard Server SQS Extension ................... SUCCESS [ 3.292 s]
[INFO] Thingsboard Server SNS Extension ................... SUCCESS [ 1.418 s]
[INFO] Thingsboard Server Transport Modules ............... SUCCESS [ 0.028 s]
[INFO] Thingsboard HTTP Transport ......................... SUCCESS [ 0.511 s]
[INFO] Thingsboard COAP Transport ......................... SUCCESS [ 1.111 s]
[INFO] Thingsboard MQTT Transport ......................... SUCCESS [ 0.711 s]
[INFO] Thingsboard Server UI .............................. FAILURE [02:53 min]
[INFO] Thingsboard Server Tools ........................... SKIPPED
[INFO] ThingsBoard Server Application ..................... SKIPPED
Any help is highly appreciated.
I solved issue in few steps
1. Restart System, so that it can close if in use.
2. Open command prompt with admin previleges
3. Run mvn clean install -DskipTests
Make sure you have java 8 , maven 3.0 + & git installed.
if still issue is there then remove node/npm from system the repeat all the points.
Based on your logs you obviously had issues to connect to github.com. Maybe some temporary issues. Try to rebuild. If not - try to clean ui/node_modules folder and rebuild again.
I am learning node.js, and have a fairly simple application which seems to be leaking memory when deployed to Bluemix. I need assistance in determining if this is caused by my code, or a module I am using.
When deployed with the Monitoring and Cloudant services it would crash with an out of memory error, and be restarted by Bluemix every 12-14 hours - with 256 megs of RAM. I upped the RAM to 1 gig and it still occurs (although less frequently).
When I deploy the app to Bluemix and issue calls to the / route I can see the memory climb slowly up. When testing locally in windows, I do not see the same behavior (testing via process explorer and seeing the amount of private bytes & working set)
I have simplified my app (and removed the monitoring service) and can still reproduce, though the increase is slower with the simplified app.
/*jshint node:true*/
//------------------------------------------------------------------------------
// app.js - Middleware routing
//------------------------------------------------------------------------------
// This application uses express as it's web server
// for more info, see: http://expressjs.com
var express = require( 'express' );
// For handling the POST bodies and multi-part bodies0
var bodyParser = require( 'body-parser' );
var multer = require( 'multer' );
// Create a new express server
var app = express();
// Get the app environment from Cloud Foundry
var cfenv = require( 'cfenv' );
var appEnv = cfenv.getAppEnv();
// Catch all handlers for unhandled URLs
//
app.post( '/*', function( req, res ){
logRequest( req );
res.send( 'Unhandled POST received' );
});
app.get( '/*', function( req, res ){
logRequest( req );
res.send( 'Unhandled GET received' );
});
// start server on the specified port and binding host
app.listen(appEnv.port, appEnv.bind, function() {
// print a message when the server starts listening
console.log("server starting on -- " + appEnv.url);
});
function logRequest(req){
console.log("Received,"+new Date().toLocaleString()+","+req.method+","+req.originalUrl);
}
Here is the data I gathered, memory is listed in Megs, and I issued requests to the / route:
83.1M on startup
83.5M after 1 call to /
83.5M after 5 more calls to /
83.6 after 5 more calls to /
84.2 after 20 more calls to /
85.1 after 10 more calls to /
86.6 after 20 more calls to /
I tried using the heapdump module, but it fails when being deployed to Bluemix.
cf-node-debug installation now successful - see bottom of question
Installed cf-node-debug as suggested, in package.json specified:
"scripts": {
"start": "node_modules/.bin/cf-node-debug app.js"
},
When I pushed the app I got the following:
T13:19:44.08-0400 [STG/39] OUT -----> Downloaded app package (36K)
T13:19:44.46-0400 [STG/39] OUT -----> Downloaded app buildpack cache (2.6M)
T13:19:44.80-0400 [STG/0] OUT -----> Node.js Buildpack Version: v1.18-20150519-1759
T13:19:44.85-0400 [STG/0] OUT -----> Resetting git environment
T13:19:45.35-0400 [STG/0] OUT TIP: Specify a node version in package.json
T13:19:45.35-0400 [STG/0] OUT -----> Defaulting to latest stable node: 0.12.2
T13:19:45.35-0400 [STG/0] OUT -----> Installing IBM SDK for Node.js from cache
T13:19:45.78-0400 [STG/0] OUT -----> Checking and configuring service extensions
T13:19:45.95-0400 [STG/0] OUT -----> Restoring node_modules directory from cache
T13:19:46.21-0400 [STG/0] OUT -----> Pruning cached dependencies not specified in package.json
T13:19:47.22-0400 [STG/0] OUT -----> Installing dependencies
T13:19:54.50-0400 [STG/0] OUT > ws#0.4.32 install /tmp/staged/app/node_modules/cf-node-debug/node_modules/node-inspector/node_modules/ws
T13:19:54.50-0400 [STG/0] OUT > (node-gyp rebuild 2> builderror.log) || (exit 0)
T13:20:04.31-0400 [STG/0] OUT make: Entering directory `/tmp/staged/app/node_modules/cf-node-debug/node_modules/node-inspector/node_modules/ws/build'
T13:20:04.32-0400 [STG/0] OUT CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
T13:20:04.71-0400 [STG/0] OUT SOLINK_MODULE(target) Release/obj.target/bufferutil.node
T13:20:04.76-0400 [STG/0] OUT SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
T13:20:04.77-0400 [STG/0] OUT COPY Release/bufferutil.node
T13:20:04.78-0400 [STG/0] OUT CXX(target) Release/obj.target/validation/src/validation.o
T13:20:05.15-0400 [STG/0] OUT SOLINK_MODULE(target) Release/obj.target/validation.node
T13:20:05.21-0400 [STG/0] OUT SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
T13:20:05.21-0400 [STG/0] OUT COPY Release/validation.node
T13:20:05.24-0400 [STG/0] OUT make: Leaving directory `/tmp/staged/app/node_modules/cf-node-debug/node_modules/node-inspector/node_modules/ws/build'
T13:20:05.29-0400 [STG/0] OUT npm WARN deprecated static-favicon#1.0.2: use serve-favicon module
T13:20:05.80-0400 [STG/0] OUT cf-node-debug#0.1.2 node_modules/cf-node-debug
T13:20:05.80-0400 [STG/0] OUT ├── underscore#1.6.0
T13:20:05.80-0400 [STG/0] OUT ├── q#1.0.1
T13:20:05.80-0400 [STG/0] OUT ├── passport-local#1.0.0 (passport-strategy#1.0.0)
T13:20:05.80-0400 [STG/0] OUT ├── nopt#2.2.1 (abbrev#1.0.7)
T13:20:05.80-0400 [STG/0] OUT ├── passport#0.2.2 (pause#0.0.1, passport-strategy#1.0.0)
T13:20:05.80-0400 [STG/0] OUT ├── client-sessions#0.6.0 (cookies#0.3.8)
T13:20:05.80-0400 [STG/0] OUT ├── http-proxy#1.1.6 (eventemitter3#1.1.0)
T13:20:05.80-0400 [STG/0] OUT ├── body-parser#1.3.1 (raw-body#1.1.6, qs#0.6.6, bytes#1.0.0, type-is#1.2.1)
T13:20:05.80-0400 [STG/0] OUT ├── express#4.4.5 (parseurl#1.0.1, utils-merge#1.0.0, merge-descriptors#0.0.2, cookie#0.1.2, escape-html#1.0.1, qs#0.6.6, cookie-signature#1.
#1.0.0, fresh#0.2.2, vary#0.1.0, methods#1.0.1, serve-static#1.2.3, buffer-crc32#0.2.3, path-to-regexp#0.1.2, type-is#1.2.1, accepts#1.0.7, proxy-addr#1.0.1, debug#1.0.2, send#0.4.3)
T13:20:05.80-0400 [STG/0] OUT ├── cfenv#0.2.0 (ports#1.1.0, js-yaml#3.0.2)
T13:20:05.80-0400 [STG/0] OUT ├── handlebars#2.0.0 (optimist#0.3.7, uglify-js#2.3.6)
T13:20:05.80-0400 [STG/0] OUT └── node-inspector#0.7.3 (opener#1.3.0, debug#0.8.1, which#1.0.9, async#0.4.1, strong-data-uri#0.1.1, yargs#1.1.3, rc#0.3.5, glob#3.2.11, exp
4.32)
T13:20:06.02-0400 [STG/0] OUT -----> Caching node_modules directory for future builds
T13:20:06.59-0400 [STG/0] OUT -----> Cleaning up node-gyp and npm artifacts
T13:20:06.60-0400 [STG/0] OUT -----> No Procfile found; Adding npm start to new Procfile
T13:20:06.60-0400 [STG/0] OUT -----> Building runtime environment
T13:20:06.60-0400 [STG/0] OUT -----> Checking and configuring service extensions
T13:20:06.85-0400 [STG/0] OUT -----> Installing App Management
T13:20:06.90-0400 [STG/0] OUT -----> WARN: App Management (Development Mode) cannot be installed because the start script cannot be found.
T13:20:06.91-0400 [STG/0] OUT TIP: Specify your start script in 'package.json' or 'Procfile'.
T13:20:06.92-0400 [STG/0] ERR
T13:20:11.28-0400 [STG/39] OUT -----> Uploading droplet (20M)
T13:20:20.47-0400 [DEA/39] OUT Starting app instance (index 0) with guid 1dde346e-4e51-407f-af7b-607772826e72
T13:20:32.91-0400 [App/0] OUT
T13:20:32.91-0400 [App/0] OUT > NodejsStarterApp#0.0.1 start /home/vcap/app
T13:20:32.91-0400 [App/0] OUT > cf-node-debug app.js
T13:20:33.38-0400 [App/0] ERR util.js:634
T13:20:33.38-0400 [App/0] ERR ctor.prototype = Object.create(superCtor.prototype, {
T13:20:33.38-0400 [App/0] ERR ^
T13:20:33.38-0400 [App/0] ERR TypeError: Cannot read property 'prototype' of undefined
T13:20:33.38-0400 [App/0] ERR at Object.exports.inherits (util.js:634:43)
T13:20:33.38-0400 [App/0] ERR at Object.<anonymous> (/home/vcap/app/node_modules/cf-node-debug/node_modules/http-proxy/lib/http-proxy/index.js:106:17)
T13:20:33.38-0400 [App/0] ERR at Module._compile (module.js:460:26)
T13:20:33.38-0400 [App/0] ERR at Object.Module._extensions..js (module.js:478:10)
T13:20:33.38-0400 [App/0] ERR at Module.load (module.js:355:32)
T13:20:33.38-0400 [App/0] ERR at Function.Module._load (module.js:310:12)
T13:20:33.38-0400 [App/0] ERR at Module.require (module.js:365:17)
T13:20:33.38-0400 [App/0] ERR at require (module.js:384:17)
T13:20:33.38-0400 [App/0] ERR at Object.<anonymous> (/home/vcap/app/node_modules/cf-node-debug/node_modules/http-proxy/lib/http-proxy.js:4:17)
T13:20:33.38-0400 [App/0] ERR at Module._compile (module.js:460:26)
T13:20:33.40-0400 [App/0] ERR npm ERR! Linux 3.13.0-39-generic
T13:20:33.40-0400 [App/0] ERR npm ERR! argv "/home/vcap/app/vendor/node/bin/node" "/home/vcap/app/vendor/node/bin/npm" "start"
T13:20:33.40-0400 [App/0] ERR npm ERR! node v0.12.2
T13:20:33.40-0400 [App/0] ERR npm ERR! npm v2.7.4
T13:20:33.40-0400 [App/0] ERR npm ERR! code ELIFECYCLE
T13:20:33.40-0400 [App/0] ERR npm ERR! NodejsStarterApp#0.0.1 start: `cf-node-debug app.js`
T13:20:33.40-0400 [App/0] ERR npm ERR! Exit status 1
T13:20:33.40-0400 [App/0] ERR npm ERR!
T13:20:33.40-0400 [App/0] ERR npm ERR! Failed at the NodejsStarterApp#0.0.1 start script 'cf-node-debug app.js'.
T13:20:33.41-0400 [App/0] ERR npm ERR! This is most likely a problem with the NodejsStarterApp package,
T13:20:33.41-0400 [App/0] ERR npm ERR! not with npm itself.
T13:20:33.41-0400 [App/0] ERR npm ERR! Tell the author that this fails on your system:
T13:20:33.41-0400 [App/0] ERR npm ERR! cf-node-debug app.js
T13:20:33.41-0400 [App/0] ERR npm ERR! You can get their info via:
T13:20:33.41-0400 [App/0] ERR npm ERR! npm owner ls NodejsStarterApp
T13:20:33.41-0400 [App/0] ERR npm ERR! There is likely additional logging output above.
T13:20:33.41-0400 [App/0] ERR npm ERR! Please include the following file with any support request:
T13:20:33.41-0400 [App/0] ERR npm ERR! /home/vcap/app/npm-debug.log
T13:20:33.47-0400 [DEA/39] ERR Instance (index 0) failed to start accepting connections
$ npm --version
1.4.28
$ node --version
v0.10.33
Looks like http-proxy#1.1.6 (eventemitter3#1.1.0)
Note: Using SDK for Node.js from IBM
At Jack's suggestion I tried specifying the engine like:
"engines": {
"node": "0.10.x",
"npm": "2.7.4"
},
The staging reported:
2015-06-04T14:27:41.87-0400 [STG/0] OUT -----> Resetting git environment
2015-06-04T14:27:42.31-0400 [STG/0] OUT -----> Requested node range: 0.10.x
2015-06-04T14:27:42.31-0400 [STG/0] OUT -----> Resolved node version: 0.10.38
2015-06-04T14:27:42.31-0400 [STG/0] OUT -----> Installing IBM SDK for Node.js from cache
but I obtained the same error as before:
2015-06-04T14:28:12.89-0400 [App/0] ERR util.js:556
2015-06-04T14:28:12.89-0400 [App/0] ERR ctor.prototype = Object.create(superCtor.prototype, {
2015-06-04T14:28:12.89-0400 [App/0] ERR ^
2015-06-04T14:28:12.89-0400 [App/0] ERR TypeError: Cannot read property 'prototype' of undefined
Update 3:35pm EST
I forked cf-node-debug and modified the http-proxy to 1.11.x. I updated package.json to:
"cf-node-debug": "git://github.com/retinaburn/cf-node-debug.git",
I pushed the app, and now have access to the debug console, but there does not seem to be any heap dumps that I can use to investigate memory leaks.
You may want to isolate your issues. Does this behavior occurs when you are running the application locally?
There is a good node-module memwatch that may help.
I think memwatch works with node.js 10.x
There is a memwatch-next that will work with node.js 0.12.x.
I have confirmed that the specified sample app does perform garbage collection in Bluemix with the memory set to 1gb.
I tested using apache bench with 1000 requests to '/' with 10 concurrent transactions.
I suspect the earlier volume tests were too low to trigger a gc.