Skip to content
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

Server crash when using RethinkDB storage #25

Open
nfsmaniac opened this issue Nov 6, 2019 · 0 comments
Open

Server crash when using RethinkDB storage #25

nfsmaniac opened this issue Nov 6, 2019 · 0 comments

Comments

@nfsmaniac
Copy link

Deepstream.io v5.0.4 Linux binary

As I wasn't able to set custom db name in Deepstream config, I created in RethinkDB web interface fresh database deepstream and then a devices table in it (but I changed primary key name to imei).
Then inserted sample document
r.db('deepstream').table('devices').insert({ imei: "123456789876543", holder: "John Doe", contacts: ["john@doe.com", "doe@john.com"] })

Now I accessed local HTML file to read holder value.

<!DOCTYPE html>
<html>
    <head>
        <script src="https://cdn.deepstream.io/js/client/latest/ds.min.js"></script>
    </head>
    <body>
        <script type="text/javascript">
            const client = new DeepstreamClient('ip:6020')
            client.login()
            const record = client.record.getRecord('123456789876543')
            console.log(record.get('holder'));
        </script>
    </body>
</html>

Unfortunately it causes immediate server crash.
Result:

CONFIG_TRANSFORM | Loaded content from /root/deepstream/conf/permissions.yml for fileLoad(permissions.yml)
INFO | logger ready: std out/err
INFO | server name: k2nr950f-y1l1uyke5ao0
INFO | deepstream version: 5.0.4
INFO | configuration file loaded from conf/config.yml
INFO | library directory set to: /root/deepstream/lib
CLUSTER_JOIN | k2nr950f-y1l1uyke5ao0
CLUSTER_SIZE | The cluster size is now 1
INFO | logger ready: std out/err
INFO | monitoring ready: Noop Monitoring
INFO | subscriptions ready: Subscription Registry
INFO | cache ready: Local Cache
INFO | permission ready: Valve Permissions
INFO | locks ready: Distributed Lock Registry
INFO | clusterNode ready: Single Cluster Node
INFO | clusterRegistry ready: Distributed Cluster Registry
INFO | clusterStates ready: Distributed State Registry
INFO | authentication ready: Open Authentication
INFO | Listening for http connections on 0.0.0.0:6020
INFO | Listening for health checks on path /health-check
INFO | httpService ready: NodeJS HTTP Service
INFO | storage ready: Rethinkdb Storage Connector 2.0.0
INFO | connectionEndpoint ready: Binary WebSocket Connection Endpoint
INFO | connectionEndpoint ready: WS Text Protocol Connection Endpoint
INFO | connectionEndpoint ready: WS Text Connection Endpoint
INFO | connectionEndpoint ready: HTTP connection endpoint
INFO | Deepstream started
INCOMING_CONNECTION | from undefined (censored.ip.address.__)
AUTH_SUCCESSFUL | open

/root/deepstream/lib/@deepstream/storage-rethinkdb/src/connector.ts:155
            version = entry.__ds._v
                                 ^
TypeError: Cannot read property '_v' of undefined
    at rethinkdb.table.get.run (/root/deepstream/lib/@deepstream/storage-rethinkdb/src/connector.ts:155:34)
    at tryCatcher (/root/deepstream/lib/@deepstream/storage-rethinkdb/node_modules/bluebird/js/main/util.js:26:23)
    at Promise.successAdapter (/root/deepstream/lib/@deepstream/storage-rethinkdb/node_modules/bluebird/js/main/nodeify.js:23:30)
    at Promise._settlePromiseAt (/root/deepstream/lib/@deepstream/storage-rethinkdb/node_modules/bluebird/js/main/promise.js:582:21)
    at Promise._settlePromises (/root/deepstream/lib/@deepstream/storage-rethinkdb/node_modules/bluebird/js/main/promise.js:700:14)
    at Async._drainQueue (/root/deepstream/lib/@deepstream/storage-rethinkdb/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/root/deepstream/lib/@deepstream/storage-rethinkdb/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues (/root/deepstream/lib/@deepstream/storage-rethinkdb/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
@yasserf yasserf transferred this issue from deepstreamIO/deepstream.io Feb 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant