(FileMaker Error #802) (Rfm::Error::UnableToOpenFileError)

301 views
Skip to first unread message

Jim Polk

unread,
May 30, 2012, 7:07:28 PM5/30/12
to rfmcom...@googlegroups.com
Hello,
Am taking first steps to integrate an FM Server 10 database into production...
Installed BitNami Stack, install went fine, Ruby/Gems/RoR all installed w/o issue.
FM Server 10 running on remote MacMini on SnowLep, clients running FMP 10.0v1.
Local clients on Windows7
At Server, and inside each database, all "sharing" turned on,...i.e., WebPub/Java/ODBC,etc...

From my local workstation,...running

-----------------------------  snip  ---------------------------------------------------------------------
#!/usr/bin/env ruby

require 'rubygems'
require 'rfm'

SERVER_CONFIG = {
   :host                     => "192.168.50.71",
   :port                     =>  80,
   :account_name     => "admin",
   :password             => "???",
   :ssl                      => false,
   :root_cert              => false,
   :timeout                => 10
}

DATABASE        =  "MAVS_GUI_TEMPDB"
LAYOUT          =  "Project Varables"             # yes, somebody misspelled it

myServer = Rfm::Server.new(SERVER_CONFIG)

results = myServer[DATABASE][LAYOUT].find("name" => "DSBX_Demo")

results.each {|record|
  puts record["company_abrv"]
  puts record["hub_path"]
}

-----------------------------  snip  ---------------------------------------------------------------------

I get back:

C:\Ruby>ruby rubfm_6.rb
C:/RubyStack-3.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/ginjo-rfm-2.0.2/lib/rfm/resultset.rb:131:in `check_for_errors': UnableToOpenFileError occurred: (FileMaker Er
ror #802) (Rfm::Error::UnableToOpenFileError)
        from C:/RubyStack-3.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/ginjo-rfm-2.0.2/lib/rfm/resultset.rb:78:in `initialize'
        from C:/RubyStack-3.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/ginjo-rfm-2.0.2/lib/rfm/layout.rb:256:in `new'
        from C:/RubyStack-3.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/ginjo-rfm-2.0.2/lib/rfm/layout.rb:256:in `get_records'
        from C:/RubyStack-3.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/ginjo-rfm-2.0.2/lib/rfm/layout.rb:199:in `find'
        from rubfm_6.rb:21:in `<main>'

If I take out the last five or so lines, (removing the 'find' etc)...it runs and exits normally, which appears to me
that it connected and exited normally,...

Can someone advise on what is failing here?...

Thank you very much,
Jim

C:\Ruby>ruby --version
ruby 1.9.3p125 (2012-02-16) [i386-mingw32]


wbr

unread,
May 31, 2012, 6:31:59 PM5/31/12
to rfmcom...@googlegroups.com
Filemaker error 802 is FMS saying it can't access the file you are requesting. It could be a security issue, permissions, file settings, or server settings. Try hitting your Filemaker server with:

    curl -u "user:pass" "http://192.bla.bla.bla/fmi/xml/fmresultset.xml?-db=<YourDbName>&-layoutnames="

The result should give you more info about what the issue is.

Bill

 

Jim Polk

unread,
May 31, 2012, 9:33:57 PM5/31/12
to RFM Community

Hi Bill,...Thanks for responding,..

Hmm...I understand the http line you write, but not clear on the curl
line..
Where do I poke that?..into the Rails Browser line?...or is that all
one line?
On Windows7 here, I don't seem to have a version of curl...
Could you elaborate on how to use?


Since I posted that, I have made some progress (I think, lol)
Now, using pretty much the same input, I get back:

C:/RubyStack-3.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/ginjo-rfm-2.0.2/lib/
rfm/server.rb:335:in `http_fetch': The account name (Admin) or
password provided is not correct (or the account doesn't have the
fmxml extended privilege). (Rfm::AuthenticationError)

Which kinda' sounds like a Windows Authentication issue,...but I could
be mistaken,..
Here is the script:

require 'rubygems'
require 'rfm'



fm = Rfm::Server.new({
:host => "192.168.50.71",
:account_name => "Admin",
:password => "???",
:ssl => false,
:log_actions => true,
:log_responses => true,
:root_cert => false,
:timeout => 180
})

fm["ProgramTestDatabase"]["ProgramTestDatabase"].all.each do |record|
puts record["Item"]
end

puts "DONE!"

------------------------------------------------------------------------------

Here's the full output:

C:\Ruby>ruby r15.rb
http://192.168.50.71:80/fmi/xml/fmresultset.xml?-db=ProgramTestDatabase&-lay=ProgramTestDatabase&-findall=
date: ["Fri, 01 Jun 2012 00:58:46 GMT"]
server: ["Apache/2.2.21 (Unix) PHP/5.3.8 mod_jk/1.2.23"]
cache-control: ["no-cache=\"set-cookie\"", "must-revalidate"]
set-cookie: ["fmi-cookie=fmi-cookie; Path=/; Version=1"]
connection: ["Close"]
www-authenticate: ["Basic realm=\"Database ProgramTestDatabase\""]
expires: ["Tue, 03 May 1988 14:40:00 GMT"]
ms-author-via: ["DAV"]
x-frame-options: ["SameOrigin"]
transfer-encoding: ["chunked"]
content-type: ["text/html; charset=utf-8"]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
TR/html4/strict.dtd">
<html>
<head>
<title>HTTP 401: Forbidden</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td bgcolor="#000099"><h2><font color="ffffff" face="Arial, Helvetica,
sans-serif">HTTP 401: Forbidden</font></h2></td>
</tr>
<tr>
<td><p>&nbsp;</p>
<p><font size="3" face="Arial, Helvetica, sans-serif">Access to this
file is not permitted.</font></p></td>
</tr>
</table>
</body>
</html>
C:/RubyStack-3.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/ginjo-rfm-2.0.2/lib/
rfm/server.rb:335:in `http_fetch': The account name (Admin) or
password provided is not correct (or the account doesn't have the
fmxml extended privilege). (Rfm::AuthenticationError)
from C:/RubyStack-3.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/ginjo-
rfm-2.0.2/lib/rfm/server.rb:274:in `connect'
from C:/RubyStack-3.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/ginjo-
rfm-2.0.2/lib/rfm/layout.rb:255:in `get_records'
from C:/RubyStack-3.2.3-0/ruby/lib/ruby/gems/1.9.1/gems/ginjo-
rfm-2.0.2/lib/rfm/layout.rb:166:in `all'
from r15.rb:18:in `<main>'

-------------------------------------------------------------------------------------------------

Thank you for your help,
Jim
Reply all
Reply to author
Forward
0 new messages