Wikimedia with Parsoid 0.4.0 doesn't start or doesn't connect properly with nodejs - parsoid

I have parsoid 0.4.0 from mediawiki, nodejs v0.10.25, when I /etc/init.d/parsoid start, I receive workers restarting having the next messages in the parsoid.log, this message is repeated indefinitely, making my parsoid.log growing indefinitely, another hand I don't recerive any response at http://localhost:8142, 8142 is the port where my parsoid says is serving when I start with "/etc/init.d/parsoid start with the output message:
root#vscj016mlinuxserver:/usr/lib# /etc/init.d/parsoid start
Started Parsoid server on port 8142
root#vscj016mlinuxserver:/usr/lib#
/var/log/parsoid.log output :
[info][master][13876] initializing 4 workers
[info][worker][13879] loading ...
[info][worker][13882] loading ...
[info][worker][13878] loading ...
[info][worker][13881] loading ...
[fatal][worker][13879] uncaught exception Object function createApplication() {
var app = function(req, res, next) {
app.handle(req, res, next);
};
mixin(app, EventEmitter.prototype, false);
mixin(app, proto, false);
app.request = { __proto__: req, app: app };
app.response = { __proto__: res, app: app };
app.init();
return app;
} has no method 'createServer'
TypeError: Object function createApplication() {
var app = function(req, res, next) {
app.handle(req, res, next);
};
mixin(app, EventEmitter.prototype, false);
mixin(app, proto, false);
app.request = { __proto__: req, app: app };
app.response = { __proto__: res, app: app };
app.init();
return app;
} has no method 'createServer'
at new ParsoidService (/usr/lib/parsoid/src/api/ParsoidService.js:23:20)
at Object.<anonymous> (/usr/lib/parsoid/src/api/server.js:202:12)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
On another hand I can see de processes started with "ps -ef | grep parsoid", de pids of the processes change everytime as you can see with the next output like:
parsoid 920 1 0 09:08 ? 00:00:00 /bin/sh -c /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js >> /var/log/parsoid/parsoid.log 2>&1
parsoid 949 920 0 09:08 ? 00:00:01 /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js
parsoid 2563 949 18 09:13 ? 00:00:00 /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js
parsoid 2565 949 19 09:13 ? 00:00:00 /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js
parsoid 2567 949 17 09:13 ? 00:00:00 /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js
parsoid 2569 949 5 09:13 ? 00:00:00 /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js
root 2572 2134 0 09:13 pts/0 00:00:00 grep --color=auto parsoid
root#vscj016mlinuxserver:/var/log/parsoid# ps -ef| grep parsoid
parsoid 920 1 0 09:08 ? 00:00:00 /bin/sh -c /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js >> /var/log/parsoid/parsoid.log 2>&1
parsoid 949 920 0 09:08 ? 00:00:01 /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js
parsoid 2579 949 23 09:13 ? 00:00:00 /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js
parsoid 2581 949 23 09:13 ? 00:00:00 /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js
parsoid 2583 949 0 09:13 ? 00:00:00 /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js
parsoid 2585 949 0 09:13 ? 00:00:00 /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js
root 2588 2134 0 09:13 pts/0 00:00:00 grep --color=auto parsoid
root#vscj016mlinuxserver:/var/log/parsoid# ps -ef| grep parsoid
parsoid 920 1 0 09:08 ? 00:00:00 /bin/sh -c /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js >> /var/log/parsoid/parsoid.log 2>&1
parsoid 949 920 0 09:08 ? 00:00:01 /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js
parsoid 2581 949 22 09:13 ? 00:00:00 /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js
parsoid 2583 949 30 09:13 ? 00:00:00 /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js
parsoid 2585 949 28 09:13 ? 00:00:00 /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js
parsoid 2589 949 15 09:13 ? 00:00:00 /usr/bin/nodejs /usr/lib/parsoid/src/api/server.js -c /etc/mediawiki/parsoid/settings.js
I show the /etc/mediawiki/parsoid/settings.js aswell:
exports.setup = function(parsoidConfig) {
// Set your own user-agent string
// Otherwise, defaults to "Parsoid/<current-version-defined-in- package.json>"
//parsoidConfig.userAgent = "My-User-Agent-String";
// The URL of your MediaWiki API endpoint.
parsoidConfig.setMwApi('localhost', {uri: 'http://localhost/mediawiki/api.php'} );
// To specify a proxy (or proxy headers) specific to this prefix (which
// overrides defaultAPIProxyURI) use:
/*
parsoidConfig.setMwApi('localhost', {
uri: 'http://localhost/w/api.php',
// set `proxy` to `null` to override and force no proxying.
proxy: {
uri: 'http://my.proxy:1234/',
headers: { 'X-Forwarded-Proto': 'https' } // headers are optional
}
});
*/
......
......
......
Here I show the packets installed and the version of my ubuntu server:
root#vscj016mlinuxserver:/usr/lib# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
root#vscj016mlinuxserver:/usr/lib#
root#vscj016mlinuxserver:/usr/lib#
root#vscj016mlinuxserver:/usr/lib# dpkg -l parsoid
Deseado=Desconocido/Instalar/Eliminar/Purgar/Retener
| Estado=No/Instalado/Config-files/Desempaquetado/Medio-conf/Medio- inst/espera-disparo/pendiente-disparo
|/ Err?=(ninguno)/Requiere-reinst (Estado,Err: mayúsc.=malo)
||/ Nombre Versión Arquitectura Descripción
+++-=================================-=====================- =====================- =======================================================================
ii parsoid 0.4.0 amd64 Web service converting HTML+RDFa to MediaWiki wikitext and back
root#vscj016mlinuxserver:/usr/lib# dpkg -l nodejs
Deseado=Desconocido/Instalar/Eliminar/Purgar/Retener
| Estado=No/Instalado/Config-files/Desempaquetado/Medio-conf/Medio- inst/espera-disparo/pendiente-disparo
|/ Err?=(ninguno)/Requiere-reinst (Estado,Err: mayúsc.=malo)
||/ Nombre Versión Arquitectura Descripción
+++-=================================-=====================- =====================- =======================================================================
ii nodejs 0.10.25~dfsg2-2ubuntu amd64 evented I/O for V8 javascript
root#vscj016mlinuxserver:/usr/lib# dpkg -l nodejs-legacy
Deseado=Desconocido/Instalar/Eliminar/Purgar/Retener
| Estado=No/Instalado/Config-files/Desempaquetado/Medio-conf/Medio- inst/espera-disparo/pendiente-disparo
|/ Err?=(ninguno)/Requiere-reinst (Estado,Err: mayúsc.=malo)
||/ Nombre Versión Arquitectura Descripción
+++-=================================-=====================- =====================- =======================================================================
ii nodejs-legacy 0.10.25~dfsg2-2ubuntu all evented I/O for V8 javascript (legacy symlink)
root#vscj016mlinuxserver:/usr/lib#

You're going to have a much better time with a newer version of Node, for example >=4.3. You can use NVM to run manage different versions of Node: https://github.com/creationix/nvm

this my /etc/mediawiki/parsoid configuration:
exports.setup = function(parsoidConfig) {
// Set your own user-agent string
// Otherwise, defaults to "Parsoid/<current-version-defined-in- package.json>"
//parsoidConfig.userAgent = "My-User-Agent-String";
// The URL of your MediaWiki API endpoint.
parsoidConfig.setMwApi('localhost', { uri: 'http://localhost/mediawiki/api.php' });
// To specify a proxy (or proxy headers) specific to this prefix (which
// overrides defaultAPIProxyURI) use:
/*
parsoidConfig.setMwApi('localhost', {
uri: 'http://localhost/w/api.php',
// set `proxy` to `null` to override and force no proxying.
proxy: {
uri: 'http://my.proxy:1234/',
headers: { 'X-Forwarded-Proto': 'https' } // headers are optional
}
});
*/

This is my parsoid configuration , I don't Know if this is the problema:
exports.setup = function(parsoidConfig) {
// Set your own user-agent string
// Otherwise, defaults to "Parsoid/<current-version-defined-in- package.json>"
//parsoidConfig.userAgent = "My-User-Agent-String";
// The URL of your MediaWiki API endpoint.
parsoidConfig.setMwApi('localhost', { uri: 'http://localhost/mediawiki/api.php' });
// To specify a proxy (or proxy headers) specific to this prefix (which
// overrides defaultAPIProxyURI) use:
/*
parsoidConfig.setMwApi('localhost', {
uri: 'http://localhost/w/api.php',
// set `proxy` to `null` to override and force no proxying.
proxy: {
uri: 'http://my.proxy:1234/',
headers: { 'X-Forwarded-Proto': 'https' } // headers are optional
}
});
*/

Related

Error in docker-compose server is not defined

I'm trying to run a very simple docker-compose.yml, but am getting a "ReferenceError: server is not defined" from index.js in the client container.
| /app/index.js:6
node-app_1 | host: redis-server,
node-app_1 | ^
Here's the code:
index.js
const express = require('express');
const redis = require('redis');
const app = express();
const client = redis.createClient({
host: redis-server,
port: 6379
});
client.set('visits', 0);
app.get('/', (req,res) => {
client.get('visits', (err,visits) => {
res.send('Number of visit is: ' + visits);
client.set('visits', parseInt(visits) + 1);
})
})
app.listen(8081, () =>{
console.log('Listening on port 8081');
})
docker-compose.yml
version: '3'
services:
redis-server:
image: 'redis'
node-app:
build: .
ports:
- '4001:8081'
Output of docker-compose up
redis-server_1 | 1:C 07 Nov 2020 16:52:30.899 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis-server_1 | 1:C 07 Nov 2020 16:52:30.900 # Redis version=6.0.9, bits=64, commit=00000000, modified=0, pid=1, just started
redis-server_1 | 1:C 07 Nov 2020 16:52:30.900 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis-server_1 | 1:M 07 Nov 2020 16:52:30.901 * Running mode=standalone, port=6379.
redis-server_1 | 1:M 07 Nov 2020 16:52:30.902 # Server initialized
redis-server_1 | 1:M 07 Nov 2020 16:52:30.902 * Loading RDB produced by version 6.0.9
redis-server_1 | 1:M 07 Nov 2020 16:52:30.902 * RDB age 180 seconds
redis-server_1 | 1:M 07 Nov 2020 16:52:30.902 * RDB memory usage when created 0.77 Mb
redis-server_1 | 1:M 07 Nov 2020 16:52:30.903 * DB loaded from disk: 0.000 seconds
redis-server_1 | 1:M 07 Nov 2020 16:52:30.903 * Ready to accept connections
node-app_1 |
node-app_1 | > start
node-app_1 | > node index.js
node-app_1 |
node-app_1 | /app/index.js:6
node-app_1 | host: redis-server,
node-app_1 | ^
node-app_1 |
node-app_1 | ReferenceError: server is not defined
node-app_1 | at Object.<anonymous> (/app/index.js:6:17)
node-app_1 | at Module._compile (node:internal/modules/cjs/loader:1083:30)
node-app_1 | at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
node-app_1 | at Module.load (node:internal/modules/cjs/loader:948:32)
node-app_1 | at Function.Module._load (node:internal/modules/cjs/loader:789:14)
node-app_1 | at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:72:12)
node-app_1 | at node:internal/main/run_main_module:17:47
node-app_1 | npm ERR! code 1
node-app_1 | npm ERR! path /app
node-app_1 | npm ERR! command failed
node-app_1 | npm ERR! command sh -c node index.js
node-app_1 |
node-app_1 | npm ERR! A complete log of this run can be found in:
node-app_1 | npm ERR! /root/.npm/_logs/2020-11-07T16_52_31_324Z-debug.log
visits_node-app_1 exited with code 1
It doesn't find "redis-server", but according to the udemy course, it should find it because that's how it's identified in the composer.
What's the problem?
"redis-server" should be a string, and denoted by quotes:
const client = redis.createClient({
host: 'redis-server',
port: 6379
});

I get an EADDRINUSE error when trying to start my project with pm2

I get the following error when running 'pm2 start project.json' in my project.
port: 3000 }
0|serv | Tue, 08 Sep 2020 03:14:18 GMT app LoadSettingFromRedis: loaded
0|serv | { Error: listen EADDRINUSE 127.0.0.1:3000
0|serv | at Server.setupListenHandle [as _listen2] (net.js:1360:14)
0|serv | at listenInCluster (net.js:1401:12)
0|serv | at doListen (net.js:1510:7)
0|serv | at _combinedTickCallback (internal/process/next_tick.js:142:11)
0|serv | at process._tickCallback (internal/process/next_tick.js:181:9)
0|serv | errno: 'EADDRINUSE',
0|serv | code: 'EADDRINUSE',
0|serv | syscall: 'listen',
0|serv | address: '127.0.0.1',
0|serv | port: 3000 }
0|serv | Tue, 08 Sep 2020 03:15:08 GMT app LoadSettingFromRedis: loaded
0|serv | Tue, 08 Sep 2020 03:20:43 GMT app LoadSettingFromRedis: loaded
When I check what process is listening on port 3000, I get node. I kill this process, but it still doesn't solve the issue. Does anyone know what is the problem here?
It means your port is already in use. Try killing port with following command
sudo kill -9 $(sudo lsof -t -i:3000)
if that not works try following
sudo lsof -i tcp:3000 // this will return some PIDs
sudo kill -9 [your pid to remove]
Then run pm2 start command again

How port is reused by multiple node application process

When I run the same application which uses os port multiple times in java application(example ) I get below exception.
Exception in thread "main" java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
node_cluster.js
const cluster = require('cluster'),
cpus = require('os').cpus().length;
cluster.setupMaster({
exec: '3_worker.js'
});
if(cluster.isMaster) {
for(let i = 0; i< cpus; i++) {
cluster.fork();
}
cluster.on('fork', worker => console.log(worker.id + " is forked"));
cluster.on('listening', (worker, address) => console.log(worker.id + "is listening on " + JSON.stringify(address)));
cluster.on('online', worker => console.log(`${worker.id} is online`));
cluster.on('disconnect', worker => console.log(`${worker.id} is disconnected`));
cluster.on('exit', (worker, code, signal) => console.log(`${worker.id} is dead due to ${code} and ${signal}`));
}
3_worker.js
const http = require('http');
http.createServer((req, res) => {
console.log(req.url);
res.writeHead(200);
res.end('hello');
}).listen(8080);
The above programs return result -
3is listening on {"addressType":4,"address":null,"port":8080}
5is listening on {"addressType":4,"address":null,"port":8080}
4is listening on {"addressType":4,"address":null,"port":8080}
7is listening on {"addressType":4,"address":null,"port":8080}
8is listening on {"addressType":4,"address":null,"port":8080}
2is listening on {"addressType":4,"address":null,"port":8080}
1is listening on {"addressType":4,"address":null,"port":8080}
6is listening on {"addressType":4,"address":null,"port":8080}
The output of ps is -
$ ps
PID TTY TIME CMD
4477 ttys001 0:00.16 /bin/bash -l
5219 ttys001 0:00.12 node 3_clustering.js
5220 ttys001 0:00.14 /Users/rajkumar.natarajan/.nvm/versions/node/v8.15.0/b
5221 ttys001 0:00.14 /Users/rajkumar.natarajan/.nvm/versions/node/v8.15.0/b
5222 ttys001 0:00.13 /Users/rajkumar.natarajan/.nvm/versions/node/v8.15.0/b
5223 ttys001 0:00.14 /Users/rajkumar.natarajan/.nvm/versions/node/v8.15.0/b
5224 ttys001 0:00.14 /Users/rajkumar.natarajan/.nvm/versions/node/v8.15.0/b
5225 ttys001 0:00.14 /Users/rajkumar.natarajan/.nvm/versions/node/v8.15.0/b
5226 ttys001 0:00.14 /Users/rajkumar.natarajan/.nvm/versions/node/v8.15.0/b
5227 ttys001 0:00.14 /Users/rajkumar.natarajan/.nvm/versions/node/v8.15.0/b
5794 ttys002 0:00.05 /bin/bash --rcfile /Applications/IntelliJ IDEA.app/Con
6063 ttys003 0:00.03 /Applications/Utilities/iTerm.app/Contents/MacOS/iTerm
6065 ttys003 0:00.04 -bash
How multiple node.js process are able to listen on same port.
Only the master has the port opened. It handles all incoming and outgoing traffic on the port and offloads the traffic to the worker threads for processing.

mongodb : SyncSourceFeedbackThread] SEVERE: Invalid access at address: 0xa8

last night out mongodb replset r1 was crashed ,then monit restart it.
this is process stats:
mongod 1390 1 0 Aug15 ? 00:39:29 /usr/bin/mongod -f /etc/mongod.conf
root 1967 1 8 Aug15 ? 18:53:29 /usr/bin/mongos -f /etc/mongod_route.conf
mongod 2127 1 0 Aug15 ? 00:56:07 /usr/bin/mongod -f /etc/mongod_r2.conf
mongod 2514 1 0 Aug15 ? 01:07:33 /usr/bin/mongod -f /etc/mongod_config.conf
mongod 2552 1 0 Aug15 ? 00:49:41 /usr/bin/mongod -f /etc/mongod_arbiter.conf
root 7722 21913 0 03:04 ? 00:00:00 [mongod_r1] <defunct>
mongod 7733 1 0 03:04 ? 00:05:06 /usr/bin/mongod -f /etc/mongod_r1.conf
root 13964 12745 0 11:52 pts/0 00:00:00 grep --color mongo
this is mongodb log:
2015-08-25T03:03:53.425+0800 [conn140823] authenticate db: local { authenticate: 1, nonce: "xxx", user: "__system", key: "xxx" }
2015-08-25T03:03:53.430+0800 [conn140823] replset couldn't find a slave with id 0, not tracking 53d71c612ea2da0bd4c469e6
2015-08-25T03:03:53.432+0800 [SyncSourceFeedbackThread] SEVERE: Invalid access at address: 0xa8
2015-08-25T03:03:53.565+0800 [SyncSourceFeedbackThread] SEVERE: Got signal: 11 (Segmentation fault).
Backtrace:0x11bd301 0x11bc6de 0x11bc7cf 0x33d060f710 0xeacaf6 0xeb19e8 0x1145332 0x1201c99 0x33d06079d1 0x36818e88fd
/usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0x11bd301]
/usr/bin/mongod() [0x11bc6de]
/usr/bin/mongod() [0x11bc7cf]
/lib64/libpthread.so.0() [0x33d060f710]
/usr/bin/mongod(_ZN5mongo18SyncSourceFeedback13replHandshakeEv+0xb86) [0xeacaf6]
/usr/bin/mongod(_ZN5mongo18SyncSourceFeedback3runEv+0x9b8) [0xeb19e8]
/usr/bin/mongod(_ZN5mongo13BackgroundJob7jobBodyEv+0xd2) [0x1145332]
/usr/bin/mongod() [0x1201c99]
/lib64/libpthread.so.0() [0x33d06079d1]
/lib64/libc.so.6(clone+0x6d) [0x36818e88fd]
2015-08-25T03:04:17.172+0800 ***** SERVER RESTARTED *****
2015-08-25T03:04:17.178+0800 [initandlisten] MongoDB starting : pid=7733 port=1201 dbpath=/data/mongo_r1 64-bit host=x2
2015-08-25T03:04:17.178+0800 [initandlisten] db version v2.6.0
2015-08-25T03:04:17.178+0800 [initandlisten] git version: 1c1c76aeca21c5983dc178920f5052c298db616c
2015-08-25T03:04:17.178+0800 [initandlisten] build info: Linux build14.nj1.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2015-08-25T03:04:17.178+0800 [initandlisten] allocator: tcmalloc
2015-08-25T03:04:17.178+0800 [initandlisten] options: { config: "/etc/mongod_r1.conf", net: { bindIp: "10.165.46.132", port: 1201 }, processManagement: { fork: true, pidFilePath: "/var/run/mongodb/mongod_r1.pid" },
what happened?

Issue sending metrics with statsd

I was using the following instructions to install and configure StatsD on a Graphite server:
https://www.digitalocean.com/community/tutorials/how-to-configure-statsd-to-collect-arbitrary-stats-for-graphite-on-ubuntu-14-04
Now that I have a server with StatsD running, I do not see the metrics being logged under /var/log/statsd/statsd.log when I am testing sending them from the command line. Here is what I see:
29 Oct 02:30:39 - server is up
29 Oct 02:47:49 - reading config file: /etc/statsd/localConfig.js
29 Oct 02:47:49 - server is up
29 Oct 14:16:45 - reading config file: /etc/statsd/localConfig.js
29 Oct 14:16:45 - server is up
29 Oct 15:36:47 - reading config file: /etc/statsd/localConfig.js
29 Oct 15:36:47 - DEBUG: Loading server: ./servers/udp
29 Oct 15:36:47 - server is up
29 Oct 15:36:47 - DEBUG: Loading backend: ./backends/graphite
29 Oct 15:36:47 - DEBUG: numStats: 3
The log stays at the last entry of 'numStats: 3', even though I keep entering different metrics at the command line.
Here are a sample of the metrics I entered:
echo "sample.gauge:14|g" | nc -u -w0 127.0.0.1 8125
echo "sample.gauge:10|g" | nc -u -w0 127.0.0.1 8125
echo "sample.count:1|c" | nc -u -w0 127.0.0.1 8125
echo "sample.set:50|s" | nc -u -w0 127.0.0.1 8125
Of interest, I see this under /var/log/statsd/stderr.log:
events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:901:11)
at Server._listen2 (net.js:1039:14)
at listen (net.js:1061:10)
at Server.listen (net.js:1135:5)
at /usr/share/statsd/stats.js:383:16
at null.<anonymous> (/usr/share/statsd/lib/config.js:40:5)
at EventEmitter.emit (events.js:95:17)
at /usr/share/statsd/lib/config.js:20:12
at fs.js:268:14
at Object.oncomplete (fs.js:107:15)
Here is what my localConfig.js file looks like:
{
graphitePort: 2003
, graphiteHost: "localhost"
, port: 8125
, graphite: {
legacyNamespace: false
},
debug: true,
dumpMessages: true
}
Would anybody be able to shed some light as to where the problem lies?
Thanks!
There is a management interface available by default on port 8126: https://github.com/etsy/statsd/blob/master/docs/admin_interface.md
You likely have another service listening on that port in the same system.
Try this:
# localConfig.js
{
graphitePort: 2003
, graphiteHost: "localhost"
, port: 8125
, mgmt_port: 8127
, graphite: {
legacyNamespace: false
},
debug: true,
dumpMessages: true
}
See https://github.com/etsy/statsd/blob/master/exampleConfig.js#L28

Resources