Change Meteor Node-Inspector web-port - debugging

I need to change the web-port used by node-inspector when debugging Meteor but it seems to always run on 8080, which is where I need to run the Meteor web app.
I've tried setting the NODE_OPTIONS environment variable before running Meteor:
$ export NODE_OPTIONS=--debug=47977
$ meteor debug --port=8080
[[[[[ ~/.../src ]]]]]
=> Started proxy.
=> Started MongoDB.
Starting your app -
Your application is now paused and ready for debugging!
To debug the server process using a graphical debugging interface,
visit this URL in your web browser:
http://localhost:8080/debug?port=5858
Paused at /.../src/.meteor/local/build/main.js:7
Cannot start the server at 0.0.0.0:8080. Error: listen EADDRINUSE.
There is another process already listening at this address.
Run `node-inspector --web-port={port}` to use a different port.
I've tried running node-inspector separately on a different web port then starting meteor, but meteor always seems to also try starting node-inspector on 8080:
$ node-inspector --web-port=47977 &
[1] 74439
$ Node Inspector v0.5.0
info - socket.io started
Visit http://127.0.0.1:47977/debug?port=5858 to start debugging.
$ meteor debug --port=8080
[[[[[ ~/.../src ]]]]]
=> Started proxy.
=> Started MongoDB.
Starting your app -
Your application is now paused and ready for debugging!
To debug the server process using a graphical debugging interface,
visit this URL in your web browser:
http://localhost:8080/debug?port=5858
Paused at /.../src/.meteor/local/build/main.js:7
Cannot start the server at 0.0.0.0:8080. Error: listen EADDRINUSE.
There is another process already listening at this address.
Run `node-inspector --web-port={port}` to use a different port.
Note, there are 3 ports in play here:
8080 - Web port running Meteor web app.
47977 - Web port I want to run node-inspector web app.
5858 - Port used to communicate between the other 2 processes.
I need Meteor to be running on 8080 but can't seem to stop Meteor starting node-inspector on 8080 too. I've also tried a few other ports for node-inspector but with the same results.
Running on Mac with Meteor 1.2.1

I had the same problem, i've solved by:
in terminal run node-inspector --web-port=47977
and in a new terminal run meteor debug
go to http://127.0.0.1:47977/ws=127.0.0.1:47977&port=5858 to start debugging.

Related

RubyMine - Debug Rails App - Unicorn Server

i am trying to debug rails app - unicorn server.
I've tried following:
1) I tried to start the server on localhost (externally, not with RubyMine) and set some break points. I can see my server when trying to "attach to process". It can attach to process but when i call some REST WebService it won't stop on this method in controller.
2) I tried to run the server from Debugger in RubyMine, the server starts, but when i call some REST WebService it won't stop on this method in controller.
How to debug the Rails App on Mac OS (localhost, unicorn)?
The Rails App ist only API. I want to debug my api calls.
Problem solved:
- i was using pow and it was redirecting to some url and not directly to localhost:3000. Once i converted the requests to use localhost:3000 instead of pow URL xxx.something.test debugger fired up.
I don't have rubymine but this worked for me:
install "pry": https://github.com/pry/pry
start unicorn on your local env:
bundle exec unicorn -c config/unicorn.rb
make sure you're listening to a valid port (in your confic/unicorn.rb):
listen 3000
add
binding.pry
in your code wherever you want a breakpoint
go to:
0.0.0.0:3000

Jmeter plugin perfMon not listening to localhost

In jMeter, I have installed perfMon plugin that listens to 4444 port successfully. My application runs on localhost:8080. It seems when I give default http port as 8080 as per the attached image, api works fine but no graph for perfMon metric plugin. But when I give http default port as 4444, perfMon shows graph but API fails giving 404.
How can I run both my application in localhost:8080 and listen to same port using server agent/ perfMon agent (which runs on 4444 port)?
FYI. I need to monitor the tomcat server(where my tested application resides).For that I have installed server-agent in my tomcat server.Edited jmeter.properties like below: remote_hosts=localhost:4444
I am running my application in tomcat of docker container and I have installed perfMon server agent locally at my system /opt directory. Does it has to installed somewhere specific directory ?
In server agent console, I am getting error
ERROR 2018-03-09 13:25:19.126 [kg.apc.p] (): Error getting metric
org.hyperic.sigar.SigarException: No such process: 728
at org.hyperic.sigar.SigarProxyCache.invoke(SigarProxyCache.java:220)
at com.sun.proxy.$Proxy0.getProcCpu(Unknown Source)
at kg.apc.perfmon.metrics.CPUProcMetric.getValue(CPUProcMetric.java:35)
at kg.apc.perfmon.PerfMonMetricGetter.getMetricsLine(PerfMonMetricGetter.java:114)
at kg.apc.perfmon.PerfMonWorker.processSenders(PerfMonWorker.java:280)
at kg.apc.perfmon.PerfMonWorker.run(PerfMonWorker.java:243)
at java.lang.Thread.run(Thread.java:748)
as I have set the pid in metric parameter as follows(my tomcat pid =728 in docker)
every time after hitting API in jMeter, it is saying client disconnted
I got the solution. When it says "client disconnected", it is not an error, it is info. I forgot to change pid in metric parameter whenever I run the server.

Cannot run styleguidist along side with laravel development server

I am trying to document my React Components and I am running styleguidist server along side with Laravel development server but the styleguidist server crashes with this error.
You have another server running at port 6060 somewhere, shut it down first
You can change the port using the `serverPort` option in your style guide config:
https://react-styleguidist.js.org/docs/configuration.html
I have configured the styleguidist server to run at port 6060 as to resolve this issue and succeeded to run the server only once. After that I am getting this issue again.
How can i resolve this??
The error is saying you have something else running at that port. Have you tried a different one? If you are running a UNIX system, you can see what is running on that port with:
lsof -i tcp:6060

XAMPP Tomcat Not Stopping

I have XAMPP installed on my Windows machine,
I am unable to stop the Tomcat server.
I have tried to kill the process with the Process Id as well,
But weirdly it's not showing in the Task Manager nor the local Services,
Which I referred from here -
apache service not stopping in xampp
Here's my XAMPP Control Panel screenshot -
Here's the Task Manager, I can't find the Process ID 3104 as shown in the XAMPP Control Panel-
I did run the command "Services.msc" to find and stop it but, no luck there either.
You should check the PID and verify that it is not associated with any other service/process mistaken for Tomcat by XAMPP.
In my case I had Jenkins running on port 8080 and starting XAMPP it was "guessing" that Tomcat was already running:
In reality, looking at the PID (198092 in my case) it was associated with java.exe:
and this was a process generated by my Jenkins server running on that port:
This is why you cannot stop Tomcat from there... (it is not Tomcat running on 8080).
To verify this and properly start Tomcat you can try this:
Stopping Jenkins:
Will remove the service running on 8080 and XAMPP is able to correctly detect that Tomcat is not running:
At this point you can Start Tomcat in XAMPP (and it should start for real this time):
Going to the localhost page, port 8080 you will have a proof of it:
If you want you can now successfully stop it from XAMPP:
On Windows:
XAMPP opens a shell(CMD) on starting tomcat just close that shell.

debugging a sinatra app with rubmine

I'm trying to debug a sinatra app using RubyMine. I am using rackup to run the app on localhost and unicorn to run it on remote host. My ruby version is 1.9.3.
I should also note that the "run debug mode icon" is grayed out. I don't know what is missing from the configuration.
What gems do I need? What else do I need to do?
update:
I have run the server process on localhost using rackup -p 9000. In order to start debugging -run rdebug-ide --port 1234 -- rackup and got this message :
Fast Debugger (ruby-debug-ide 0.4.17.beta16, ruby-debug-base 0.10.5.rc1) listens on 127.0.0.1:1234
I still don't understand how to debug using Rubymine. I have opened the browser in http://0.0.0.0:1234 and I don't get any response (it keeps loading)
I run the remote host using unicorn like so :
unicorn -c etc/fin_srv_unicorn.conf -E staging
how shold I set up remote debugging? I have tried also rack and ruby remote.
Tried connection to the remote host and running the service (using the command listed above), and then running the rdebug like so :
rdebug-ide --port 1911 -- $SCRIPT$
where for $SCRIPT$ I have tried app/main.rb staging , unicorn -E staging, unicorn -c etc/fin_srv_unicorn.conf -E staging

Resources