Cache NodeJs Network Connection
Hi,
NodeJs(v0.10.0) to Intersystems Cache2014( using cache0100.node) network connection Not working .
This is error msg i'm getting
"{ ErrorMessage: 'Error loading Cache Library: _SYSTEMcache.dll; Error Code : 126 (The specified module could not be found.)',
ErrorCode: 1009,
ok: 0 } "
My Code ->
user.open({ip_address:"127.0.0.1",tcp_port:57772,username: "_SYSTEM",password: "SYS",namespace: "USER"},function(err,res){
console.log("Error : ",err);console.log("Result : ",res);
if(!err){
user.close();
}
});
But path connection working fine.
Thanks
Hi,
for tcp connection mode you need to specify superserver-port, not webserver port.
HTH,
Bernd
Hi ,
Thank you for your answer. I did checked with TCP port 1972. Its not worked in node Node version (0.10).
But for testing i'm using node v6.17 Its working. I don't understand why its not working in the NodeJs v0.10
And i need one more answer.
I need to get file from Cache Database. File stored as a FileBinaryStream in DB.
Thanks.
Hi @kandhan ramalingam !
Could you please create a separate question for this one?
->What error do you get? Why using such outdated/ancient NodeJS versions?
I'm using Ensemble (v2014.15.851.0). In the Bin folder i got only cache0100.node file. So i'm using NodeJs v0.10.
In this version Network connection code throws error mentioned below.
"{ ErrorMessage: 'Error loading Cache Library: _SYSTEMcache.dll; Error Code : 126 (The specified module could not be found.)',
ErrorCode: 1009,
ok: 0 } "
For testing i'm using Cache2017 . It support NodeJs v6.
We can't upgrade Ensembe Version 2014 to 17. Can you pls give me any solution for this ?
Thanks
Hi,
you can test your Node environment within a simple windows command window (CMD.exe):
C:\>node -v
v0.10.26
C:\>node
> x=require('cache.node')
{ Cache: [Function: Cache] }
> y = new x.Cache
{}
> y.version()
'Node.js Adaptor for Cache: Version: 1.0.63 (CM)'
>
Do you have renamed cache0100.node into cache.node an copied it into location specified in environment variable NODE_PATH ? e.g. NODE_PATH=C:\Program Files\nodejs
If not, you need to specify path to cache.node within require(), e.g. x=require('c:/mypath/tocachenode/cache')
HTH,
Bernd
->Do you have renamed cache0100.node into cache.node an copied it into location specified in environment variable NODE_PATH ?
Yes i did.
->you can test your Node environment within a simple windows command window (CMD.exe)
Its working i can get 'Node.js Adaptor for Cache: Version: 1.0.63 (CM)'
Thanks
Hi,
are you all set now? Or do you still get the same error? Please confirm.
You can add parameter debug: "debug.log" with the open() if it still does not work in order to hopefully get more information!?
Anyway, if you are local anyway you should use native connectivity mode instead tcp since it get's you better performance.
Bernd
Hi,
>I don't understand why its not working in the NodeJs v0.10
What error do you get? Why using such outdated/ancient NodeJS versions?
>I need to get file from Cache Database. File stored as a FileBinaryStream in DB.
You need to provide much more details in order for us able to help you.
See docs/class-reference here which might be helping you:
https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic....