<!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 (MySQL 5.0 cluster Management Server )<br>
192.168.5.125 (</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 (</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>
192.168.5.125:6001 ... OK<br>
<br>
Checking hosts...<br>
[ 1] mogilestorage ... OK<br>
<br>
Checking devices...<br>
host device size(G) used(G) free(G) use%<br>
---- --------------- ---------- ---------- ---------- ------<br>
[ 1] dev1 4.780 4.185 0.595 87.55%<br>
---- --------------- ---------- ---------- ---------- ------<br>
total: 4.780 4.185 0.595 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 IO-AIO-1.8
MogileFS-1.00 Perlbal-XS-HTTPHeaders-0.18<br>
Danga-Socket-1.48 IO-stringy-2.110
mogilefs-server-1.00 Sys-Syscall-0.21<br>
DBD-mysql-3.0006 Linux-AIO-1.9 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 <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->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.
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>