-
Notifications
You must be signed in to change notification settings - Fork 78
can't get data from RFC call randomly #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The console log does not show any error, only success in some cases. Is the console log complete, any error ever returned? Could you please test with standard BAPI and post the console output: bapitest.js // create new client
const client = new Client(abapSystem);
// open connection
client.connect(function (err) {
if (err) {
// check for login/connection errors
return console.error("could not connect to server", err);
}
// echo SAP NWRFC SDK and nodejs/RFC binding version
console.log("id:" + client.id + ", isAlive:" + client.alive);
// console.log(client.environment);
try {
client.invoke("BAPI_USER_GET_DETAIL", { USERNAME: client.connectionInfo.user }, function (
err,
res
) {
if (err) {
return console.error("Error RFC Call:", err);
}
// console.log("STFC_STRUCTURE call result:", res);
console.log("call success");
});
} catch (error) {
console.log("ab error:" + error);
}
}); |
thanks your feed. tomorrow, I can test bapitest.js and report for you. |
Could you please share more info on how the NodeRED is involved because the node-rfc is not supported on NodeRED: #161 I tried to reproduce by repeatedly calling |
Hello. here is my test result. It occurs randomly. but node-rfc doesn't throw exception, just crash.
and this is my story. if node-rfc can throw exception from error . i can coding regression logic to my node(s/w), maybe five times... |
hi, another test.
[ error case log ]
[ success case log ]
and if there is an error. ( i think, invoke actions doesn't get return values from RFC ) In order
I think we need to find out why sometime there is a return and sometime not. thanks |
Is NodeRED anyhow involved in your testing and is there any crash log or error message ? If you add the Could you please send me traces after one successful call and after one call with error? |
Currently, node-red is irrelevant. and here is test results what you want. |
Thank you very much for traces. Some errors are captured, we need to analyse them. In the meantime, if you have SAP NWRFC SDK PL6 at hand, could you please check if errors occur also with PL6? |
Sorry @gimapei, my instruction was incorrect and errorInfo I saw in traces are actually not errors. Instead of setting the |
it's ok. |
Can you create SAP customer incident for the BC-MID-RFC-SDK component and refer to this issue? I could then send you the SDK libraries which should work for you, until the PL8 released. |
I requested issue registration to my boss. |
Hello |
Thank you very much @gimapei. The ticket is processed by SAP standard support. Please mention in the ticket, if not already done, that the request is related to node-rfc issue. |
You can try this workaround in the meantime: #189 (comment) |
I am sorry. |
Hi @gimapei, I could not reproduce on Windows. Tried also with this PS script but no error: run.ps1 1..10 | % { node .\bapitest.js } Console C:>\test .\run.ps1 To exclude one more possibility, could you please try with attached node-rfc build? Unpack the zip or tar archive and go to your project And one more question. The error occurs with repeated manual testing, from PowerShell console, correct? Could you please test with the script below, using Connection Pool instead of the direct Client? You can also run it via bapitest.js const Pool = require("node-rfc").Pool;
// add your ABAP system destination to sapnwrfc.ini file
abapSystem = { dest: "MME" };
const pool = new Pool({connectionParameters: abapSystem});
(async() => {
try {
var client = await pool.acquire();
await client.call("BAPI_USER_GET_DETAIL", { USERNAME: client.connectionInfo.user});
console.log("success", client.id);
} catch (ex) {
console.log("error", ex)
} finally {
client && client.release();
console.log("release", client.id)
}
})(); Please use the sapnwrfc.ini DEFAULT
RFC_TRACE=3
DEST=MME
USER=demo
PASSWD=welcome
#ASHOST=coevi51
ASHOST=10.68.110.51
SYSNR=00
CLIENT=620
LANG=EN
#TRACE=3 |
hello At the end of the line. If I commented on that part, it does not occur what I mentioned above. I am not good at c++, so I don't know what to do about that,
|
I think there is no problem with version 2.4.0. |
Thanks @gimapei for the update. |
hi.
here is my sample code.
some results
==========================================================================
[ my environment]
Looking at the results,
the result is success for RFC Call randomly.
some time success, some time error, but same import and same data sets for RFC call
How can I find error?
How can I debug the node-rfc code?
Could you help me?
Note, RFC Function response simple three columns
thanks
The text was updated successfully, but these errors were encountered: