Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage example apparently failing #3

Closed
slimhazard opened this issue Sep 27, 2015 · 2 comments
Closed

Usage example apparently failing #3

slimhazard opened this issue Sep 27, 2015 · 2 comments

Comments

@slimhazard
Copy link

I'm attempting to test logkafka using the usage example from README, apparently without success. When I try to read from the topic created by log_config using the Kafka console consumer, and append lines to the file specified by log_config, I don't see any messages in the topic.

logkafka started with:

$ _install/bin/logkafka -f _install/conf/logkafka.conf -e _install/conf/easylogging.conf

(Exactly as stated in Usage.)

log_config called as:

$ php tools/log_config.php --create --zookeeper=127.0.0.1:2181 --hostname=localhost --log_path=/tmp/test-logkafka --topic=test-logkafka

Then I append lines to the file using echo foo >> /tmp/test-logkafka, and read from the topic test-logkafka using the console consumer, but no messages are consumed.

Zookeeper is periodically emitting these error messages:

[2015-09-27 10:59:45,010] INFO Got user-level KeeperException when processing sessionid:0x1500dde056b003b type:create cxid:0x5607ae0f zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/logkafka Error:KeeperErrorCode = NodeExists for /logkafka (org.apache.zookeeper.server.PrepRequestProcessor)
[2015-09-27 10:59:45,021] INFO Got user-level KeeperException when processing sessionid:0x1500dde056b003b type:create cxid:0x5607ae10 zxid:0xfffffffffffffffe txntype:unknown reqpath:n/a Error Path:/logkafka/client Error:KeeperErrorCode = NodeExists for /logkafka/client (org.apache.zookeeper.server.PrepRequestProcessor)

and:

[2015-09-27 11:13:39,056] ERROR Unexpected Exception:  (org.apache.zookeeper.server.NIOServerCnxn)
java.nio.channels.CancelledKeyException
    at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:73)
    at sun.nio.ch.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:77)
    at org.apache.zookeeper.server.NIOServerCnxn.sendBuffer(NIOServerCnxn.java:418)
    at org.apache.zookeeper.server.NIOServerCnxn.sendResponse(NIOServerCnxn.java:1509)
    at org.apache.zookeeper.server.FinalRequestProcessor.processRequest(FinalRequestProcessor.java:367)
    at org.apache.zookeeper.server.SyncRequestProcessor.flush(SyncRequestProcessor.java:161)
    at org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:98)

The zookeeper shell tells me that the path /logkafka/client does exist. Unfortunately I don't know how to investigate the CancelledKeyException (and I can't say whether any of these error messages are relevant to the problem).

@zheolong
Copy link
Collaborator

zheolong commented Oct 3, 2015

When you create config with $ php tools/log_config.php --create --zookeeper=127.0.0.1:2181 --hostname=localhost --log_path=/tmp/test-logkafka --topic=test-logkafka, please use the true hostname(e.g. output of shell command $ hostname, not localhost).

@zheolong
Copy link
Collaborator

Fixed: check if hostname is localhost when creating or modifying config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants