Search Results

Search found 5 results on 1 pages for 'jishi'.

Page 1/1 | 1 

  • How do I host node.js apps with pm2 without running them as root?

    - by jishi
    I have setup pm2 to run a node.js application, and I can successfully start it and it will resurrect upon reboot. However, the pm2 daemon is ran as root, which makes me think that all my node-scripts also runs as root? Even though I added them as a regular user in the system. The log files and stuff is created in the users home dir, /~/.pm2/logs, but the logs are owned by root. when I invoke pm2 startup (which handles the installation of the init.d script etc), it creates /etc/init.d/pm2-init.sh which looks like this: #!/bin/bash # chkconfig: 2345 98 02 # # description: PM2 next gen process manager for Node.js # processname: pm2 # ### BEGIN INIT INFO # Provides: pm2 # Required-Start: # Required-Stop: # Should-Start: # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: PM2 init script # Description: PM2 is the next gen process manager for Node.js ### END INIT INFO NAME=pm2 PM2=/usr/local/lib/node_modules/pm2/bin/pm2 NODE=/usr/local/bin/node export HOME="/root" start() { echo "Starting $NAME" $NODE $PM2 stopAll $NODE $PM2 resurrect } stop() { $NODE $PM2 dump $NODE $PM2 stopAll } restart() { echo "Restarting $NAME" stop start } status() { echo "Status for $NAME:" $NODE $PM2 list RETVAL=$? } case "$1" in start) start ;; stop) stop ;; status) status ;; restart) restart ;; *) echo "Usage: {start|stop|status|restart}" exit 1 ;; esac exit $RETVAL When I dump the processes (which is what it will use when resurrecting the processes), I see mentions of user "USER":"pi" but I don't think that it's actually run as user pi. Any thoughts?

    Read the article

  • Simulate SNMP traps to test surveillance

    - by jishi
    I'm trying to use Net-SNMP on Windows to emulate a trap that should trigger an alarm on our surveillance system. This is the setup: Windows 7 client that sends the trap Net-SNMP as software for sending the trap Linux with Adventnet ManageEngine OpManager as NMS (not relevant) This is what I'm trying to accomplish send trap with OID .1.3.6.1.4.1.5089.1.0.1 (according to the MIB I have loaded into my NMS) and just some sort of message into it to see if I can get any alarm in my NMS. I can see that I actually send a trap in my firewall, but I have no idea what it contains. This is my attempt so far: snmptrap.exe -v 2c -c xxxxxxx 192.168.100.65 '' 6 0 .1.3.6.1.4.1.5089.1.0.1 s "123456" However, I can't seem to find any reasonable documentation with examples for snmptrap. Basically, I need to know what: '' <- why do I need this? I can omit it and it will still send a trap 6 <- Enterprise gneric trap, I assume. Is this correct? 0 <- I have no idea, I need some sort of value for this .1.3.6.1.4.1.5089.1.0.1 <- the enterprise specific OID I assume, should this be followed by some more numbers s <- indicates string "123456" <- just a random test-string... This doesn't make much sense to me, and if anyone can shed some light on this I would be very grateful.

    Read the article

  • Web deploy (msdeploy), syncing everything but sites and pools (but include siteDefaults)

    - by jishi
    Today I do the following to sync two webservers but skip all site configuration: msdeploy -verb:sync -source:webServer -dest:webServer,computerName=web25:8080 -skip:objectName=section,absolutePath=system.applicationHost/sites -skip:objectName=section,absolutePath=system.applicationHost/applicationPools However, this effectively also skip the siteDefaults, which I do like to sync (system.applicationHost/sites/siteDefaults) There doesn't seem to be a way to "include" a section, to override the skip directive. And there doesn't seem to be a way to sync only the siteDefaults section from applicationHost either, since source appHostConfig only seem to sync a specified site, and not siteDefaults. Maybe it is possible to "skip" using an Xpath expression or similar, to only skip the nodes, but include , but I find the documentation a bit confusing and my Xpath is rusty.

    Read the article

  • Do I need DELL OpenManage to generate snmp traps on RAID degradation?

    - by jishi
    I need to setup surveillance on all our servers to spot any RAID degradation in time. However, not all of our servers have OpenManage installed, and since they are in production I don't like the idea of installing it on them. Therefor: Is it necessary to have it installed in order to get an event-log for any degradation of the RAID? Because, if I get an event-log I can send an SNMP trap, if I understand it correctly. I thought it was the driver that responsible for the event-logging, but on a machine that recently had a degradation, I can't seem to find any log event for it.

    Read the article

  • Server.TransferRequest returns blank page on specific server

    - by jishi
    I'm facing an issue that seems to be related to configuration. I have a webapplication based on MonoRail, where we utilize the routing feature from MonoRail. On the first request after the application has started, the routing isn't initialized. To circumvent this, I have the following code in Application_OnError(): public virtual void Application_OnError() { if ( // identified as routing error ) Server.TransferRequest( Context.Request.RawUrl, false ); return; } Problem beeing that on our development server (which runs server 2008 R2, with IIS 7.5 and .NET 3.5) returns a blank page without headers, but on my workstation (which runs win7, IIS 7.5 and .NET 3.5) it works fine. What could be the cause of this? If the code in Application_OnError() throws an exception, what would be the expected output? I have verified the following: The access-log shows one entry, I'm not sure if a TransferRequest would show up as a second entry when invoked successfully The application actually do some work according to my internal logs, and it doesn't die since a subsequent requests works flawlessly (because routing will be active) Any hints on what to look for would be greatly appreciated!

    Read the article

1