You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Chris Oei <ch...@nestria.com> on 2010/10/27 21:09:45 UTC

0.7 problem on cygwin

Hi all,

I'm getting the following when I try to bootstrap my Cassandra cluster on a
Windows
machine.

INFO 11:47:10,300 Joining: sleeping 30000 ms for pending range setup
 INFO 11:47:40,302 Bootstrapping
ERROR 11:47:40,453 Fatal exception in thread Thread[Thread-5,5,main]
java.lang.AssertionError: Filename must include parent directory.
        at
org.apache.cassandra.io.sstable.Descriptor.fromFilename(Descriptor.ja
va:110)
        at
org.apache.cassandra.streaming.PendingFile$PendingFileSerializer.dese
rialize(PendingFile.java:121)
        at
org.apache.cassandra.streaming.StreamHeader$StreamHeaderSerializer.de
serialize(StreamHeader.java:90)
        at
org.apache.cassandra.streaming.StreamHeader$StreamHeaderSerializer.de
serialize(StreamHeader.java:72)
        at
org.apache.cassandra.net.IncomingTcpConnection.run(IncomingTcpConnect
ion.java:74)

My linux (Ubuntu 10.04) node bootstrapped just fine (using another Ubuntu
node as a
seed). I'm guessing there's some weirdness involving linux vs.
cygwin/Windows filenames.
nodetool says the cygwin node is stuck at "Joining 154.98 KB".

My system (the problem node):
cassandra 0.7.0 RC1 binary (second attempt, dated Oct 26, 2010)
cygwin 1.7
Windows 7 (64-bit)
java 1.6.0_21 hotspot (32-bit, I think)
4 GB RAM

The other nodes (which seem to work fine) are Ubuntu systems.

Also, my data set (for this test) is only 23 MB and nobody except me is
reading or
writing to the cluster.

Ideas, anyone?

Thanks,
Chris

Re: 0.7 problem on cygwin

Posted by ruslan usifov <ru...@gmail.com>.
Here is my patch to solve this problem (it very stupid, bot works), please
use it only in test environment, not in production

2010/10/28 Chris Oei <ch...@nestria.com>

> I guess so. I tried hacking a quick work-around for the "Filename must
> include parent directory", but I got another error (below).
>
> So, since it appears that mixing architectures is not officially supported,
> I think I'll
> give up on this. Goodbye, Windows 7.
>
> Thanks,
> Chris
>
> ERROR 14:07:47,534 Fatal exception in thread Thread[MiscStage:3,5,main]
> java.lang.IllegalStateException: target reports current file is
> \home\software\data\cassandra\data\Logbook\Entries-e-200-Data.db but is
> /home/software/data/cassandra/data/Logbook/Entries-e-200-Data.db
>  at
> org.apache.cassandra.streaming.StreamOutSession.validateCurrentFile(StreamOutSession.java:167)
> at
> org.apache.cassandra.streaming.StreamReplyVerbHandler.doVerb(StreamReplyVerbHandler.java:53)
>  at
> org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:50)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>  at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:636)
>
>
>
> On Wed, Oct 27, 2010 at 2:06 PM, Jonathan Ellis <jb...@gmail.com> wrote:
>
>> Short version: don't mix nodes on different architectures in the same
>> cluster.
>>
>> On Wed, Oct 27, 2010 at 2:09 PM, Chris Oei <ch...@nestria.com> wrote:
>> > Hi all,
>> >
>> > I'm getting the following when I try to bootstrap my Cassandra cluster
>> on a
>> > Windows
>> > machine.
>> >
>> > INFO 11:47:10,300 Joining: sleeping 30000 ms for pending range setup
>> >  INFO 11:47:40,302 Bootstrapping
>> > ERROR 11:47:40,453 Fatal exception in thread Thread[Thread-5,5,main]
>> > java.lang.AssertionError: Filename must include parent directory.
>> >         at
>> > org.apache.cassandra.io.sstable.Descriptor.fromFilename(Descriptor.ja
>> > va:110)
>> >         at
>> > org.apache.cassandra.streaming.PendingFile$PendingFileSerializer.dese
>> > rialize(PendingFile.java:121)
>> >         at
>> > org.apache.cassandra.streaming.StreamHeader$StreamHeaderSerializer.de
>> > serialize(StreamHeader.java:90)
>> >         at
>> > org.apache.cassandra.streaming.StreamHeader$StreamHeaderSerializer.de
>> > serialize(StreamHeader.java:72)
>> >         at
>> > org.apache.cassandra.net.IncomingTcpConnection.run(IncomingTcpConnect
>> > ion.java:74)
>> >
>> > My linux (Ubuntu 10.04) node bootstrapped just fine (using another
>> Ubuntu
>> > node as a
>> > seed). I'm guessing there's some weirdness involving linux vs.
>> > cygwin/Windows filenames.
>> > nodetool says the cygwin node is stuck at "Joining 154.98 KB".
>> >
>> > My system (the problem node):
>> > cassandra 0.7.0 RC1 binary (second attempt, dated Oct 26, 2010)
>> > cygwin 1.7
>> > Windows 7 (64-bit)
>> > java 1.6.0_21 hotspot (32-bit, I think)
>> > 4 GB RAM
>> >
>> > The other nodes (which seem to work fine) are Ubuntu systems.
>> >
>> > Also, my data set (for this test) is only 23 MB and nobody except me is
>> > reading or
>> > writing to the cluster.
>> >
>> > Ideas, anyone?
>> >
>> > Thanks,
>> > Chris
>> >
>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of Riptano, the source for professional Cassandra support
>> http://riptano.com
>>
>
>

Re: 0.7 problem on cygwin

Posted by Chris Oei <ch...@nestria.com>.
I guess so. I tried hacking a quick work-around for the "Filename must
include parent directory", but I got another error (below).

So, since it appears that mixing architectures is not officially supported,
I think I'll
give up on this. Goodbye, Windows 7.

Thanks,
Chris

ERROR 14:07:47,534 Fatal exception in thread Thread[MiscStage:3,5,main]
java.lang.IllegalStateException: target reports current file is
\home\software\data\cassandra\data\Logbook\Entries-e-200-Data.db but is
/home/software/data/cassandra/data/Logbook/Entries-e-200-Data.db
at
org.apache.cassandra.streaming.StreamOutSession.validateCurrentFile(StreamOutSession.java:167)
at
org.apache.cassandra.streaming.StreamReplyVerbHandler.doVerb(StreamReplyVerbHandler.java:53)
at
org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:50)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)



On Wed, Oct 27, 2010 at 2:06 PM, Jonathan Ellis <jb...@gmail.com> wrote:

> Short version: don't mix nodes on different architectures in the same
> cluster.
>
> On Wed, Oct 27, 2010 at 2:09 PM, Chris Oei <ch...@nestria.com> wrote:
> > Hi all,
> >
> > I'm getting the following when I try to bootstrap my Cassandra cluster on
> a
> > Windows
> > machine.
> >
> > INFO 11:47:10,300 Joining: sleeping 30000 ms for pending range setup
> >  INFO 11:47:40,302 Bootstrapping
> > ERROR 11:47:40,453 Fatal exception in thread Thread[Thread-5,5,main]
> > java.lang.AssertionError: Filename must include parent directory.
> >         at
> > org.apache.cassandra.io.sstable.Descriptor.fromFilename(Descriptor.ja
> > va:110)
> >         at
> > org.apache.cassandra.streaming.PendingFile$PendingFileSerializer.dese
> > rialize(PendingFile.java:121)
> >         at
> > org.apache.cassandra.streaming.StreamHeader$StreamHeaderSerializer.de
> > serialize(StreamHeader.java:90)
> >         at
> > org.apache.cassandra.streaming.StreamHeader$StreamHeaderSerializer.de
> > serialize(StreamHeader.java:72)
> >         at
> > org.apache.cassandra.net.IncomingTcpConnection.run(IncomingTcpConnect
> > ion.java:74)
> >
> > My linux (Ubuntu 10.04) node bootstrapped just fine (using another Ubuntu
> > node as a
> > seed). I'm guessing there's some weirdness involving linux vs.
> > cygwin/Windows filenames.
> > nodetool says the cygwin node is stuck at "Joining 154.98 KB".
> >
> > My system (the problem node):
> > cassandra 0.7.0 RC1 binary (second attempt, dated Oct 26, 2010)
> > cygwin 1.7
> > Windows 7 (64-bit)
> > java 1.6.0_21 hotspot (32-bit, I think)
> > 4 GB RAM
> >
> > The other nodes (which seem to work fine) are Ubuntu systems.
> >
> > Also, my data set (for this test) is only 23 MB and nobody except me is
> > reading or
> > writing to the cluster.
> >
> > Ideas, anyone?
> >
> > Thanks,
> > Chris
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>

Re: 0.7 problem on cygwin

Posted by Jonathan Ellis <jb...@gmail.com>.
Short version: don't mix nodes on different architectures in the same cluster.

On Wed, Oct 27, 2010 at 2:09 PM, Chris Oei <ch...@nestria.com> wrote:
> Hi all,
>
> I'm getting the following when I try to bootstrap my Cassandra cluster on a
> Windows
> machine.
>
> INFO 11:47:10,300 Joining: sleeping 30000 ms for pending range setup
>  INFO 11:47:40,302 Bootstrapping
> ERROR 11:47:40,453 Fatal exception in thread Thread[Thread-5,5,main]
> java.lang.AssertionError: Filename must include parent directory.
>         at
> org.apache.cassandra.io.sstable.Descriptor.fromFilename(Descriptor.ja
> va:110)
>         at
> org.apache.cassandra.streaming.PendingFile$PendingFileSerializer.dese
> rialize(PendingFile.java:121)
>         at
> org.apache.cassandra.streaming.StreamHeader$StreamHeaderSerializer.de
> serialize(StreamHeader.java:90)
>         at
> org.apache.cassandra.streaming.StreamHeader$StreamHeaderSerializer.de
> serialize(StreamHeader.java:72)
>         at
> org.apache.cassandra.net.IncomingTcpConnection.run(IncomingTcpConnect
> ion.java:74)
>
> My linux (Ubuntu 10.04) node bootstrapped just fine (using another Ubuntu
> node as a
> seed). I'm guessing there's some weirdness involving linux vs.
> cygwin/Windows filenames.
> nodetool says the cygwin node is stuck at "Joining 154.98 KB".
>
> My system (the problem node):
> cassandra 0.7.0 RC1 binary (second attempt, dated Oct 26, 2010)
> cygwin 1.7
> Windows 7 (64-bit)
> java 1.6.0_21 hotspot (32-bit, I think)
> 4 GB RAM
>
> The other nodes (which seem to work fine) are Ubuntu systems.
>
> Also, my data set (for this test) is only 23 MB and nobody except me is
> reading or
> writing to the cluster.
>
> Ideas, anyone?
>
> Thanks,
> Chris
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

Re: 0.7 problem on cygwin

Posted by ruslan usifov <ru...@gmail.com>.
Sorry for my bad english.

In bootstrup cassandra send full file path between nodes, So for example win
node deside send value-e-27-Data.db file to unix node(cygwin in you case).
Unix node receive full file path of file "value-e-27-Data.db" on win node
i.e.

F:\cassandra\7.0\data\test_1\value-e-27-Data.db

>From this path cassandra detect column family(value), and keyspace(test_1).
It use for this  File.separatorChar(
http://download.oracle.com/javase/1.4.2/docs/api/java/io/File.html). So, as
on unix File.separatorChar="/", but file path have "\" as filepath
separator, you got assertion


Here is code from org\apache.cassandra.io.sstable.Descriptor.java with cause
assertion

    /**
     * @see #fromFilename(File directory, String name)
     */
    public static Descriptor fromFilename(String filename)
    {
        int separatorPos = filename.lastIndexOf(File.separatorChar);
        assert separatorPos != -1 : "Filename must include parent
directory.";
        File directory = new File(filename.substring(0, separatorPos));
        String name = filename.substring(separatorPos+1, filename.length());
        return fromFilename(directory, name).left;
    }



On linux or systems with the same File.separatorChar all ok. This behaivour
only when you bootsatrap on load balance. In initial cluster all ok too,
because no stream between nodes



2010/10/27 Chris Oei <ch...@nestria.com>

> Sorry -- I don't quite understand: what is not supported by cassandra? The
> bin directory contains
> cassandra.bat, so I assumed cassandra works on Windows. Do you mean that
> cassandra works on
> Windows but not on cygwin? I had already checked my cassandra.yaml file to
> make sure that
> I used backslashes instead of forward slashes.
>
> I don't think I had this problem on 0.6.5.
>
> Thanks,
> Chris
>
>
> On Wed, Oct 27, 2010 at 12:35 PM, ruslan usifov <ru...@gmail.com>wrote:
>
>> It occurs from for differences between pathseparator chars in windows(\)
>> and unix(or mac os("/")), and this doesn't supported by cassandra. If you
>> interesting a cant send patch to you which solve this problem. Why so? i
>> don't know this question to developers of cassandra
>>
>> 2010/10/27 Chris Oei <ch...@nestria.com>
>>
>> Hi all,
>>>
>>> I'm getting the following when I try to bootstrap my Cassandra cluster on
>>> a Windows
>>> machine.
>>>
>>> INFO 11:47:10,300 Joining: sleeping 30000 ms for pending range setup
>>>  INFO 11:47:40,302 Bootstrapping
>>> ERROR 11:47:40,453 Fatal exception in thread Thread[Thread-5,5,main]
>>> java.lang.AssertionError: Filename must include parent directory.
>>>         at
>>> org.apache.cassandra.io.sstable.Descriptor.fromFilename(Descriptor.ja
>>> va:110)
>>>         at
>>> org.apache.cassandra.streaming.PendingFile$PendingFileSerializer.dese
>>> rialize(PendingFile.java:121)
>>>         at
>>> org.apache.cassandra.streaming.StreamHeader$StreamHeaderSerializer.de
>>> serialize(StreamHeader.java:90)
>>>         at
>>> org.apache.cassandra.streaming.StreamHeader$StreamHeaderSerializer.de
>>> serialize(StreamHeader.java:72)
>>>         at
>>> org.apache.cassandra.net.IncomingTcpConnection.run(IncomingTcpConnect
>>> ion.java:74)
>>>
>>> My linux (Ubuntu 10.04) node bootstrapped just fine (using another Ubuntu
>>> node as a
>>> seed). I'm guessing there's some weirdness involving linux vs.
>>> cygwin/Windows filenames.
>>> nodetool says the cygwin node is stuck at "Joining 154.98 KB".
>>>
>>> My system (the problem node):
>>> cassandra 0.7.0 RC1 binary (second attempt, dated Oct 26, 2010)
>>> cygwin 1.7
>>> Windows 7 (64-bit)
>>> java 1.6.0_21 hotspot (32-bit, I think)
>>> 4 GB RAM
>>>
>>> The other nodes (which seem to work fine) are Ubuntu systems.
>>>
>>> Also, my data set (for this test) is only 23 MB and nobody except me is
>>> reading or
>>> writing to the cluster.
>>>
>>> Ideas, anyone?
>>>
>>> Thanks,
>>> Chris
>>>
>>
>>
>

Re: 0.7 problem on cygwin

Posted by Chris Oei <ch...@nestria.com>.
Sorry -- I don't quite understand: what is not supported by cassandra? The
bin directory contains
cassandra.bat, so I assumed cassandra works on Windows. Do you mean that
cassandra works on
Windows but not on cygwin? I had already checked my cassandra.yaml file to
make sure that
I used backslashes instead of forward slashes.

I don't think I had this problem on 0.6.5.

Thanks,
Chris

On Wed, Oct 27, 2010 at 12:35 PM, ruslan usifov <ru...@gmail.com>wrote:

> It occurs from for differences between pathseparator chars in windows(\)
> and unix(or mac os("/")), and this doesn't supported by cassandra. If you
> interesting a cant send patch to you which solve this problem. Why so? i
> don't know this question to developers of cassandra
>
> 2010/10/27 Chris Oei <ch...@nestria.com>
>
> Hi all,
>>
>> I'm getting the following when I try to bootstrap my Cassandra cluster on
>> a Windows
>> machine.
>>
>> INFO 11:47:10,300 Joining: sleeping 30000 ms for pending range setup
>>  INFO 11:47:40,302 Bootstrapping
>> ERROR 11:47:40,453 Fatal exception in thread Thread[Thread-5,5,main]
>> java.lang.AssertionError: Filename must include parent directory.
>>         at
>> org.apache.cassandra.io.sstable.Descriptor.fromFilename(Descriptor.ja
>> va:110)
>>         at
>> org.apache.cassandra.streaming.PendingFile$PendingFileSerializer.dese
>> rialize(PendingFile.java:121)
>>         at
>> org.apache.cassandra.streaming.StreamHeader$StreamHeaderSerializer.de
>> serialize(StreamHeader.java:90)
>>         at
>> org.apache.cassandra.streaming.StreamHeader$StreamHeaderSerializer.de
>> serialize(StreamHeader.java:72)
>>         at
>> org.apache.cassandra.net.IncomingTcpConnection.run(IncomingTcpConnect
>> ion.java:74)
>>
>> My linux (Ubuntu 10.04) node bootstrapped just fine (using another Ubuntu
>> node as a
>> seed). I'm guessing there's some weirdness involving linux vs.
>> cygwin/Windows filenames.
>> nodetool says the cygwin node is stuck at "Joining 154.98 KB".
>>
>> My system (the problem node):
>> cassandra 0.7.0 RC1 binary (second attempt, dated Oct 26, 2010)
>> cygwin 1.7
>> Windows 7 (64-bit)
>> java 1.6.0_21 hotspot (32-bit, I think)
>> 4 GB RAM
>>
>> The other nodes (which seem to work fine) are Ubuntu systems.
>>
>> Also, my data set (for this test) is only 23 MB and nobody except me is
>> reading or
>> writing to the cluster.
>>
>> Ideas, anyone?
>>
>> Thanks,
>> Chris
>>
>
>

Re: 0.7 problem on cygwin

Posted by ruslan usifov <ru...@gmail.com>.
It occurs from for differences between pathseparator chars in windows(\)
and unix(or mac os("/")), and this doesn't supported by cassandra. If you
interesting a cant send patch to you which solve this problem. Why so? i
don't know this question to developers of cassandra

2010/10/27 Chris Oei <ch...@nestria.com>

> Hi all,
>
> I'm getting the following when I try to bootstrap my Cassandra cluster on a
> Windows
> machine.
>
> INFO 11:47:10,300 Joining: sleeping 30000 ms for pending range setup
>  INFO 11:47:40,302 Bootstrapping
> ERROR 11:47:40,453 Fatal exception in thread Thread[Thread-5,5,main]
> java.lang.AssertionError: Filename must include parent directory.
>         at
> org.apache.cassandra.io.sstable.Descriptor.fromFilename(Descriptor.ja
> va:110)
>         at
> org.apache.cassandra.streaming.PendingFile$PendingFileSerializer.dese
> rialize(PendingFile.java:121)
>         at
> org.apache.cassandra.streaming.StreamHeader$StreamHeaderSerializer.de
> serialize(StreamHeader.java:90)
>         at
> org.apache.cassandra.streaming.StreamHeader$StreamHeaderSerializer.de
> serialize(StreamHeader.java:72)
>         at
> org.apache.cassandra.net.IncomingTcpConnection.run(IncomingTcpConnect
> ion.java:74)
>
> My linux (Ubuntu 10.04) node bootstrapped just fine (using another Ubuntu
> node as a
> seed). I'm guessing there's some weirdness involving linux vs.
> cygwin/Windows filenames.
> nodetool says the cygwin node is stuck at "Joining 154.98 KB".
>
> My system (the problem node):
> cassandra 0.7.0 RC1 binary (second attempt, dated Oct 26, 2010)
> cygwin 1.7
> Windows 7 (64-bit)
> java 1.6.0_21 hotspot (32-bit, I think)
> 4 GB RAM
>
> The other nodes (which seem to work fine) are Ubuntu systems.
>
> Also, my data set (for this test) is only 23 MB and nobody except me is
> reading or
> writing to the cluster.
>
> Ideas, anyone?
>
> Thanks,
> Chris
>