cam Posted January 22, 2018 Posted January 22, 2018 (edited) All I need to do is hit a specific website (e.g. http://www.my_domain.com/something/here.php)and I don't care if it returns anything or not (e.g. fire and forget). If I set it up to hit www.google.com it works. If I change the domain name to my domain (even without the path) it fails with Net Module Rule 34:406. What am I missing? Edited January 22, 2018 by cam
paulbates Posted January 22, 2018 Posted January 22, 2018 Can you post an image of your Network Resource, covering up key data (keys, account, password) Paul
cam Posted January 22, 2018 Author Posted January 22, 2018 There is no authentication/data... I just need to simply hit a website that I own. For instance, if I create a new resource to www.google.com (with no path) it runs just fine. If I alter that resource and add /news to the path I get a Net Module Rule: 36 error.
paulbates Posted January 22, 2018 Posted January 22, 2018 Can you post a picture of NR, or list all of the fields, settings use? Paul
cam Posted January 22, 2018 Author Posted January 22, 2018 For the life of me I can't remember how to copy/paste an image... Top Section: http GET Host www.google.com Port 80 Path /news [no encode] timeout 500 ms Detail Headers GET /news HTTP/1.1 Host: www.google.com:80 User-Agent: Mozilla/4.0 Actual GET /news HTTP/1.1 Host: www.google.com:80 User-Agent: Mozilla/4.0 I then Save/Save, click on the newly added resource and click test. For this google example I get the errors Subscriber didn't replay to event 1 followed by TCP client resource moved Net Module Rule: 36
Michel Kohanim Posted January 22, 2018 Posted January 22, 2018 Hi cam, 406 = Whatever you are sending is not acceptable by the server: http://www.checkupdown.com/status/E406.html With kind regards, Michel
cam Posted January 22, 2018 Author Posted January 22, 2018 I have a hello.html file here: http://www.justautomated.com/hello.html and it outputs <html><body>hi</body></html>. Works great from any browser. In NR I create a new resource with protocol information: http GET Host: www.justautomated.com Port: 80 Path: /hello.html Timeout: 5,000 URL Encoded (I've tried it both ways) I'm using default headers (didn't touch what ISY adds). Error: TCP client request failed [Net Module Rule: 36:406]
Michel Kohanim Posted January 22, 2018 Posted January 22, 2018 Hi Cam, Maybe the server is looking for some headers you are not sending. The resource itself looks good. With kind regards, Michel
cam Posted January 22, 2018 Author Posted January 22, 2018 Just thought I'd update the thread... apparently most hosting companies run mod_security (an Apache security module) that block inbound requests originating from an HTTP client (e.g. ISY network resources) if that client doesn't have a variety of HTTP header details (Michel posted a link to some of them). I tried every combination of accept headers and I was never able to get the ISY to access my backend server. I also tried to access wiki.universal-device.com using NR and that didn't work (I suspect due to the same mod_security reasons). I gave up and routed the call from iRule for now... If I get the time/patience I'll try it again and post an update.
paulbates Posted January 23, 2018 Posted January 23, 2018 Is the server not on the same lan as the ISY; you can’t use a local nat address (192.168.x.x or 10.x.x.x)? Sent from my iPhone using Tapatalk
cam Posted January 23, 2018 Author Posted January 23, 2018 Is the server not on the same lan as the ISY; you can’t use a local nat address (192.168.x.x or 10.x.x.x)? I do have a server on my LAN but I'm working on some cloud-based automation and I need to execute a Network Resource on a remote/hosted server.
Michel Kohanim Posted January 23, 2018 Posted January 23, 2018 Hi cam, Can you get to https://google.com? With kind regards, Michel
cam Posted January 23, 2018 Author Posted January 23, 2018 Can you get to https://google.com? I was able to access google.com's home page without issue (they must have mod_security disabled and/or allow 3rd party non-browser clients (like the ISY) to connect. I spent several hours late last night and found a solution to allow ISY calls to a remote server with mod_security enabled... We're basically trying to trick the Apache server in thinking the ISY is a browser. Here are the headers I set in the ISY Networking Resource to get it to work: Accept: text/html Accept-Charset: utf-8 Accept-Language: en-US Content-Type: text/html User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 1
Recommended Posts