cancel
Showing results for 
Search instead for 
Did you mean: 

XS Engine HTTP Request: resolving DNS host name failed

Former Member
0 Kudos

Hi community,

i started to use the XS Engine today and i'm getting an error when trying to send a request to a external webservice:

"

Found the following errors:

===========================

Error: HttpClient.request: request failed. The following error occured: unable to establish connection to http://gt-systems.de:80 - internal error code: resolving DNS host name failed (line 8 position 0 in /webservice/test.xsjs)

"

For testing, i wrote a very simple script on my webserver that just returns you the value of the parameter "val".

http://gt-systems.de/test.php?val=thisisatest

First i thought the error could be caused by the cloudshare server, but when i try it on terminal with wget it works perfect:

hanacloud:/tmp/test # wget http://gt-systems.de/test.php?val=thisisatest

--2014-03-19 08:08:04--  http://gt-systems.de/test.php?val=thisisatest

Resolving gt-systems.de... 109.73.52.91

Connecting to gt-systems.de|109.73.52.91|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 11 [text/html]

Saving to: `test.php?val=thisisatest'

100%[======================================>] 11          --.-K/s   in 0s

2014-03-19 08:08:05 (1.40 MB/s) - `test.php?val=thisisatest' saved [11/11]

So i think there is some trouble with HANA.

At least my httpdest:

host = "http://gt-systems.de";

port = 80;

description = "test case";

useSSL = false;

pathPrefix = "/test.php";

authType = none;

useProxy = false;

proxyHost = "";

proxyPort = 0;

timeout = 0;

and xsjs:

$.response.contentType = "text/plain";

var dest = $.net.http.readDestination("webservice", "test");

var client = new $.net.http.Client();

var req = new $.web.WebRequest($.net.http.GET, "?val=bla");

client.request(req, dest);

var response = client.getResponse();

$.response.setBody(response);

So what i'm doing wrong? Thanks a lot for your help.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Please give the proxy details, it shoud work.

useProxy = true;

proxyHost = "xxx.xxxx.sap.corp";

proxyPort = xxxx;

Former Member
0 Kudos

Hi Adam,

Try to write hostname like this

host = "www.gt-systems.de";

rindia
Active Contributor
0 Kudos

Adam,

Try appending the Instance number to your port in XS properties.

Right click on HANA node -> Properties -> XS properties: hostname:80<instancenumber>

Regards

Raj

Former Member
0 Kudos

i checked with 8000, changed the port on HANA server to 80 and also tried with ip address, but still the DNS name cannot be resolved.

Is there maybe kind of a restriction in the SAP User rights or something? I mean the server is running on 80 and accepting incoming and outgoing connections as far as i tested in the terminal.

Former Member
0 Kudos

Adam,

Can you put server ip instead of server name(gt-systems.de) in your url address and check ?

Regards,

Kulwinder

AtulKumarJain
Active Contributor
0 Kudos

Hi Adam,

It seems there is issue with port no,please check http port you can find details video at

http://www.saphana.com/docs/DOC-4284

Best Regards,

Atul