ties.db on windows - how to get it working?
Opened this issue · 1 comments
I am trying to get a ties.db node running on windows and I followed the steps on the releases page (https://github.com/TiesNetwork/ties.db/releases) to do so. I installed geth, allowed it to sync the downloaded ties.db and ran it. This all appears to be working properly and in the ties.db log folder it seems like it is up and running and I can see the java background process running.
However next to test that it is working I tried the ties.db-client-example (https://github.com/TiesNetwork/ties.db-client-example) and the information documented on the ties-docs API connection page (https://github.com/TiesNetwork/ties-docs/wiki/Connection-%28NodeJS%29) (usage examples).
A simple example is the following code taken from that usage examples that results in a 'parse error' when connecting to port 9042 which I am using because there is nothing listening on 8080 which is what the config file shows. 9042 was listen in the system.log file so I tried that instead:
const Client = require('tiesdb-client');
let c = new Client.Connection();
c.connect('ws://127.0.0.1:9042/websocket');
console.log('Connected!');
Connected!
connect error: Error: Parse Error
(node:2156) UnhandledPromiseRejectionWarning: Error: Parse Error
at Socket.socketOnData (_http_client.js:442:20)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at TCP.onStreamRead (internal/stream_base_commons.js:94:17)
(node:2156) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). (rejection
id: 1)
(node:2156) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.
Any tips or suggestions to get this working?
The 9042 is a Cassandra connection port not TiesDB one. TiesDB port is configured by servicePort parameter in conf/tiesdb.yaml and is 8080 by default. Please check your logs for some information about the reason TiesDB is not starting.