given a zookeeper server ip:port, how to get the zookeeper structure? - distributed

given a zookeeper server ip:port, how to get the zookeeper structure?
for example I was told a zookeper service server is 192.1.2.17:2181
I can use ZKcli.sh to login and do some basic stuff. I can use it without problem.
But I want to know how many nodes in this zookeeper setup? Who are those nodes?? what are their status?
How do I achieve this?
Thanks

You might find some of these commands useful:
http://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html#The+Four+Letter+Words
You can run them against the server ip:port you were given, e.g.:
echo MNTR | nc 192.1.2.17 2181
If you have access to that host, you could just check the configuration that is usually under something like <zoo install>/conf/zoo.cfg.

Related

Uploading Databases

How does one go about uploading a database like Apache Cassandra after creating one? Furthermore, is there a way to upload/share only its skeleton structure, without the data gathered in it? I'm on MacOS and would like to use Python to do all of this. Thank you!
Based on your second comment, I guessed it to mean you want the database to be remotely accessible to clients/apps not installed locally.
Clients/apps connect to Cassandra on the IP address set for rpc_address and the CQL port set for native_transport_port (default is 9042) set in cassandra.yaml.
You mentioned that your Cassandra instance is running on your laptop so only clients/apps running on your local network can access it if you configure rpc_address to an IP address accessible on the network (default is localhost).
If you're just trying out Cassandra and want to collaborate with other developer friends, try Astra and launch Cassandra instance on the free-tier (no credit card required). With it you can share the database credentials with your friends and they can connect to it over the internet.
You can connect to Astra from your Python app using the Python driver. Otherwise, Astra includes Stargate.io pre-configured and ready to use. Stargate is a data access gateway that lets you connect to Cassandra from your app using REST API, GraphQL API or JSON/Doc API without having to learn CQL. For more info, see Connecting to your Astra database. Cheers!

Connecting Apache Superset to an external database

I am running apache superset on docker, and I have been trying to connect to an external database(Postgres) using the example link on SQLAlchemy Docs for connecting to a Postgres database (postgresql://scott:tiger#localhost/mydatabase // postgresql://username:password#localhost:5433/postgres). However, I have been getting the following error: Connection failed, please check your connection settings. Could someone please help me with this.
Are you sure that your postgres is on the same network (localhost)? It seems for external database, that it would likely be on another network (and therefore you would use IP address)?
If these are the docs you are looking at --> https://docs.sqlalchemy.org/en/12/core/engines.html#database-urls
Then you might want to think in terms of 'host', meaning then an IP(v4) address and/or DNS.
As it was recommended you may need to whitelist your Superset IP address in pg_hba.conf.
You may also need to check if you have the right driver installed in the docker instance that you are running superset.

MediaWiki installation issue - port problems

I am trying to install MediaWiki version 1.31 localy and I have run into some issues that I cant get past by. Mainly when I input datatabe connection (I am trying to connect to PostgreSQL database) information it returns this error.
Thing is the port I am trying to connect is 5433 not 5432, also the names "template1" and "postgres" are not included in my input trough the dialogue screen - I dont know where they came from. "test1" is the name of the database I am trying to connect to.
Any help or advice how to get trough this error would be greatly appreciated. Thank you.
That the port you specify is not used while setting up the database schema in the first place is a long-standing known bug. One workaround is to run your database on the default port until you have wiki set up, then change it back to the port you want.
In order to create a new database, you need to connect to an existing database in the same cluster. 'template1' and 'postgres' are pre-existing databases (usually created at the time the cluster was created) commonly used to connect to in order to create a new database. These names are "well-known", you don't need to specify them.

Making sense of Windows sql availability groups, failover cluster, and load balancer

I am having issues with creating a failover cluster with an availabilty group.
I've made a windows failover cluster, and a sql availability group. I also have an azure load balancer with an IP address and a DNS name.
I am trying to follow this guide here
I get to the Configure the Listener, add Client access point, and things fail from there.
Is the name here supposed to be the DNS name in the load balancer? Same for the IP? Or is it supposed to be another object in Active directory.
Steps 5 and 6 seem to conflict, Is the dependency supposed to be a resource or an IP?
If anyone have any advice, I would be appreciative.
I have been using the above guide trying to get things to work in GUI before changing this over to powershell code.
I suspect either there is something I am missing, or this is all the same IP address and dns name used.

how to find the port number of solr in windows cmd?

since I'm new to the Solr server. I don't know how can I find the port number of Solr using CMD in windows?. if any knows please do help in finding thanks in advance.
Usually, Solr is running on the port 8983. However, it may happen, that you have Solr server which is running on some different port. In this case you could check status of Solr server by running command:
./bin/solr.cmd status
which would provide information like this, if you have something running:
Found 1 Solr nodes:
Solr process 9713 running on port 8983

Resources