After setting up the example Loopback app, how come my StrongOps dashboard stays empty? - node.js

I followed the guidelines for installing Loopback example app, and registering to StrongOps monitoring service, like documented in the Getting Started doc
Installing and registering was flawless, but now I don't see nothing happening on my StrongOps dashboard, why ?
I even followed the step of running the stress test to be sure that some metrics are sent, but the dashboard stays empty.
$ slc run bin/create-load.js
Side note : The documentation does not mention the fact that when you quit the REPL command line, you actually stops the web server. First time I did this, I could not load the stress tests and did not understand why, until I realize the app was offline. Trivial, but should be in a Getting started doc.
Version used :
$ slc version
slc v2.2.2 (node v0.10.22)

Sorry, you got caught between rolling out updates to our tooling on npmjs.org, and updates to our documentation. We recommend running with strong-supervisor, which should be co-installed with strong-cli, though you may have to update:
npm install -g strong-supervisor
npm update -g strong-cli
At this point, you can run with
sl-run
and it will run the sample (or any app, without having to add a direct dependency on strong-agent) with strong-agent profiling, and strong-cluster-control worker/robustness management.
https://github.com/strongloop/strong-supervisor
We'll be continuing to work on our tooling integration over the next few sprints.

I believe there was a weekend maintenance done on StrongOps today. Can you retry ?
I am getting my data right now.
Shubhra

Actually, I found out.
Despite the documentation says the example app comes out of the box with strongOps support, it does not.
I had to enable it manually :
$ npm install strong-agent
In app.js, before the app dependencies :
require('strong-agent').profile();
Then, I relaunched the example app and now the dashboards starts to looks like there is something
However the charts stay empty for the moment, despite the example app and load app have been running for about 1/2 hour.

Related

How can I solve a crash in an Adonis app starting?

this is my first question ever. I'm trying to run an Adonis.js app by entering adonis serve --dev at the terminal. The messages are always the same in this succession:
SERVER STARTED
Watching files for changes...
Fatal error in , line 0
Check failed: U_SUCCESS(status).
FailureMessage Object: 000000D7655ECBA0Application crashed, make sure to kill all related running process, fix the issue and re-run the app
The only thing that changes is the FailureMessageObject. My Node version is 12.0, npm 6.9.
I can't say anything seriously working on your situation cause you gave me no detailed data but I know that surely you are doing something wrong.
It could be better if you at least mentioned the version of adonisjs you've been using.
Anyway, if you learned to run your server from a video from someone else's youtube channel, I strongly recommend you to read documentation and stop watching those videos.
And for adonisjs there are 2 different documentation:
adonisjs's Documentation, version 4.1 or less.
You can change the version on top left combo box.
adonisjs's preview Documentation, version 5.0.
Actually the documentation is not still completed at this time but the version is stable. yeah, that's the reason why I wrote preview.
And that's it, start recreating an adonisjs app from documentation guides.
I solved it. It was something with node or npm. I followed this steps enumerated in this post: How to completely remove node.js from Windows. Reinstalled node. Installed Adonis and it's CLI again and created an app and this time the app didn't crashed, and ran smoothly (after that I also created some migrations and they too worked well).

Old `npm start` script being ran by Google App Engine

Despite re-deploying and even disabling/re-enabling the application Google App Engine keeps trying to run the npm start script from an old version of the app. I noticed this because it used to try to run a migration script, then start the server. Now the migration script errors, which is what got my attention.
I've since tried to also update the version number in the package.json since the logs that are failing specified it was trying to run version 1.0.0 of my app. So I figured maybe I need to bump the version.
Despite that, the log that errors still says PROJECT_NAME#1.0.0 start: npm run migrate && node src/server.js which is clearly the old one.
I started a project on Node.js Flexible environment for Google App Engine, then switched to Standard environment (which was released shortly after I started the project). I'm speculating that perhaps it's trying to run flexible environment script too? But, I don't know how to make it stop.
Oh, one more important detail: The app is running and working despite supposedly erroring on startup. So it definitely seems like it's trying to run both versions and only one is succeeding.
It turns out there was an old instance running in the "flexible" environment.
Deploying a new "default" service running in "standard" environment does not seem to stop other deployed versions in the "flexible" environment.
The fix involved opening Google's Cloud Console for App Engine, clicking "versions" and finding/stopping/deleting the old versions from "flexible" environment.
Huge thanks to #Steren for helping me figure out what was going on.

docdokuplm post-installation instructions

docdokuplm
Hi !
Just checking out your PLM, looks great! I followed your instructions:
https://github.com/docdoku/docdoku-plm/wiki/Installation-Guide
I used the nightly build.
After uploading the ear file and then using http://localhost:8080 I see the Payara server page. Was there something else I need todo or where do I start to troubleshoot? Thoughts?
Thank you!
The page displayed at 8080 is the default landing page. If you have deployed the DocDokuPLM application and configured the settings detailed within the instructions, you can open the application through Payara Server. Go to Applications -> DocDokuPLM -> Launch, and you'll get a series of links which should help you troubleshoot.
If you can't see any, run through the installation procedure again to ensure that you haven't missed a step - it seems like there's a few steps which must be configured exactly correctly for the application to work.
According to this GitHub issue, this seems like a bug with DocDokuPLM. As with most software, nightly builds are inherently risky. Looking at the source, though, it seems that the code changes fairly rarely, so you might try with the previous version of Payara Server (173), though the stack traces in the GitHub issue don't look to me like an issue with Payara.
The backend server and the UI are two separated components.
If you want to install the User Interface you have to go there :
https://github.com/docdoku/docdoku-web-front
The project which you have deployed is just for backend,inorder to interact with UI just clone the web-client from this repo https://github.com/docdoku/docdoku-web-front and in command prompt use this command npm run dev then you can use this project, make sure the port number which is mentioned in app/webapp.properties.json of web-client project is same as you have given in server-config.
Read https://github.com/docdoku/docdoku-web-front/wiki/Development-Guide for more details

Debug node.js web application that has been launched via a Gulp task

I have a web application that is written in node.js and gets started using a gulp command. When the application first starts, before the server is running, debug points may be hit in WebStorm (or in any IDE or command line tool). However, after the server is running and I go to the interface in my localhost I can no longer hit debug points inside the application. This is not being caused by client side code as the debug points are in server code.
I have read the answers that involve using the node-inspector and that has not solved my problem because of configuration files that are not getting read when starting the debugger in node inspector.
I'm a bit surprised that there is so little on here about this issue. Is it not a normal problem that other developers face? Thanks in advance for the help.
My workaround for this may not be sufficient for every case. I was modifying JavaScript files and didn't actually need the configuration files, after loading, to be able to test my changes. I did the following:
Wrote a line in my app.js file that set the variables I needed. (these would have been tasks ran in Gulp)
I then started the app as a Node.js app and was able to debug it as normal.
If any of my views had been updated, or anything else that was being managed by Gulp, then I could have simply stopped the server, started it again via the Gulp command, and then stopped again and restarted as a Node.js app.
This did not solve the issue in my OP but it was a good enough workaround to get debug points in the JavaScript.

azure mobile services error cannot find module 'azure-storage'

I have been using Azure-storage npm module in my AzureMobileService custom API for past couple of months and all has been working fine, till couple of days back it started giving me this error - cannot find module 'azure-storage'. Its strange because I haven't changed my code a bit, actually the day it start giving me this error, I had checked my app(HTML/JS app) in the morning, it was all working good. But when I came back from work and ran the app, I got this error. below is the code in my custom api where I get this error
var azure = require('azure-storage');
var retryOperationFilter = new azure.ExponentialRetryPolicyFilter();
var tableService= azure.createTableService().withFilter(retryOperationFilter);
and I do have azure-storage included in my package.json -
"dependencies": {"tracer": "0.7.3", "colors" : "1.0.3", "lodash" :"2.4.1", "azure-storage": "0.4.1"},
I asked this question at 'Azure-storage' npm page, but didn't get much help, so now trying here; its been two days now and I haven't got it resolved, its very annoying and I am at my wits end.
anyone out there has experienced same or may have any idea, will much appreciate if you can kindly share anything you may have got on this.
finally got it working by doing a manual npm install 'azure-storage' to my mobile service.
I never thought of trying a manual npm install because other node modules I have in my package.json (like tracer, lodash) work fine with no manual npm install. Also, as I remember reading, if I just include the npm module I want to use in my mobile service's package.json and push it, mobile service on the server installs it and restarts, and I don't need to install myself manually. And thats what has been happening when my code was working till last week.

Resources