Closed irieksts closed 12 years ago
Thanks Duc.
Your right. We should change it to use the whole IP address. We can replace "." with "_".
I'll make the change.
-brian
Brian O'Neill Lead Architect, Software Development Health Market Science | 2700 Horizon Drive | King of Prussia, PA 19406 p: 215.588.6024 www.healthmarketscience.com
On 4/12/12 12:37 PM, "Duc M. Quoc" <reply+i-3931864-0f403dfde1f53fa0e2f362dd9d7e2bbacf5baf5e-897229@reply.gith ub.com> wrote:
The getHostName() using NetworkInterface can retrieve correct hostname on physical machines but on VM sometimes it resolves to IPv4 or IPv6. If it resolve to 192.168.22.208 then the triggers can have lots of logs:
ERROR [Thread-42] 2012-04-05 22:38:41,891 TriggerTask.java (line 56) Could not execute triggers. InvalidRequestException(why:unconfigured columnfamily CommitLog_192) at org.apache.cassandra.thrift.ThriftValidation.validateColumnFamily(ThriftVa lidation.java:129) at org.apache.cassandra.thrift.CassandraServer.get_range_slices(CassandraServ er.java:672) at com.hmsonline.cassandra.triggers.CommitLog.getPending(CommitLog.java:80) at com.hmsonline.cassandra.triggers.TriggerTask.run(TriggerTask.java:38) at java.lang.Thread.run(Thread.java:662) ERROR [Thread-42] 2012-04-12 22:38:41,891 TriggerTask.java (line 56) Could not execute triggers. InvalidRequestException(why:unconfigured columnfamily CommitLog_192) at org.apache.cassandra.thrift.ThriftValidation.validateColumnFamily(ThriftVa lidation.java:129) at org.apache.cassandra.thrift.CassandraServer.get_range_slices(CassandraServ er.java:672) at com.hmsonline.cassandra.triggers.CommitLog.getPending(CommitLog.java:80) at com.hmsonline.cassandra.triggers.TriggerTask.run(TriggerTask.java:38) at java.lang.Thread.run(Thread.java:662)
I also tried java.net.InetAddress.getLocalHost().getHostName() , and it seems to always get the hostname (on VM) , but fully-qualified domain name on physical machines which is not so good as well.
Reply to this email directly or view it on GitHub: https://github.com/hmsonline/cassandra-triggers/pull/31#issuecomment-50951 20
Fixed in: https://github.com/hmsonline/cassandra-triggers/pull/32
-brian
Brian O'Neill Lead Architect, Software Development Health Market Science | 2700 Horizon Drive | King of Prussia, PA 19406 p: 215.588.6024 www.healthmarketscience.com
On 4/12/12 12:39 PM, "Brian O'Neill" boneill42@gmail.com wrote:
Thanks Duc.
Your right. We should change it to use the whole IP address. We can replace "." with "_".
I'll make the change.
-brian
Brian O'Neill Lead Architect, Software Development Health Market Science | 2700 Horizon Drive | King of Prussia, PA 19406 p: 215.588.6024 www.healthmarketscience.com
On 4/12/12 12:37 PM, "Duc M. Quoc" <reply+i-3931864-0f403dfde1f53fa0e2f362dd9d7e2bbacf5baf5e-897229@reply.git h ub.com> wrote:
The getHostName() using NetworkInterface can retrieve correct hostname on physical machines but on VM sometimes it resolves to IPv4 or IPv6. If it resolve to 192.168.22.208 then the triggers can have lots of logs:
ERROR [Thread-42] 2012-04-05 22:38:41,891 TriggerTask.java (line 56) Could not execute triggers. InvalidRequestException(why:unconfigured columnfamily CommitLog_192) at org.apache.cassandra.thrift.ThriftValidation.validateColumnFamily(ThriftV a lidation.java:129) at org.apache.cassandra.thrift.CassandraServer.get_range_slices(CassandraSer v er.java:672) at com.hmsonline.cassandra.triggers.CommitLog.getPending(CommitLog.java:80) at com.hmsonline.cassandra.triggers.TriggerTask.run(TriggerTask.java:38) at java.lang.Thread.run(Thread.java:662) ERROR [Thread-42] 2012-04-12 22:38:41,891 TriggerTask.java (line 56) Could not execute triggers. InvalidRequestException(why:unconfigured columnfamily CommitLog_192) at org.apache.cassandra.thrift.ThriftValidation.validateColumnFamily(ThriftV a lidation.java:129) at org.apache.cassandra.thrift.CassandraServer.get_range_slices(CassandraSer v er.java:672) at com.hmsonline.cassandra.triggers.CommitLog.getPending(CommitLog.java:80) at com.hmsonline.cassandra.triggers.TriggerTask.run(TriggerTask.java:38) at java.lang.Thread.run(Thread.java:662)
I also tried java.net.InetAddress.getLocalHost().getHostName() , and it seems to always get the hostname (on VM) , but fully-qualified domain name on physical machines which is not so good as well.
Reply to this email directly or view it on GitHub: https://github.com/hmsonline/cassandra-triggers/pull/31#issuecomment-5095 1 20
thanks Brian
The getHostName() using NetworkInterface can retrieve correct hostname on physical machines but on VM sometimes it resolves to IPv4 or IPv6. If it resolve to 192.168.22.208 then the triggers can have lots of logs:
I also tried java.net.InetAddress.getLocalHost().getHostName() , and it seems to always get the hostname (on VM) , but fully-qualified domain name on physical machines which is not so good as well.