Unable to show anything on web.

182 views
Skip to first unread message

murvinlai

unread,
Sep 27, 2011, 6:04:38 PM9/27/11
to Log.io
I have just installed following the instructions and "sudo ./install/
server" and "sudo /etc/init.d/log.io-harvester start" but I don't see
the left menu as in the sample (http://logio.org:8998/). my thing has
only empty menu

Result of cat /var/log/log.io/server.log

info - 14:40:09 - Nodes: 0, WebClients: 0, Messages Sent: 0

Result of /var/log/log.io/harvester.log

14:40:19 - Watching: /var/log/log.io/harvester.log (logio_harvester)

ps -A | grep log:
1906 ? 00:00:00 log-server

the configuration is:
cat /etc/log.io/server.conf
/* Log.io log server configuration */

exports.config = {

// Log server port
port: 8998,

// Uncomment to enable basic HTTP authentication
/*
basic_auth: {
username: "foo",
password: "bar"
}
*/
}

cat /etc/log.io/harvester.conf
/* Log.io log harvester configuration */

exports.config = {

// Log server host & port
server: {
host: '127.0.0.1',
port: 8998,
},

// Watch the following log files, defined by label:path mappings
log_file_paths: {
logio_harvester: '/var/log/log.io/harvester.log'
},

// Define name of current machine.
// Alternatively, you can set this name in /etc/profile:
// export LOGIO_HARVESTER_INSTANCE_NAME='my_log_machine'
// If so, comment out the line below
instance_name : 'log_node_1'

}

any idea?

Mike Smathers

unread,
Sep 27, 2011, 6:09:24 PM9/27/11
to lo...@googlegroups.com
Hi murvinlai,

Did you also run the install script for the harvester?

sudo ./install/harvester

murvinlai

unread,
Sep 27, 2011, 6:18:39 PM9/27/11
to Log.io
Yes. I did. I follow every step. I'm using Ubuntu too.

and in the harvester.log , I got this:
15:15:43 - Watching: /var/log/log.io/harvester.log (logio_harvester)

and in the server.log , I got this:
warn -
15:17:31 - Nodes: 0, WebClients: 2, Messages Sent: 0

But I have no idea what the warning is.. or if the warning is
related.



On Sep 27, 3:09 pm, Mike Smathers <msmath...@narrativescience.com>
wrote:

Mike Smathers

unread,
Sep 27, 2011, 6:29:22 PM9/27/11
to lo...@googlegroups.com
So it looks like when you did "ps -A | grep log" you only saw "log-server", there was no "log-harvester" process?  The fact that your server logs says "Nodes: 0" means that the log harvester never connected.

It seems like something is killing the harvester process.  Try running it manually from an node.js interpreter, it should give you a more detailed stack trace if something goes wrong:

sudo su - logio
cd /usr/local/lib/node_modules/
node

// In node.js interpreter:

var node_lib = '/usr/local/lib/node_modules/';
var path = node_lib + 'log.io/harvester/log_harvester.js';

var LogHarvester = require(path).LogHarvester;
var config = require('/etc/log.io/harvester.conf').config;

var harvester = new LogHarvester(config);
harvester.run();

Does running that produce an error message?

murvinlai

unread,
Sep 27, 2011, 7:15:45 PM9/27/11
to Log.io
Hi.. That's what I got:
logio@sandbox1:/usr/local/lib/node_modules$ node
> var node_lib = '/usr/local/lib/node_modules/';
> var path = node_lib + 'log.io/harvester/log_harvester.js';
> var LogHarvester = require(path).LogHarvester;
> var config = require('/etc/log.io/harvester.conf').config;
> var harvester = new LogHarvester(config);
> harvester.run();
16:14:45 - Watching: /var/log/log.io/harvester.log (logio_harvester)
>

and ps -A | grep log:

1906 ? 00:00:02 log-server

nothing for log-harvestor.js




On Sep 27, 3:29 pm, Mike Smathers <msmath...@narrativescience.com>
wrote:

murvinlai

unread,
Sep 27, 2011, 7:17:57 PM9/27/11
to Log.io
Oh... after I run, 2-3 seconds later, I got this:


events.js:47
throw new Error("Uncaught, unspecified 'error' event.");
^
Error: Uncaught, unspecified 'error' event.
at Socket.emit (events.js:47:15)
at Socket.publish (/usr/local/lib/node_modules/socket.io-client/
lib/socket.js:97:15)
at Socket.onError (/usr/local/lib/node_modules/socket.io-client/
lib/socket.js:413:10)
at SocketNamespace.onPacket (/usr/local/lib/node_modules/socket.io-
client/lib/namespace.js:194:23)
at Socket.onPacket (/usr/local/lib/node_modules/socket.io-client/
lib/socket.js:396:30)
at Transport.onPacket (/usr/local/lib/node_modules/socket.io-
client/lib/transport.js:76:17)
at Transport.onData (/usr/local/lib/node_modules/socket.io-client/
lib/transport.js:53:16)
at [object Object].stateChange (/usr/local/lib/node_modules/
socket.io-client/lib/transports/xhr-polling.js:81:16)
at /usr/local/lib/node_modules/socket.io-client/node_modules/
xmlhttprequest/XMLHttpRequest.js:306:9
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/
socket.io-client/node_modules/xmlhttprequest/XMLHttpRequest.js:218:6)

Mike Smathers

unread,
Sep 27, 2011, 7:22:39 PM9/27/11
to lo...@googlegroups.com
Okay that's weird, it looks like the socket.io-client library is using XHR polling instead of Websockets to connect to the socket.io server, which shouldn't happen.

Perhaps you have a version mismatch between your socket.io and socket.io-client libraries, what versions are they?

var io = require('socket.io');
io.version

var io_client = require('socket.io-client');
io_client.version

Both of these should be 0.8.4, or at least 0.8.x

murvinlai

unread,
Sep 27, 2011, 7:31:00 PM9/27/11
to Log.io
both are 0.8.4



On Sep 27, 4:22 pm, Mike Smathers <msmath...@narrativescience.com>
wrote:

Mike Smathers

unread,
Sep 27, 2011, 7:47:34 PM9/27/11
to lo...@googlegroups.com
What version of node.js are you running?

I'm sorry to say I'm running out of ideas, perhaps something on your OS is interfering with internal websocket connections. Maybe try changing the host in your harvester.conf to 'localhost' or '0.0.0.0'?

We've used this build recipe successfully on multiple machines, I'm having trouble isolating the variables between our setups...

murvinlai

unread,
Sep 27, 2011, 8:44:07 PM9/27/11
to Log.io
Sure. I will try to make a clean build of my server and try again.

By the way, can the harvest.js get data from syslog instead of local
file system?

On Sep 27, 4:47 pm, Mike Smathers <msmath...@narrativescience.com>
wrote:

Mike Smathers

unread,
Sep 27, 2011, 9:03:23 PM9/27/11
to lo...@googlegroups.com
Unfortunately no, it doesn't support syslog, only file inputs...

It might also be helpful to see debug-level logging from the log_server, that might provide some clues... In /usr/local/lib/node_modules/log.io/server/log_server.js, change line 88 to:

log_server.io.set('log level', 3);

Then restart the server and tail /var/log/log.io/server.log

Mike Smathers

unread,
Sep 27, 2011, 9:09:22 PM9/27/11
to lo...@googlegroups.com
Actually, you may need to run the server manually to get the debug output to display properly, I need to use a proper logging module. After changing that line in log_server.js, run the server manually:

var node_lib = '/usr/local/lib/node_modules/';
var http_path = node_lib + 'log.io/server/http_server.js';
var log_path = node_lib + 'log.io/server/log_server.js';
var config_path = '/etc/log.io/server.conf';

var config = require(config_path).config;
var http_server = require(http_path);
var HTTPServer = http_server.HTTPServer();
var LogServer = require(log_path).LogServer;

var server = new LogServer(HTTPServer);
server.listen(config.port);

Murvin Lai

unread,
Sep 28, 2011, 6:36:45 PM9/28/11
to lo...@googlegroups.com
I got this after i run it manually on server and start the harverstor:

15:34:56 - Nodes: 0, WebClients: 0, Messages Sent: 0
   warn  - client not handshaken client should reconnect
15:35:56 - Nodes: 0, WebClients: 0, Messages Sent: 0

Murvin Lai

unread,
Sep 28, 2011, 6:38:38 PM9/28/11
to lo...@googlegroups.com
and in the harvestor side, I get this; 

> harvester.run();
15:37:44 - Watching: /var/log/log.io/harvester.log (logio_harvester)
>
>
events.js:47
        throw new Error("Uncaught, unspecified 'error' event.");
              ^
Error: Uncaught, unspecified 'error' event.
    at Socket.emit (events.js:47:15)
    at Socket.publish (/usr/local/lib/node_modules/socket.io-client/lib/socket.js:97:15)
    at Socket.onError (/usr/local/lib/node_modules/socket.io-client/lib/socket.js:413:10)
    at SocketNamespace.onPacket (/usr/local/lib/node_modules/socket.io-client/lib/namespace.js:194:23)
    at Socket.onPacket (/usr/local/lib/node_modules/socket.io-client/lib/socket.js:396:30)
    at Transport.onPacket (/usr/local/lib/node_modules/socket.io-client/lib/transport.js:76:17)
    at Transport.onData (/usr/local/lib/node_modules/socket.io-client/lib/transport.js:53:16)
    at [object Object].stateChange (/usr/local/lib/node_modules/socket.io-client/lib/transports/xhr-polling.js:81:16)
    at /usr/local/lib/node_modules/socket.io-client/node_modules/xmlhttprequest/XMLHttpRequest.js:306:9
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/socket.io-client/node_modules/xmlhttprequest/XMLHttpRequest.js:218:6)


Mike Smathers

unread,
Sep 28, 2011, 6:55:45 PM9/28/11
to lo...@googlegroups.com
Interesting... so apparently this is a known issue, take a look:

One of the socket.io devs suggests doing the following:

I still have no idea why I'm not seeing this problem despite the fact that I'm running the exact same version...
Reply all
Reply to author
Forward
0 new messages