• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFHTTP Error...attempting to access Google Search Appliance

New Here ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

We have a Google Search Appliance (GSA). It cannot be accessed directly through a simple form submission since it is behind our firewall. I have to make a call to it from our website (I am tracking down some docs from Google on this). I can access it when I am VPN'd into our network. SO I thought I would attempt to write a cfc utilizing cfhttp to make the call. I began by writing a simple cfc on a cfm page but I get the following error...

Connection  Failure: Status code unavailable

I have searched all over the web and tried various fixes to no avail. Here is my cfhttp code...

<cfhttp method="get" url="http://googleapp01.corporate-domain.net/search?" timeout="60" throwonerror="yes" charset="utf-8">
    <cfhttpparam type="url" name="proxyreload" value="1">
    <cfhttpparam type="url" name="proxystylesheet" value="activant_com">
    <cfhttpparam type="url" name="getfields" value="*">
    <cfhttpparam type="url" name="q" value="pos" encoded="yes">
    <cfhttpparam type="url" name="btnG" value="Search" encoded="yes">
    <cfhttpparam type="url" name="access" value="p">
    <cfhttpparam type="url" name="output" value="xml_no_dtd">
    <cfhttpparam type="url" name="client" value="activant_com">
    <cfhttpparam type="url" name="site" value="activant_com">
    <cfhttpparam type="url" name="filter" value="p">
</cfhttp>

<cfdump var="#cfhttp#">


So as you can see, nothing especially difficult here, but I cannot figure out why it will not resolve, especially since I can access it through a browser.

Thoughts?

~Clay

TOPICS
Advanced techniques

Views

3.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

Any chance that you are supposed to be connecting to it through SSL with an HTTPS protocol?

How do you exactly connect to the appliance with a browser?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

In my browser, I simply use the url that is parse out into the cfhttp code above. I do not use ssl.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

Couple thoughts.

1) DNS gets cached. So if the server wouldn't normally know the domain in

the URL and you tested and figured that out, then changed the hosts file on

the server, CF still has the old info cached. A restart of the service will

clear that.

2) Where is the browser you are testing with? Physically browsing from the

webserver? If you are on the webserver itself (or remoted into it of

course), and pull up that URL what do you see?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

I am simply browsing from my laptop. I can access it just fine via the browser and plain ol' url, but cannot pull it back with cfhttp.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

The point being is your website server also connected to your vpn? If not

do you have some sort of proxy situation you can leverage so it can connect

through?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

From what the IT guys tell me, there is not proxy on our web server. It should be able to access it. I do not have access to the server itself. Incidentally, I tried a simple iFrame to see if it would pull the url and it does just fine. So I am thinking that it is something with the way cfhttp is functioning.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

If you are sure the server should have no trouble connection then it is

probably DNS. The error you are getting is indicative of that. Ask your

team to open a web browser and view that URL. see what the web browser

shows.

My guess is that your web server has no DNS understanding of that domain you

are sending it too. Or that there is an old hosts record pointing it to the

wrong IP.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

First, from the server console, open a command prompt and try resolving the appliance's name. You can easily do that with ping. If that doesn't work, it's a DNS problem. You can resolve this DNS problem by editing the server's hosts file, getting the appropriate entry added to the DNS server used by your server, or by using the IP address of the appliance instead of the name.

Second, just try to fetch the base URL directly, rather than sending all the URL parameters.

Third, use a tool like Wireshark on the server to examine the traffic between CF and your appliance.

Dave Watts, CTO, Fig Leaf Software

http://www.figleaf.com/

http://training.figleaf.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

If you google "cfhttp connection failure" there's a few different things that people have encountered that yield this error.


Have you investigated them?

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

Yes. That is exactly what I googled and nothing I discovered worked.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 19, 2011 Jan 19, 2011

Copy link to clipboard

Copied

Yes. That is exactly what I googled and nothing I discovered worked.

OK, so to minimise the guess work the rest of us need to do... what have you tried?

The first few posts I read suggested:

* a redirect not being followed;

* HTTP compression being enabled.

(along with various DNS-resolution issues other respondents here seem to already be covering).

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jan 19, 2011 Jan 19, 2011

Copy link to clipboard

Copied

It's worth noting as well that CF maintains its own DNS cache outside the server's own. Only restarting CF will clear it out...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 19, 2011 Jan 19, 2011

Copy link to clipboard

Copied

I tried the compression fix, the redirect fix, the header encoding fix. I also tried resolving with no parameters. Basically everything from the first two pages of the Google search results.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 19, 2011 Jan 19, 2011

Copy link to clipboard

Copied

But did you confirm the server can see the other server by that domain name?

Talk to your web server admin. Dave mentioned using Ping, which is a good

idea and easy to do.

You browsing from your notebook, or using an iframe doesn't prove anything.

The error is saying CF can't http to that URL. For one reason or another.

Probably DNS or firewall related.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 19, 2011 Jan 19, 2011

Copy link to clipboard

Copied

I contacted our IT department. Have not heard back yet.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 26, 2011 Jan 26, 2011

Copy link to clipboard

Copied

Just a thought... try setting the CFHTTP user agent sting to be something "normal" (eg: spoof that you're using Firefox).  I can't recall whether it was with Google or not, but I have certainly had issues with CFHTTPing some services if I use the default user agent that CF uses.  It should not matter, but sometimes it does, it seems.

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 26, 2011 Jan 26, 2011

Copy link to clipboard

Copied

ok...I figured it out. In working with my IT staff, they thought that everything was fine from the network standpoint, but it was not. So my code was fine, but the network needed addressed. So if anyone else runs into this make double sure that there are no network issues.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 26, 2011 Jan 26, 2011

Copy link to clipboard

Copied

fs22, did they mention what the network issue was by any chance?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 26, 2011 Jan 26, 2011

Copy link to clipboard

Copied

LATEST

They did not mention what it was, but my guess qould be that there was a port (80?) that was not allowing traffic through.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 26, 2011 Jan 26, 2011

Copy link to clipboard

Copied

The Google Search Appliance doesn't do any user-agent filtering.

Dave Watts, CTO, Fig Leaf Software

http://www.figleaf.com/

http://training.figleaf.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 19, 2011 Jan 19, 2011

Copy link to clipboard

Copied

The Google Search Appliance doesn't use redirects for this, and compression isn't used - neither of those are problems when fetching GSA results using CF.

Dave Watts, CTO, Fig Leaf Software

http://www.figleaf.com/

http://training.figleaf.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 19, 2011 Jan 19, 2011

Copy link to clipboard

Copied

Thanks for the info, Dave. I had tried that and as you point out...it did not do anything.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 23, 2011 Jan 23, 2011

Copy link to clipboard

Copied

Also experiencing the same error and have not solved it yet. Restarting CF is not the solution.

http://forums.adobe.com/thread/777641?tstart=0

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation