SAP / node-rfc

Asynchronous, non-blocking SAP NW RFC SDK bindings for Node.js
Apache License 2.0
255 stars 74 forks source link

Login always fail on ubuntu server, Mac works fine. #201

Closed cheesepaulo closed 3 years ago

cheesepaulo commented 3 years ago

Server: Ubuntu server 20.04 LTS X64 SDK: nwrfc750P_5-70002752 Node: v14.15.4 Node-RFC: 2.4.0

Mac: OSX Catalina SDK: nwrfc750P_7-80002761 Node: 14.15.0 Node-RFC: 2.4.0

Same code for development and production, and always fail login when run at production. Password sap adjusted to be simple, aka: 123456

In development environment using mac always works.

I put some console logs to check password is sending correct. Maybe an sdk version related bug? I check internally sap response and points to an error in password.

Tested also with nwrfc750P_6-70002752 linux sdk and fails with the same error.

Error log:

{
  "name": "RfcLibError",
  "group": 3,
  "code": 2,
  "codeString": "RFC_LOGON_FAILURE",
  "key": "RFC_LOGON_FAILURE",
  "message": "Name or password is incorrect (repeat logon)"
}
bsrdjan commented 3 years ago

Which connection parameters are used in connection open method?

Do you use sapnwrfc.ini file with credentials eventually different in a file on your notebook and on the server?

See: https://github.com/SAP/node-rfc/blob/master/doc/usage.md#client

cheesepaulo commented 3 years ago

Same base code, server and my notebook.

Tested login using sapnwrfc.ini and also sending auth params inline.

DEST=QA2 USER=example PASSWD=123456 ASHOST=172.220.0.21 SYSNR=00 LANG=EN

Inline auth

const auth_params = {
  "user": "sample",
  "passwd": "sanple",
  "ashost": "172.220.0.21",
  "sysnr": '00',
  "lang": 'PT',
  "dest": "QA2"
};

const noderfc = require("node-rfc");
export const rfc_poll = new noderfc.Pool({ connectionParameters: auth_params });
cheesepaulo commented 3 years ago

@bsrdjan Solved using nwrfc750P_7-70002752 SDK. Thanks for helping!

As suspected was a problem with sdk version.