cancel
Showing results for 
Search instead for 
Did you mean: 

debug server side JavaScript -- socket connection problem

Former Member
0 Kudos

Hi all,

I am try to debug server side JavaScript,  but I hit an issue that says

"launching myDebugSession has encountered a problem, unable to connect to SAP HANA XS Server".

This issue has trouble me for a long time. Could someone help me have a look?

Your help is highly appreciate.

My steps:

1, open a port for server side JavaScript debuging. In configuration tab,  add xsengine.ini -> add debugger.

     enable = true.

     listenport = 47112

2, debug configuration in HANA Studio.

    create a new XS JavaScript configuration "myDebugSession". and input the connection properties,

    host:  IP

    Port: 80+instance number

    username : system

    password:  ********

3, Then I add some breakpoints in the JavaScript code, and click the debug button, error occurs. Please see the details in the attached picture.


I find my issue is quite the same with the below link, but I still do not have any idea to fix it.

http://www.saphana.com/message/5688#5688

SAP HANA Studio

Version: 1.0.62

Build id: 201308041203 380773

HDB version info:

  version:             1.50.00.381990

  branch:              orange_COR

  git hash:            not set

  git merge time:      not set

  weekstone:           0000.00.0

  compile date:        2013-09-02 10:19:48

  compile host:        ldm062.server

  compile type:        opt

Does anyone meet this issue before? Is there something I missing?

Thanks in advance.

Regards,

Kai

Accepted Solutions (1)

Accepted Solutions (1)

roberto_falk
Participant
0 Kudos

Hi Kai,

any answer for your question? I'm facing the same problem in my system...

Thanks and regards,

Roberto Falk

Former Member
0 Kudos

Hi,

Please try to add sap.hana.xs.debugger::Debugger role to your user to see whether it can solve your issue.

Regards,
Kai

roberto_falk
Participant
0 Kudos

Hi Kai,

yes, I've done all the steps described in the configuration guide.

Any other tip?

Thanks and regards,

Roberto Falk

Former Member
0 Kudos

Hi,

My problem is fixed by grant the debugger role to my user. At this point, I do not have any idea, sorry for this.

Regards,

Kai

Answers (7)

Answers (7)

Former Member
0 Kudos

I also have the same problem. I am running Rev 68 and have followed the steps about correcting the port (no longer using 47112) and granting the role.

I have noticed in my debugger a server tab which contains a message "no servers are available" Does this indicate a problem?

former_member187794
Participant
0 Kudos

Friends

Does any faced this issue? "Debug is not possible, To allow you to debug, log on to the relevant system".

Yes, we have the required permissions and also gave the Log on details (username and password).

Let me know, if some one has faced this issue and were able to resolve

Thanks for taking time and helping me out

Regards

Giri

former_member182114
Active Contributor
0 Kudos

Hi Kai Xue,

I was following your parameters and reached same problem.

Solution:

  Add the correct parameter enabled, you wrote enable (don't know if is only on thread adding enabled put it to work immediatelly).

Regards, Fernando Da Rós

Former Member
0 Kudos

Hi Thomas and All,

I have tried removing and adding port to xsengine.ini debugger. I have sap.hana.xs.debugger::Debugger role. I am using the right port # in my debug config. But still getting the same error.

Do you have more suggestion?

Best Regards,

Peter.

angel_xiao
Explorer
0 Kudos

Hi Peter,

I have the problem solved by referring to the latest HANA developer guide: http://help.sap.com/hana/SAP_HANA_Developer_Guide_en.pdf

in Chapter 8.8, there are some steps to follow.

Hope it can help.

Best regards,

Angel

roberto_falk
Participant
0 Kudos

Hi Colleagues,

in chapter 8.8 there are 3 basic steps, 1- enable the debug in the xsengine.ini;  2- add the debugger  role for the user; 3- Create the debugger configuration using port 80<SAP_HANA_instance_no>.

- start to debug.

- After, I'm supposed to select the browser session that I want to debug.

The error happens before showing the screen to select the session. It's clear that is not a problem in the chapter 8.8 steps execution, since they are really straightforward...

Any additional help would be much appreciated.

Best regards,

Roberto Falk

Former Member
0 Kudos

Hi Roberto,

In chapter 8.8 of version 1.2 of the developer's guide has no difference than those in version 1.1 which I've already tried. Still no luck.

Any other suggestions?

Best Regards,

Peter.

Former Member
0 Kudos

Hi All,

I updated to rev. 67 and it solved debud problem.

Regards,

    Ivan.

Former Member
0 Kudos

Just upgraded to rev 67, still have the same problem.

Regards,

Peter.

Former Member
0 Kudos

Hi Ivan,

Never mind, I used the wrong port. You are right, rev 67 fixes the problem.

Thank you.

Peter.

roberto_falk
Participant
0 Kudos

Hi,

for those still with problems, after a lot of research, a colleague send me a different solution.

Sometimes, during the HANA upgrades, two lines that are supposed to be added to the file sapwebdisp.pfl are not included. To fix the socket connection problem, verify if the two lines below are part of the sapwebdisp.pfl file, inside your linux server that is running HANA.

icm/server_port_2 = PORT=0, PROT=WEBSOCKET, TIMEOUT=-1

icm/server_port_3 = PORT=0, PROT=WEBSOCKETS, TIMEOUT=-1

I've added these two entries, and after restarting HANA, everything worked again.

Best regards,

Roberto Falk

Former Member
0 Kudos

Hi Robert,

I also have applied the three basic steps with no success. Can you advise me how to access and change the sapwebdisp.pfl file?

I assume most of us have upgraded our AWS server at some point. Has anyone else had to patch the server this way?

Thanks

Cliff

roberto_falk
Participant
0 Kudos

Hi Clifford,

you need to access the linux where HANA is installed. This file is under the following path: /usr/sap/HDB/HDB00/hanaserver/wdisp/sapwebdisp.pfl

Replace HDB and HDB00 for the id and instance of your system.

Best regards,

Roberto Falk

Former Member
0 Kudos

Thank you Roberto,

The file was missing the two entries and so I have added them. This fixed the problem. I surprised more people have not reported the same issue.

Cheer

Cliff

Former Member
0 Kudos

1. i added the two rows to it file but still have socket connection problem:

icm/server_port_2 = PORT=0, PROT=WEBSOCKET, TIMEOUT=-1

icm/server_port_3 = PORT=0, PROT=WEBSOCKETS, TIMEOUT=-1

2. do i need to change the path name of the file '/usr/sap/HDB/HDB00/hanaserver/wdisp/sapwebdisp.pfl' ?

if my host name is 192.168.10.119 and port 8000 how do i need to change the HDB/HDB00 path?

Former Member
0 Kudos

attached print screen. you can see i still dell with the connection problem eventhough i added the two rows to file sapwebdisp.pfl in Hana linux system :

angel_xiao
Explorer
0 Kudos

Hi all,

I've also had the problem solved by referring to the HANA_Developer_Guide Chapter 8.8.

Yet I've encountered a similar authorization problem on debugging SQLScript procedure:

Any idea to fix it?

Thank you and best regards,

Angel

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I believe the answer is in the dialog message: You need SYS.DEBUG Execute privileges granted to your user.

roberto_falk
Participant
0 Kudos

Hi Angel,

we are trying to debug server side JavaScript. Your problem is about debugging procedures, is a different topic.

Att,

Roberto Falk

Former Member
0 Kudos

Have you gone through the developer guide pages 349 to 360?

The configuration for using the debugger has changed. Have you modified the debug configuration in debug perspective to use the http port instead of the old 47112 port you were using? It would be easier to just delete the debug config and recreate it. Secondly also make sure that you have the debugger role assigned to your user.

Former Member
0 Kudos

"Have you gone through the developer guide pages 349 to 360?"

- yep, sure. I also recreated configuration. But nothing changed.

Former Member
0 Kudos

I'm having the same issue, were you able to fix this?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

First of all remove the listenport configuration from the xsengine.ini configuration.  It is no longer needed in SP6 and I've seen it cause just this problem.

The only other issue I see is that your server is a very recent build from Orange (SAP internal), but your Studio is not from Orange and build from the beginning of August.  If your server is from Orange, then your Studio really should be as well.  You might have a mismatch between the debugger APIs on the client/server side since you hitting a server which uses the internal sap-only Orange build.

Former Member
0 Kudos

Hi Thomas,

I am so excited and lucky to get your guidance directly, I've learned a lot from your perfect teaching video and I admire you so much. Thanks.

It is inconvenient to change the version of my Stuido, so I use another Revision version HANA server, and remove the listenport from the xsengine.ini configuration. But I still hit this issue, that says

Unable to connect to SAP HANA XS Server

Socket connection problem.

In the following link, you mentioned that "Make sure that you have opened the HTTP port (80XX where XX is your instance number) in the security group.  It is the main HTTP port which is now used via Web Sockets for the debugging.", I'm not sure if this is the root cause, since I do not know how to open the HTTP port in the security group.  Could you please point me on this? Thanks so much!

http://www.saphana.com/message/5697#5697

SAP HANA Studio

Version: 1.0.62

Build id: 201308041203 380773

HDB version info:

  version:             1.00.63.381310

  branch:              NewDB100_REL

  git hash:            not set

  git merge time:      not set

  weekstone:           0000.00.0

  compile date:        2013-08-19 11:51:23

  compile host:        ld7270.wdf.sap.corp

  compile type:        opt

Regards,

Kai

Former Member
0 Kudos

I have the same issue, but I'm not using HANA One. My server and studio are both rev 61.

I found that under Administration->Diagnosis Files, in dev_webdisp, there is an error generated everytime I start the debugger.

*** ERROR => Upgrade protocol not supported {00071e81} [http_plg.c 7117]

Regards,

Peter.

Former Member
0 Kudos

Hi Thomas,

I have the same issue (server and studio are both rev 66). Listenport is removed from the xsengine.ini, I use port 8000 (my instance is 00), but anyway I get error "Unable to connect to SAP HANA XS Server Socket connection problem. "

Regards,

Ivan.