[From nobody Fri Jul 7 02:43:48 2006 X-Account-Key: account2 Return-Path: <mogilefs-bounces@lists.danga.com> Delivered-To: thusitha@mnetplus.com Received: (qmail 10900 invoked by uid 89); 7 Jul 2006 02:08:31 -0000 Received: by simscan 1.1.0 ppid: 10895, pid: 10896, t: 4.5960s scanners: clamav: 0.88/m:35/d:1235 spam: 3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on mx1.imasopen.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00, DEAR_SOMETHING, HTML_40_50,HTML_MESSAGE,UNPARSEABLE_RELAY autolearn=no version=3.1.0 Received: from unknown (HELO mx2.gk-group.com) (203.94.70.141) by 0 with SMTP; 7 Jul 2006 02:08:26 -0000 Received: from mx2.gk-group.com (mx2.gk-group.com [127.0.0.1]) by localhost.gk-group.com (Postfix) with ESMTP id 0BD47DC0B6 for <thusitha@mnetplus.com>; Fri, 7 Jul 2006 09:14:24 +0600 (LKT) Received: from mx3.imasopen.com (unknown [203.94.70.136])by mx2.gk-group.com (Postfix) with SMTP id DDEDFDC0B7for <thusitha@mnetplus.com>; Thu, 6 Jul 2006 23:14:22 -0400 (EDT) Received: from danga.com ([207.7.148.197])by mx3.imasopen.com (SAVSMTP 3.1.1.32) with SMTP id M2006070708031022869for <thusitha@mnetplus.com>; Fri, 07 Jul 2006 08:03:11 +0600 Received: from localhost (mailx [127.0.0.1])by danga.com (Postfix) with ESMTP id 374F41411AC0;Fri, 7 Jul 2006 02:32:39 +0000 (UTC) Received: from danga.com ([127.0.0.1])by localhost (mailx [127.0.0.1]) (amavisd-new, port 10024) with ESMTPid 07538-07; Fri, 7 Jul 2006 02:32:39 +0000 (UTC) Received: from [127.0.0.1] (mailx [127.0.0.1])by danga.com (Postfix) with ESMTP id 4919F14134A1;Fri, 7 Jul 2006 02:32:38 +0000 (UTC) X-Original-To: mogilefs@lists.danga.com Delivered-To: mogilefs@danga.com Received: from localhost (mailx [127.0.0.1])by danga.com (Postfix) with ESMTP id 6A03E14132D3for <mogilefs@lists.danga.com>; Fri, 7 Jul 2006 02:32:36 +0000 (UTC) Received: from danga.com ([127.0.0.1])by localhost (mailx [127.0.0.1]) (amavisd-new, port 10024) with ESMTPid 07538-04 for <mogilefs@lists.danga.com>;Fri, 7 Jul 2006 02:32:34 +0000 (UTC) Received: from mx1.imasopen.com (mail.imasopen.com [203.94.70.131])by danga.com (Postfix) with ESMTP id 9C19A14132CBfor <mogilefs@lists.danga.com>; Fri, 7 Jul 2006 02:32:32 +0000 (UTC) Received: (qmail 10891 invoked by uid 89); 7 Jul 2006 02:08:10 -0000 Received: by simscan 1.1.0 ppid: 10884, pid: 10886, t: 0.5230sscanners: clamav: 0.88/m:35/d:1235 spam: 3.1.0 Received: from unknown (HELO ?192.168.5.117?)(thusitha@mnetplus.com@192.168.5.117)by 0 with SMTP; 7 Jul 2006 02:08:09 -0000 Message-ID: <44ADC11B.2030803@mnetplus.com> Date: Fri, 07 Jul 2006 08:04:11 +0600 From: thusitha <thusitha@mnetplus.com> User-Agent: Mozilla Thunderbird 1.0RC1 (X11/20041209) X-Accept-Language: en-us, en MIME-Version: 1.0 To: mogilefs@lists.danga.com References: <44AA1F4F.9050501@mnetplus.com><Pine.LNX.4.58.0607041751540.2158 @mailx><44ACE023.9000500@mnetplus.com> In-Reply-To: <44ACE023.9000500@mnetplus.com> Content-Type: multipart/alternative; boundary=------------050209040007020801040407 X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at example.com Subject: Mogilefs client scripts does not work X-BeenThere: mogilefs@lists.danga.com X-Mailman-Version: 2.1.5 Precedence: list List-Id: MogileFS developers and users <mogilefs.lists.danga.com> List-Unsubscribe: <http://lists.danga.com/mailman/listinfo/mogilefs>,<mailto :mogilefs-request@lists.danga.com?subject=unsubscribe> List-Archive: <http://lists.danga.com/pipermail/mogilefs> List-Post: <mailto:mogilefs@lists.danga.com> List-Help: <mailto:mogilefs-request@lists.danga.com?subject=help> List-Subscribe: <http://lists.danga.com/mailman/listinfo/mogilefs>,<mailto:m ogilefs-request@lists.danga.com?subject=subscribe> Sender: mogilefs-bounces@lists.danga.com Errors-To: mogilefs-bounces@lists.danga.com X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at example.com X-imss-version: 2.040 X-imss-result: Passed X-imss-scores: Clean:77.44723 C:2 M:4 S:5 R:5 X-imss-settings: Baseline:4 C:3 M:3 S:3 R:3 (1.0000 1.0000) This is a multi-part message in MIME format. --------------050209040007020801040407 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit thusitha wrote: > I didn't get your point exactly from the last reply. > > the result comes from the $mogfs is MogileFS=ARRAY(0x87d9d84) > > Is this an error code. > > And when I use the $mogfs to create new files and stick them in the system > > I always get the Unable to allocate filehandle. (at the 2nd line what > we have put) > > this is my MogileFS cluster that has been structured. > > 3 (x86 Intel) PCs where all 3 of them have Red Hat EL4 installed. > IP adresses of them > 192.168.5.141 (MySQL 5.0 cluster Management Server ) > 192.168.5.125 (MySQL 5.0 cluster ndb storage node, mogiletracker server) > 192.168.5.117 (MySQL 5.0 cluster ndb storage node, mogiledb server > connected to mysql db, mogilestorage server) > > _Tracker setup (__/etc/mogilefs/mogilefsd.conf)_ > db_dsn DBI:mysql:mogilefs:192.168.5.117 > db_user mog > db_pass mogpass > conf_port 6001 > listener_jobs 5 > > _mogilestorage setup (_/etc/mogilefs/mogstored.conf) > httplisten=0.0.0.0:7500 > mgmtlisten=0.0.0.0:7501 > docroot=/var/mogdata > > this is what I get to _mogadm --lib=/usr/local/share/perl/5.8.4 > --trackers=192.168.5.125:6001 check_ after running it on mogstorage > servever > Checking trackers... > 192.168.5.125:6001 ... OK > > Checking hosts... > [ 1] mogilestorage ... OK > > Checking devices... > host device size(G) used(G) free(G) use% > ---- --------------- ---------- ---------- ---------- ------ > [ 1] dev1 4.780 4.185 0.595 87.55% > ---- --------------- ---------- ---------- ---------- ------ > total: 4.780 4.185 0.595 87.55% > > _these are the installed packages_ > BSD-Resource-1.28 IO-AIO-1.8 > MogileFS-1.00 Perlbal-XS-HTTPHeaders-0.18 > Danga-Socket-1.48 IO-stringy-2.110 > mogilefs-server-1.00 Sys-Syscall-0.21 > DBD-mysql-3.0006 Linux-AIO-1.9 Perlbal-1.41 > > So what went wrong at the client script. > > Can you please send me the written client perl script for the above > configuration > which I can do the create a object, file save and delete in http usage. > > Thanks. > > Thusitha. > > > > > Brad Fitzpatrick wrote: > >>You should ask the $mogfs object what its last error code was when it >>doesn't give you a $fh. >> >> >>On Tue, 4 Jul 2006, thusitha wrote: >> >> >> >>>dear Sir >>> >>>I configured the mogile file system in two machines using Red Hat EL4 >>>platform. db, tracker and storage are perfectly working without any >>>problem. Here I used mysql cluster and it also perfectly working. >>> >>>But I have a problem with client script. Only I can do is creating a >>>object. I used two types of codings. And here they are.. >>>_object create_ >>> >>> >>>use MogileFS; >>>my $mogfs = MogileFS->new(domain => 'testdomain', >>> hosts => [ '192.168.5.125:6001' ], >>> # only on NFS/disk based installations >>> root => '/var/mogdata',); >>>die "Unable to initialize MogileFS object.\n" unless $mogfs; >>> >>>above part works OK. >>> >>>_key create >>> >>>_my $fh = $mogfs->new_file("file_key", "testclass"); >>>die "Unable to allocate filehandle.\n" unless $fh; >>>$fh->print($file_contents); >>>die "Unable to save file to MogileFS.\n" unless $fh->close; >>> >>>this gives the error Unable to allocate filehandle at the 2nd line. >>> >>>_other code (ruby) >>> >>>_ # Create a new instance that will communicate with these trackers: >>> hosts = %w[192.168.5.125:6001] >>> mg = MogileFS::MogileFS.new(:domain => 'testdomain', :hosts => hosts >>> :root => '/var/mogdata') >>> >>> # Stores "A bunch of text to store" into 'some_key' with a class of 'text'. >>> mg.store_content 'some_key', 'testclass', "A bunch of text to store" >>> >>>that code gives so many errors >>> >>>I don't know much about perl scripting. I would like to do the client communication using http. I'll be very thankful if you can send me Most >>>suitable and bias to working client code for file save to delete. >>> >>>Thanks >>> >>>Thusitha A.W. >>> >>> >>> >>> >>> >>> >>> >> >> >> >> > --------------050209040007020801040407 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> thusitha wrote: <blockquote cite="mid44ACE023.9000500@mnetplus.com" type="cite"> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> I didn't get your point exactly from the last reply.<br> <br> the result comes from the <font color="#ff0000">$mogfs</font> is MogileFS=ARRAY(0x87d9d84)<br> <br> Is this an error code. <br> <br> And when I use the $mogfs to create new files and stick them in the system<br> <br> I always get the<font color="#cc0000"> Unable to allocate filehandle. (at the 2nd line what we have put)<br> <br> <font color="#000000">this is my MogileFS cluster that has been structured.<br> <br> 3 (x86 Intel) PCs where all 3 of them have Red Hat EL4 installed.<br> IP adresses of them<br> 192.168.5.141&nbsp;&nbsp; (MySQL 5.0 cluster Management Server )<br> 192.168.5.125 &nbsp; (</font></font><font color="#cc0000"><font color="#000000">MySQL 5.0 cluster ndb storage node, </font></font><font color="#cc0000"><font color="#000000"><font color="#330099">mogiletracker</font> server)<br> 192.168.5.117&nbsp;&nbsp; (</font></font><font color="#cc0000"><font color="#000000">MySQL 5.0 cluster ndb storage node, <font color="#993399"><font color="#330099">mogiledb</font> </font>server connected to mysql db, <font color="#330099">mogilestorage</font> server</font></font><font color="#cc0000"><font color="#000000">)<br> <br> <u>Tracker setup (</u></font></font><font face="Arial, sans-serif"><u><font color="#3333ff">/etc/mogilefs/mogilefsd.conf</font>)</u><br> </font><font color="#006600"><tt>db_dsn DBI:mysql:mogilefs:192.168.5.117<br> db_user mog<br> db_pass mogpass<br> conf_port 6001<br> listener_jobs 5</tt></font><font face="Arial, sans-serif"><font color="#006600"><br> </font><br> <u>mogilestorage setup (</u></font><font face="Arial, sans-serif"><font color="#3333ff">/etc/mogilefs/mogstored.conf</font>)<br> </font><tt><font color="#006600">httplisten=0.0.0.0:7500<br> mgmtlisten=0.0.0.0:7501<br> docroot=/var/mogdata</font></tt><font face="Arial, sans-serif"><br> <br> this is what I get to <u><font color="#3333ff">mogadm --lib=/usr/local/share/perl/5.8.4 --trackers=192.168.5.125:6001 check</font></u> after running it on mogstorage servever<br> </font><tt><font color="#006600">Checking trackers...<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 192.168.5.125:6001 ... OK<br> <br> Checking hosts...<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ 1] mogilestorage ... OK<br> <br> Checking devices...<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host device&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size(G)&nbsp;&nbsp;&nbsp; used(G)&nbsp;&nbsp;&nbsp; free(G)&nbsp;&nbsp; use%<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ---- --------------- ---------- ---------- ---------- ------<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ 1] dev1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.780&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.185&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.595&nbsp; 87.55%<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ---- --------------- ---------- ---------- ---------- ------<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; total:&nbsp;&nbsp;&nbsp;&nbsp; 4.780&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.185&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.595&nbsp; 87.55%<br> </font></tt><font face="Arial, sans-serif"><br> <u>these are the installed packages</u><br> </font><tt>BSD-Resource-1.28&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IO-AIO-1.8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MogileFS-1.00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Perlbal-XS-HTTPHeaders-0.18<br> Danga-Socket-1.48&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IO-stringy-2.110&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mogilefs-server-1.00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sys-Syscall-0.21<br> DBD-mysql-3.0006&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Linux-AIO-1.9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Perlbal-1.41<br> </tt><font face="Arial, sans-serif"><br> So what went wrong at the client script.<br> <br> Can you please send me the written client perl script for the above configuration&nbsp; <br> which I can do the create a object, file save and delete in http usage.<br> <br> Thanks.<br> <br> Thusitha.<br> <br> <br> <br> </font><br> Brad Fitzpatrick wrote: <blockquote cite="midPine.LNX.4.58.0607041751540.2158@mailx" type="cite"> <pre wrap="">You should ask the $mogfs object what its last error code was when it doesn't give you a $fh. On Tue, 4 Jul 2006, thusitha wrote: </pre> <blockquote type="cite"> <pre wrap="">dear Sir I configured the mogile file system in two machines using Red Hat EL4 platform. db, tracker and storage are perfectly working without any problem. Here I used mysql cluster and it also perfectly working. But I have a problem with client script. Only I can do is creating a object. I used two types of codings. And here they are.. _object create_ use MogileFS; my <font color="#ff0000">$mogfs </font>= MogileFS-&gt;new(domain =&gt; 'testdomain', hosts =&gt; [ '192.168.5.125:6001' ], # only on NFS/disk based installations root =&gt; '/var/mogdata',); die "Unable to initialize MogileFS object.\n" unless $mogfs; above part works OK. _key create _my $fh = $mogfs-&gt;new_file("file_key", "testclass"); die "Unable to allocate filehandle.\n" unless $fh; $fh-&gt;print($file_contents); die "Unable to save file to MogileFS.\n" unless $fh-&gt;close; this gives the error Unable to allocate filehandle at the 2nd line. _other code (ruby) _ # Create a new instance that will communicate with these trackers: hosts = %w[192.168.5.125:6001] mg = MogileFS::MogileFS.new(:domain =&gt; 'testdomain', :hosts =&gt; hosts :root =&gt; '/var/mogdata') # Stores "A bunch of text to store" into 'some_key' with a class of 'text'. mg.store_content 'some_key', 'testclass', "A bunch of text to store" that code gives so many errors I don't know much about perl scripting. I would like to do the client communication using http. I'll be very thankful if you can send me Most suitable and bias to working client code for file save to delete. Thanks Thusitha A.W. </pre> </blockquote> <pre wrap=""><!----> </pre> </blockquote> <br> </blockquote> <br> </body> </html> --------------050209040007020801040407-- ]