<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>DataStax Support Forums &#187; Topic: Truncate and &#34;Unable to complete request: one or more nodes were unavailable&#34; Error</title>
		<link>http://www.datastax.com/support-forums/topic/truncate-and-unable-to-complete-request-one-or-more-nodes-were-unavailable-error</link>
		<description>Software, Support, and Training for Apache Cassandra</description>
		<language>en-US</language>
		<pubDate>Tue, 21 May 2013 10:28:01 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.3</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.datastax.com/support-forums/search.php</link>
		</textInput>
		<atom:link href="http://www.datastax.com/support-forums/rss/topic/truncate-and-unable-to-complete-request-one-or-more-nodes-were-unavailable-error" rel="self" type="application/rss+xml" />

		<item>
			<title>tamar on "Truncate and &#34;Unable to complete request: one or more nodes were unavailable&#34; Error"</title>
			<link>http://www.datastax.com/support-forums/topic/truncate-and-unable-to-complete-request-one-or-more-nodes-were-unavailable-error#post-8244</link>
			<pubDate>Mon, 31 Dec 2012 11:54:11 +0000</pubDate>
			<dc:creator>tamar</dc:creator>
			<guid isPermaLink="false">8244@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Getting similar behavior, but not exactly:&#60;br /&#62;
1. We are in early test stages, we have only one node. Other cql3 commands work fine from the same cql session.&#60;br /&#62;
2. The operation fails. The data remains in the table.&#60;br /&#62;
3. Hard stoping Cassandra (the one node...) and restarting was the only way to solve the problem&#60;br /&#62;
4. Cassandra 1.1.7 (upgraded a week ago from 1.1.6)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jpotter on "Truncate and &#34;Unable to complete request: one or more nodes were unavailable&#34; Error"</title>
			<link>http://www.datastax.com/support-forums/topic/truncate-and-unable-to-complete-request-one-or-more-nodes-were-unavailable-error#post-8033</link>
			<pubDate>Thu, 20 Dec 2012 17:35:41 +0000</pubDate>
			<dc:creator>jpotter</dc:creator>
			<guid isPermaLink="false">8033@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;We're trying to run truncate on a columnfamily in a cluster running cassandra 1.1.4 but getting an error, &#34;Unable to complete request: one or more nodes were unavailable&#34;.&#60;/p&#62;
&#60;p&#62;The error *appears* to be spurious, in that the truncate completes, but I don't like what I'm seeing, as the same command works fine on a test cluster without the error (also a 1.1.4 cluster). The prod cluster was initially started on cassandra 1.0.x; and we had two hard node failures that we had to force remove the tokens on (replication factor = 3; so no data loss).&#60;/p&#62;
&#60;p&#62;    cqlsh:app&#38;gt; truncate b_projectstatsbucket;&#60;br /&#62;
    Unable to complete request: one or more nodes were unavailable.&#60;/p&#62;
&#60;p&#62;But the command actually works:&#60;/p&#62;
&#60;p&#62;    cqlsh:app&#38;gt; select * from b_projectstatsbucket;&#60;br /&#62;
    cqlsh:app&#38;gt; &#60;/p&#62;
&#60;p&#62;Inserting a row and checking it again:&#60;/p&#62;
&#60;p&#62;    cqlsh:app&#38;gt; insert into b_projectstatsbucket (uuid, active) values ('5999c46f-ad38-43f2-899c-5c6db97e470b', 'True');&#60;br /&#62;
    cqlsh:app&#38;gt; select * from b_projectstatsbucket;&#60;br /&#62;
     uuid                                 &#124; active&#60;br /&#62;
    --------------------------------------+-------------+&#60;br /&#62;
     5999c46f-ad38-43f2-899c-5c6db97e470b &#124;        True &#124;&#60;/p&#62;
&#60;p&#62;    cqlsh:app&#38;gt; truncate b_projectstatsbucket;&#60;br /&#62;
    Unable to complete request: one or more nodes were unavailable.&#60;br /&#62;
    cqlsh:app&#38;gt; select * from b_projectstatsbucket;&#60;br /&#62;
    cqlsh:app&#38;gt; &#60;/p&#62;
&#60;p&#62;The cassandra logs show these entries when this command is run:&#60;/p&#62;
&#60;p&#62;    INFO 2012-12-355 16:20:13,612 Cannot perform truncate, some hosts are down&#60;br /&#62;
    INFO [Thrift:16] 2012-12-20 16:20:13,612 StorageProxy.java (line 1192) Cannot perform truncate, some hosts are down&#60;/p&#62;
&#60;p&#62;However, no nodes are down:&#60;/p&#62;
&#60;p&#62;    nodetool ring&#60;br /&#62;
    Note: Ownership information does not include topology, please specify a keyspace.&#60;br /&#62;
    Address         DC          Rack        Status State   Load            Owns                Token&#60;br /&#62;
                                                                                               141784319550391026443072753096570088106&#60;br /&#62;
    10.x.x.1   xxx     b          Up     Normal  xxx GB       16.67%              1&#60;br /&#62;
    10.x.x.2   xxx     a          Up     Normal  xxx GB       16.67%              28356863910078205288614550619314017621&#60;br /&#62;
    10.x.x.3    xxx     b          Up     Normal  xxx GB       16.67%              56713727820156410577229101238628035242&#60;br /&#62;
    10.x.x.4    xxx     a          Up     Normal  xxx GB        16.67%              85070591730234615865843651857942052864&#60;br /&#62;
    10.x.x.5    xxx     b          Up     Normal  xxx GB        16.67%              113427455640312821154458202477256070485&#60;br /&#62;
    10.x.x.6  xxx     a          Up     Normal  xxx GB        16.67%              141784319550391026443072753096570088106&#60;/p&#62;
&#60;p&#62;And gossip info shows nodes in NORMAL or LEFT state (I ran unsafeAssassinateEndpoint to get a number of &#34;removed&#34; nodes into LEFT state -- nodes that we had to force-remove the token due to failed cluster migration stuff -- similar to &#60;a href=&#34;https://issues.apache.org/jira/browse/CASSANDRA-3876&#34; rel=&#34;nofollow&#34;&#62;https://issues.apache.org/jira/browse/CASSANDRA-3876&#60;/a&#62; -- but restarting nodes did not clear it out. Was this ok?)&#60;/p&#62;
&#60;p&#62;nodetool gossipinfo &#124; grep STATUS&#60;br /&#62;
  STATUS:LEFT,10876113728672349282005072061992923682,1356220177260&#60;br /&#62;
  STATUS:NORMAL,1&#60;br /&#62;
  STATUS:NORMAL,113427455640312821154458202477256070485&#60;br /&#62;
  STATUS:NORMAL,141784319550391026443072753096570088106&#60;br /&#62;
  STATUS:LEFT,10876113728672349282005072061992923682,1356220258126&#60;br /&#62;
  STATUS:NORMAL,56713727820156410577229101238628035242&#60;br /&#62;
  STATUS:NORMAL,28356863910078205288614550619314017621&#60;br /&#62;
  STATUS:LEFT,10876113728672349282005072061992923682,1356219977587&#60;br /&#62;
  STATUS:LEFT,10876113728672349282005072061992923682,1356218804433&#60;br /&#62;
  STATUS:LEFT,10878842786151078770452885825817290206,1356280367454&#60;br /&#62;
  STATUS:NORMAL,85070591730234615865843651857942052864&#60;/p&#62;
&#60;p&#62;(I'm a little confused why the token position on all the LEFT nodes is  108761137...; they were at different positions when in the &#34;removed&#34; state. Also, after running the unsafeAssassinateEndpoint command yesterday on the &#34;removed&#34; nodes, they all showed as LEFT, but today, one of them went back to &#34;removed&#34; -- wondering if there's something not correctly garbage-collected here?)&#60;/p&#62;
&#60;p&#62;Checking via mx4j:&#60;br /&#62;
   &#60;a href=&#34;http://&#38;lt;nodeip&#38;gt;:&#38;lt;port&#38;gt;/getattribute?objectname=org.apache.cassandra.db:type=StorageService&#38;#038;attribute=UnreachableNodes&#38;#038;format=collection&#38;#038;template=viewcollection&#34; rel=&#34;nofollow&#34;&#62;http://&#38;lt;nodeip&#38;gt;:&#38;lt;port&#38;gt;/getattribute?objectname=org.apache.cassandra.db:type=StorageService&#38;#038;attribute=UnreachableNodes&#38;#038;format=collection&#38;#038;template=viewcollection&#60;/a&#62;&#60;br /&#62;
gives an empty list (fwiw; it does not give an empty list on a test cluster where we removed a node but didn't assassinate the endpoint -- but in that test cluster, we didn't force remove a token / failed node -- and in the test cluster the truncate works -- so I may be chasing down the wrong path here. Note: I did not assassinate any nodes before seeing this issue; the first assassination was done while trying to fix this problem.)&#60;/p&#62;
&#60;p&#62;Looking at line 1192 of StorageProxy.java for the 1.1.4 src, it's calling isAnyHostDown(); which is defined as:&#60;br /&#62;
    return !Gossiper.instance.getUnreachableMembers().isEmpty();&#60;br /&#62;
which is defined as:&#60;br /&#62;
    return unreachableEndpoints.keySet();&#60;/p&#62;
&#60;p&#62;Calling StorageService.UnreachableNodes calls Gossiper.instance.getUnreachableMembers, so I'm definitely confused by what I'm seeing: the error in the logs is only reachable when the list isn't empty; but JMX is showing the list as empty.&#60;/p&#62;
&#60;p&#62;Is it possible that the cause of the error is not, in fact, unreachable members, but an InvalidRequestException, for whatever reason? Or something else?&#60;/p&#62;
&#60;p&#62;Any clues at this point would be greatly appreciated.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
