v4 on Ubuntu 16.04 and Node Sample App

95 views
Skip to first unread message

Troy

unread,
Oct 15, 2017, 9:29:15 PM10/15/17
to RavenDB - 2nd generation document database
I have tried running both the docker which runs 4.0.0.0-rc-40019 as well as the nightly build 4.0.0-nightly-20171010-0759 on Ubuntu and several things are not working.

1.) I requested a license since it was complaining every time when I hit the studio of: "Your current license doesn't include the dynamic nodes distribution feature" and after getting a community license still have that error as it apparently does not have that feature either...

2.) If I run the node sample app against: http://4.live-test.ravendb.net:80 all works as expected. However if I run against my local instance, docker or nightly, I get this error in the server console where I am running the node app:  "Unhandled rejection TypeError: Cannot read property 'Etag' of undefined" when trying to add a todo item, or any time I try to store() and then saveChanges().

It seem no matter how I create a database, it wants to be part of a cluster... I am not sure if that is by design or perhaps I am doing something wrong.

In the logs, I see things like this:

2017-10-16T00:46:58.7929201Z, 29, Information, ServerStore, Raven.Server.NotificationCenter.NotificationsStorage, Saving notification 'AlertRaised/LicenseManager_LicenseLimit'., 
2017-10-16T00:46:58.7935258Z, 29, Information, System, Voron.Impl.Journal.WriteAheadJournal, Preparing to write tx 632034 to journal with 3 pages (24 kb) in 00:00:00.0000852 with 4 kb compressed., 
2017-10-16T00:46:58.8008291Z, 29, Information, System, Voron.Impl.Journal.WriteAheadJournal, Writing 4 kb to journal 0000000000000000631 took 00:00:00.0072065, 
2017-10-16T00:46:58.8025632Z, 29, Information, ServerStore, Raven.Server.NotificationCenter.NotificationsStorage, Saving notification 'AlertRaised/DatabaseTopologyWarning'., 
2017-10-16T00:46:58.8033402Z, 29, Information, System, Voron.Impl.Journal.WriteAheadJournal, Preparing to write tx 632035 to journal with 3 pages (24 kb) in 00:00:00.0001196 with 4 kb compressed., 
2017-10-16T00:46:58.8091219Z, 29, Information, System, Voron.Impl.Journal.WriteAheadJournal, Writing 4 kb to journal 0000000000000000631 took 00:00:00.0057290, 
2017-10-16T00:46:58.8101966Z, 29, Operations, A, Raven.Server.ServerWide.Maintenance.ClusterObserver, It appears that all nodes of the node-app database are not responding to the supervisor, the database is not reachable,

Due to seeing that error, I assumed it was a licensing issue... I do have a paid license and sent an email support request to get a license for v4 ... so not sure if that is all I need or not.. If not, how can I get this to work against a local Ubuntu 16.04 installation?

Thanks.

Grisha Kotler

unread,
Oct 16, 2017, 3:34:22 AM10/16/17
to rav...@googlegroups.com
Hi Troy,

1) This is fixed in the latest nightly build. You can dismiss this notification from the notification center (top right).

2) Can you access the studio on your local Ubuntu server?

Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Grisha Kotler l RavenDB Core Team Developer Mobile: +972-54-586-8647

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

RavenDB paving the way to "Data Made Simplehttp://ravendb.net/


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Troy

unread,
Oct 16, 2017, 12:19:29 PM10/16/17
to RavenDB - 2nd generation document database
Hi Grisha, I updated .. now using: 

Server: 4.0.0-nightly-20171016-0400
Studio: 4.0.0-nightly-20171016-0400

New error: (node:25225) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): de: Max topology update tries reached

I pulled up the Studio and then I simply created a new database called node-app ... then tried running the Node Sample App and add a todoItem

When will the nightly docker images be available as well?
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.

Grzegorz Lachowski

unread,
Oct 17, 2017, 2:30:20 AM10/17/17
to RavenDB - 2nd generation document database
Hi Troy,

I was able to reproduce the issue and reported it on our bug tracker: http://issues.hibernatingrhinos.com/issue/RDBC-31

As far as nightly docker images are concerned, we should have them next week.

Thanks,
Greg

Troy

unread,
Oct 17, 2017, 3:05:11 AM10/17/17
to RavenDB - 2nd generation document database
Hi Grzegorz, thanks for the update. It seems that issue is private or we need to be logged in to see it. Any way to make it public so I can track it to know when the fix is made?

Thanks,
Troy

Grzegorz Lachowski

unread,
Oct 17, 2017, 5:15:50 AM10/17/17
to RavenDB - 2nd generation document database
Hi Troy,

I should have catch that first moment you mentioned docker. The C# client would fail the same way. Server in the container was bound to an internal IP and returned it as a response for GetTopologyCommand. Client then tried to reach it by that internal IP server responded with, which resulted in All topology nodes down error.

To fix this 'PublicServerUrl' and 'PublicServerUrl/Tcp' server options need to be specified to let the server know its actual (forwarded) address. To do that in docker one needs to set PUBLIC_SERVER_URL and PUBLIC_TCP_SERVER_URL environment variables e.g.

docker run -d -e UNSECURED_ACCESS_ALLOWED=PublicNetwork -e PUBLIC_SERVER_URL=http://10.0.75.2:8080 -e PUBLIC_TCP_SERVER_URL=http://10.0.75.2:38888 -p 8080:8080 -p 38888:38888 ravendb/ravendb:ubuntu-latest


Please let me know, if you have any questions.

Thanks,
Greg

Troy

unread,
Oct 17, 2017, 1:09:43 PM10/17/17
to RavenDB - 2nd generation document database

Hi, that does not seem to work either.


docker run -d -v "/home/troy/RavenDB/databases/:/databases" -v "/home/troy/RavenDB/Server:/opt/RavenDB/config" -e "CUSTOM_CONFIG_FILE=/opt/RavenDB/config/settings.json" -e PUBLIC_SERVER_URL=https://aurlhere.com -e PUBLIC_TCP_SERVER_URL=https://aurlhere.com:38888 -e LOGS_MODE=Information -v "/home/troy/RavenDB:/opt/RavenDB/cert" -e "CERTIFICATE_PATH=/opt/RavenDB/cert/acertificatehere.pfx" -e CERTIFICATE_PASSWORD=apasswordhere --hostname=ravendb -p 8081:8080 -p 38888:38888 ravendb/ravendb:ubuntu-latest


When the docker runs you see this:

Container ID is 39049cccc3aa0f2e81ab96521d6c5dad6f5d456cd179af9f464ee5cf06ceed79


To stop it use:         docker stop 39049cccc3

To run shell use:       docker exec -it 39049cccc3 /bin/bash

See output using:       docker logs 39049cccc3

Inspect with:           docker inspect 39049cccc3


Access RavenDB Studio on https://172.17.0.2:8081

Listening for TCP connections on: 172.17.0.2:38888


I am doing NAT with full DNAT as well as NAT for both https > 8081 and TCP 38888 > TCP 38888

I suspect this is a NAT issue? Although I can access the studio just fine so it seems like all NAT is working fine.

If I start the nightly, this is the output that shows (and does not work):

 Build 40, Version 4.0, SemVer 4.0.0-nightly-20171016-0400, Commit 4a4e831

 PID 3592, 64 bits, 4 Cores, Phys Mem 15.129 GBytes, Arch: X64

 Source Code (git repo): https://github.com/ravendb/ravendb

 Built with love by Hibernating Rhinos and awesome contributors!

+---------------------------------------------------------------+

Using GC in server concurrent mode retaining memory from the OS.

Could not start browser: No such file or directory

Node A in cluster d854a775-424b-4bcc-9310-ec26601f4432

Server available on: https://192.168.0.212:8081

Tcp listening on 192.168.0.212:41337

Server started, listening to requests...


Not sure where TCP port 41337 is coming from since the BindTcpPort is set to 388888 un the run-ubuntu1604.ps1


The errors I see on Query:


Unhandled rejection TypeError: Cannot read property 'Etag' of undefined

    at $e.fromJson (/Users/Troy/Development/Sandbox/ravendb-node-sample-app/node_modules/ravendb/lib/ravendb-node.js:2:21061)

    at Function.fromJson (/Users/Troy/Development/Sandbox/ravendb-node-sample-app/node_modules/ravendb/lib/ravendb-node.js:2:20944)

    at executeCommand.then.s (/Users/Troy/Development/Sandbox/ravendb-node-sample-app/node_modules/ravendb/lib/ravendb-node.js:2:54570)

    at tryCatcher (/Users/Troy/Development/Sandbox/ravendb-node-sample-app/node_modules/bluebird/js/release/util.js:16:23)

    at Promise._settlePromiseFromHandler (/Users/Troy/Development/Sandbox/ravendb-node-sample-app/node_modules/bluebird/js/release/promise.js:512:31)

    at Promise._settlePromise (/Users/Troy/Development/Sandbox/ravendb-node-sample-app/node_modules/bluebird/js/release/promise.js:569:18)

    at Promise._settlePromise0 (/Users/Troy/Development/Sandbox/ravendb-node-sample-app/node_modules/bluebird/js/release/promise.js:614:10)

    at Promise._settlePromises (/Users/Troy/Development/Sandbox/ravendb-node-sample-app/node_modules/bluebird/js/release/promise.js:693:18)

    at Async._drainQueue (/Users/Troy/Development/Sandbox/ravendb-node-sample-app/node_modules/bluebird/js/release/async.js:133:16)

    at Async._drainQueues (/Users/Troy/Development/Sandbox/ravendb-node-sample-app/node_modules/bluebird/js/release/async.js:143:10)

    at Immediate.Async.drainQueues (/Users/Troy/Development/Sandbox/ravendb-node-sample-app/node_modules/bluebird/js/release/async.js:17:14)

    at runCallback (timers.js:800:20)

    at tryOnImmediate (timers.js:762:5)

    at processImmediate [as _immediateCallback] (timers.js:733:5)

The error on creating:

(node:45838) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): de: Max topology update tries reached

(node:45838) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


docker run -d -v "/home/troy/RavenDB/databases/:/databases" -v "/home/troy/RavenDB/Server:/opt/RavenDB/config" -e "CUSTOM_CONFIG_FILE=/opt/RavenDB/config/settings.json" -e PUBLIC_SERVER_URL=https://db01.racketsportscentral.com -e PUBLIC_TCP_SERVER_URL=https://db01.racketsportscentral.com:38888 -e LOGS_MODE=Information -v "/home/troy/RavenDB:/opt/RavenDB/cert" -e "CERTIFICATE_PATH=/opt/RavenDB/cert/db01.racketsportscentral.com.pfx" -e CERTIFICATE_PASSWORD=S3cr3tP@ssW0rd --hostname=ravendb -p 8081:8080 -p 38888:38888 ravendb/ravendb:ubuntu-latest
docker run -d -v "/home/troy/RavenDB/databases/:/databases" -v "/home/troy/RavenDB/Server:/opt/RavenDB/config" -e "CUSTOM_CONFIG_FILE=/opt/RavenDB/config/settings.json" -e PUBLIC_SERVER_URL=https://db01.racketsportscentral.com -e PUBLIC_TCP_SERVER_URL=https://db01.racketsportscentral.com:38888 -e LOGS_MODE=Information -v "/home/troy/RavenDB:/opt/RavenDB/cert" -e "CERTIFICATE_PATH=/opt/RavenDB/cert/db01.racketsportscentral.com.pfx" -e CERTIFICATE_PASSWORD=S3cr3tP@ssW0rd --hostname=ravendb -p 8081:8080 -p 38888:38888 ravendb/ravendb:ubuntu-latest

Troy

unread,
Oct 18, 2017, 2:23:33 AM10/18/17
to RavenDB - 2nd generation document database
Hi again... Ok, so I stripped everything down... I ran the docker command you had posted updating the IP to my local address and it seems to run and I am able to run the node sample app. It appears trying to run this behind NAT is a problem.

Thanks for your input.

Grzegorz Lachowski

unread,
Oct 18, 2017, 2:31:37 AM10/18/17
to RavenDB - 2nd generation document database
Hi Troy,

Glad it worked for you. The issue is within node.js client - it does not yet support authentication/https. RavenDB 4.0 authentication is certificate based - a client needs a certificate to authenticate with the server. As you probably noticed there's nowhere in the sample node.js app where we set the client cert. That's why I sent you commands without that.

If you have any more questions please let me know.
Thanks,
Greg

You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/tG2SdzzPHGM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages