Node.js -Couchbase - Warning: We are having troubles communicating to the indexer process. The information might be stale - node.js

I'm using Couchbase Version 4.1.0-5005 Enterprise Edition (build-5005) and trying to run bikeShop sample but it's not showing the index.
gives me this error
We are having troubles communicating to the indexer process. The information might be stale
i opened all ports (for test) as told in this tutorial but it's get the same error
My OS is win 7
what should i do? thanks.

The reason could be that ports are not opened on the server or on any of the cluster servers.
Try accessing
http://SERVER_ADDRESS:9102/getIndexStatus with basic auth and the server should return a error message.
Try opening ports 9100, 9101, 9102 and 9999 and then retry with the same url and you will get a success message with list of indexes at couchbase server.

Do you have a single node cluster?
Did you checked all of the services (Data,Index,Query) in your node?
Thanks,
Roi

For those are working on CB v5.1, try accessing "curl -v -u [user]:[pwd] http://hostname:8091/indexStatus"

Related

Minifabric problem with apiserver and fabric 2.2.1 error join on the channel in multihost configuration

I had created a custom network with my organizations and my peers running 100% on a host with which I was interfacing via an ApiServer based on this: https://kctheservant.medium.com/rework-an-implementation-of-api-server-for-hyperledger-fabric-network-fabric-v2-2-a747884ce3dc The problem is when I switched to using networking on 2 hosts using docker swarm. When I join the channel from the second host I get the error: "unable to contact the endpoint". So I switched to using "minifabri" which promises easy use, and in fact the network is customized in a short time, even there it gave me an error when joining the channel of the second host, solved by setting the variable EXPOSE_ENDPOINT = true. The problem is that now nmon I can no longer get my apiserver to work, what I did is (as indicated in the Readme) replace the contents of the "main.js" file with my server code and run the "apprun" command. This gives me an error if I leave the server listening on a port, while it is successful if I comment out the last 2 lines of the code. The problem is that I don't have how to query the server if I don't have a listening port. Summarizing my questions are:
how can I create an api server done like that on minifabric?
alternatively how can I solve the problem on the Fabric base (I can't find an EXPOSE_ENDPOINT variable to set), probably the problem will be the same as the one I had on minifabric. Thanks to those who will help me.

Port accessible only using wget localhost

I have a server running centos 7 using cpanel and whm with csf. I am trying to run a nodejs express application on it that listens on port 3000. In order to do so, I added the line tcp|in|d=3000|s=0.0.0.0 to csf.allow.
When I run the code and use wget localhost:3000, I get the html files as expected, but if I try to connect from a browser the server just doesn't get the request. Am I doingsomehting wrong?
I am new to Linux and server management, so sorry in advance if I didn't give enough information. I'll be happy to provide more if needed.
If anyone stumbles upon this from Google, the problem was that my server provider was blocking uncommon ports. I mailed them and after two minutes the problem was solved.

Connecting to a mongoDB with a TCP prefix on a NodeJS application

I created a NodeJS app that connects with a MongoDB and it seems to work locally.
Now, after hosting the NodeJS application on a remote machine, I am trying to connect to a mongoDB that was already created on that machine. When I print out some of the environment variables, the only one I see of relevance seems to be :
MONGODB_PORT: 'tcp://172.30.204.90:27017',
I tried connecting like I usually do with
mongoose.connect('mongodb://localhost:27017/metadata/')
and replacing it with mongoose.connect('tcp://172.30.204.90:27017/metadata') but I get an error that says my URI needs to start with 'mongodb'.
So I tried replacing it with mongoose.connect('mongodb://172.30.204.90:27017/metadata') and it no longer throws any error. But on the MongoDB side I don't see any new connections happening and my app does not start up on the machine. What should I be putting in the URI?
Your URI should indeed start with mongodb:
mongoose.connect('mongodb://username:password#host:port/database?options...');
See this page for more information: https://docs.mongodb.com/manual/reference/connection-string/
Did you try to connect to the database from cli? Or Telnet to see that connection isn't blocked.

Tomcat HawtIO JMX over Jolokia authorization

this is my situation:
1) I have an web application, that is running on Tomcat, inside my war I have bundled Jolokia, so now if I do something:port/jolokia I get JSON back and all works well.
2) I downloaded executable jar from howt.io and I start it from cmd (on windows) and it gets running on some defined port so I get nice web page from which I connect to my server and read JSON from Jolokia, I can see some mbeans from JMX and it's all good!
3)Now here comes the problem, I have spring-security so I configure that /jolokia/* is protected with some role, ADMIN for example, now how can I connect from Howtio to my server ? I guess I should somehow provide user/pass and get session token back or something, I have no idea where to go from here so I would appreciate very much your help!
I came up with the solution to deploy Howtio as war to my server, and then I enable authentication hawtio.authenticationEnabled=true and set tomcat users, all works well but I would really like to just have jolokia there because I have many instances of my application (on more than 50 servers), so I would like to use Howtio just as a client that will read JSON, but I need some way of securing all that!
So please if someone have an idea or can tell me how to do this ? Thanks a lot!
Connecting to remote jolokia instances is done via the 'Connect' tab. You can save connections in there to your tomcat instances, including providing a username and password, for example:
Note: this page may have been updated a bit since this screenshot.

Couchdb development server access

I am totally new to couchdb,
How can i expose the service into a local development remote server ? (after in a future step expose it public)
I try to install on a remote development server besides i am not using Digital Ocean server i am using this tutorial : https://www.digitalocean.com/community/tutorials/how-to-install-couchdb-and-futon-on-ubuntu-14-04
I could not access with a web browser after install and start couchdb service with
couchdb -b
Wich return the default message : Apache CouchDB has started, time to relax.
Also from comand line i could:
curl http://127.0.0.1:5984/
And receive the correct message.
How can i access via web browser this development server ?
I can't know for sure, since I don't know your setup, but I'm guessing that you're trying to access the database from a different machine then the one it's running on. And I assume you know what IP to use to get to your remote, and that leads me to believe that your problem is that the port is not open (or not forwarded correctly) to your couchDB server.
A standard couchDB installation should be accessible, from a web-browser.

Resources