Unable to Connect to RETS Server

503 views
Skip to first unread message

jud...@jntwebdesigns.com

unread,
Apr 28, 2013, 1:20:18 PM4/28/13
to phr...@googlegroups.com
I am trying to get a connection to rets.offutt-innovia.com and am unable to. Using the test connection:

$rets_login_url = $url;
$rets_username = $username;
$rets_password = $password;

$rets->AddHeader("RETS-Version", "RETS/1.7");
$rets->SetParam("cookie_file", $_SERVER['DOCUMENT_ROOT'] . "/addons/retsimport/cookies.txt");
$rets->SetParam("debug_mode", true);
$rets->SetParam("debug_file", $_SERVER['DOCUMENT_ROOT'] . "/addons/retsimport/rets_debug.txt");
echo "+ Connecting to {$rets_login_url} as {$rets_username}<br>\n";
$connect = $rets->Connect($rets_login_url, $rets_username, $rets_password);

// check for errors
if ($connect) {
        echo "  + Connected<br>\n";
}
else {
        echo "  + Not connected:<br>\n";
        print_r($rets->Error());
        exit;
}

$types = $rets->GetMetadataTypes();

// check for errors
if (!$types) {
        print_r($rets->Error());
}
else {
        foreach ($types as $type) {
                echo "+ Resource {$type['Resource']}<br>\n";

                foreach ($type['Data'] as $class) {
                        echo "  + Class {$class['ClassName']}<br>\n";
                }
        }
}

echo "+ Disconnecting<br>\n";
$rets->Disconnect();

I get this returned:

+ Connecting to http://rets.offutt-innovia.com:8080/wnc/login as #USERNAME
+ Not connected:
Array ( [type] => http [code] => 0 [text] => ) 

And my Rets Debug has this:

* About to connect() to rets.offutt-innovia.com port 8080 (#0)
*  Trying 66.192.83.62...
*  Connection refused
* couldn't connect to host
* Closing connection #0

When I login using the same credentials on RETS MD, it works.

Troy Davisson

unread,
Apr 29, 2013, 6:47:52 PM4/29/13
to phr...@googlegroups.com
It sounds like your server isn't allowing outbound connections on port 8080.  The HTTP 0 code is consistent with a condition where cURL isn't able to establish a connection with the server.  The same restriction isn't in place on retsmd.com which is why it's successful there.

As a quick test, can you make a script that includes/requires PHRETS and does:

$rets = new phRETS;
$rets->FirewallTest();

I'd bet that you get back "Firewall Result: All port 6103 tests failed.".  Note that the CRT RETS server included in that test is no longer active, so the best you can currently hope for is the "Firewall Result: At least one port 6103 test passed." message.



--
You received this message because you are subscribed to the Google Groups "PHRETS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phrets+un...@googlegroups.com.
To post to this group, send email to phr...@googlegroups.com.
Visit this group at http://groups.google.com/group/phrets?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Wade Berlin

unread,
Apr 29, 2013, 6:57:57 PM4/29/13
to phr...@googlegroups.com
I don't remember which feed is was, but at least one feed we work required the provider to authorize for our server IP.  that also results in a HTTP 0 condition. As I recall, your RETSMD was authorized, the one I installed on our server wasn't. 


On Apr 29, 2013, at 6:47 pm, Troy Davisson wrote:

It sounds like your server isn't allowing outbound connections on port 8080.  The HTTP 0 code is consistent with a condition where cURL isn't able to establish a connection with the server.  The same restriction isn't in place on retsmd.com which is why it's successful there.


Thank you for your time,
Wade Berlin
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
BrokerIDX Networks - www.brokeridxsites.com
Creative,Affordable, Cutting Edge Technology for the Real Estate Professional
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Al Smith

unread,
Apr 30, 2013, 10:09:54 AM4/30/13
to phr...@googlegroups.com
I had the same issue before, The IP for my production box was not authorized. Once they updated the records everything worked properly.


jud...@jntwebdesigns.com

unread,
May 1, 2013, 12:18:09 AM5/1/13
to phr...@googlegroups.com
Ok, I got connected, but now when trying to get the Meta Data Types, I get this returned:

Array ( [0] => HTTP/1.1 200 OK Date: Wed, 01 May 2013 03:59:56 GMT Server: Apache/2.2.3 (Red Hat) Transfer-Encoding: chunked Content-Type: text/xml;charset=utf-8 [1] => ) SimpleXMLElement Object ( [@attributes] => Array ( [ReplyCode] => 20502 [ReplyText] => Invalid Identifier:The identifier is not known inside the specified resource. ) [0] => )

This is after I edit the rets.inc.php to show the results and xml return.

-- That you Al????
Reply all
Reply to author
Forward
0 new messages