2023 Apr 11 8:37 PM
Hellou Dears.
i have this problem to connect
const hana = require('@sap/hana-client')<br>const conn = hana.createConnection()<br>const connParams = {<br> host: '192.168.0.36',<br> port: '30015',<br> uid: 'manager2',<br> pwd: '123456',<br> traceFile: 'stdout',<br> traceOptions: 'sql=warning',<br> encrypt: 'true',<br> sslValidateCertificate: 'false'<br>}<br>conn.connect(connParams, function (err) {<br> if (err) throw err<br> conn.exec('SELECT Name, Description FROM Products WHERE id = ?', [301], function (err, result) {<br> if (err) throw err<br> console.log('Name: ', result[0].Name, ', Description: ', result[0].Description)<br> conn.disconnect()<br> })<br>})<br>app.listen(PORT, () => console.log(`Server running on port ${PORT}`))
Node.js v18.15.0
Cargando Ruta... auth
Cargando Ruta... despachos
Cargando Ruta... hana
Cargando Ruta... users
Cargando Ruta... wms
[SQLDBC][conn:1] libSQLDBCHDB 2.16.21.1678225536
[SQLDBC][conn:1] SYSTEM: Microsoft Windows / X64
[SQLDBC][conn:1] BUILD AT: 2023-03-08 22:09:35
[SQLDBC][conn:1] BRANCH: unknown
[SQLDBC][conn:1] BUILD MODE: rel
[SQLDBC][conn:1] APPLICATION: C:\Program Files\nodejs\node.exe
[SQLDBC][conn:1] HOST: K-VPINEDA
[SQLDBC][conn:1] OS USER: Victor
[SQLDBC][conn:1] CURRENT DIRECTORY: D:\Develops-Kayser\Backends\KayserCD
[SQLDBC][conn:1] TRACE FILE NAME: stdout
[SQLDBC][conn:1] PROCESS ID: 12056
[SQLDBC][conn:1] TRACE FILE WRAP COUNT: 0
[SQLDBC][conn:1]
[SQLDBC][conn:1] ---
[SQLDBC][conn:1] Enabled Traces:
[SQLDBC][conn:1]
[SQLDBC][conn:1] SQL Trace: Level WARNING
[SQLDBC][conn:1] Distribution Trace: Level WARNING
[SQLDBC][conn:1]
[SQLDBC][conn:1] ---
Server running on port 3500
[SQLDBC][conn:1] Tracing connection 1.
[SQLDBC][conn:1] CONNECT TO: 192.168.0.36:30015
[SQLDBC][conn:1] System call 'connect' succeeded: 0.0.0.0:54499 -> 192.168.0.36:30015
[SQLDBC][conn:1] ADDRESS RESOLVED TO: 192.168.0.36
[SQLDBC][conn:1] The connection took 5 milliseconds and 1 attempt(s)
[SQLDBC][conn:1] SQL ERROR :
[SQLDBC][conn:1] SQLCODE : 10
[SQLDBC][conn:1] SQLSTATE : 28000
[SQLDBC][conn:1] MESSAGE : authentication failed
[SQLDBC][conn:1] AUTHENTICATION FAILED 10 / authentication failed
[SQLDBC][conn:1] CLOSING SERVER CONNECTION ID: -1
[SQLDBC][conn:1] Closed socket handle 2023-04-10 16:36:37.781000
[SQLDBC][conn:1] --- THREAD 4170
[SQLDBC][conn:1]
[SQLDBC][conn:1] ::RELEASE CONNECTION 2023-04-10 16:36:37.782000 [0x0000029dbb9c4ad0]
[SQLDBC][conn:1]
[SQLDBC][conn:1] ::CLOSE CONNECTION 2023-04-10 16:36:37.782000 [0x0000029dbb9c4ad0]
[SQLDBC][conn:1] SQL ERROR :
[SQLDBC][conn:1] SQLCODE : -10821
[SQLDBC][conn:1] SQLSTATE :
[SQLDBC][conn:1] MESSAGE : Session not connected
D:\Develops-Kayser\Backends\KayserCD\node_modules\@sap\hana-client\lib\index.js:53
ldb.__runCallbacks();
^
Error: authentication failed
at Socket.<anonymous> (D:\Develops-Kayser\Backends\KayserCD\node_modules\@sap\hana-client\lib\index.js:53:13)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) {
code: 10,
sqlState: '28000'
}
Node.js v18.15.0
[nodemon] app crashed - waiting for file changes before starting...
2023 Apr 11 8:37 PM
Thank you for visiting SAP Community to get answers to your questions. Since this is your first question, I recommend that you familiarize yourself with Community Q&A, as the overview provides tips for preparing questions that draw responses from our members.
Should you wish, you can revise your question by selecting Actions, then Edit.
By adding a Picture to your profile you encourage readers to respond.