I'm getting this error while using Monstache:
Unable to create Elasticsearch client: health check timeout: no Elasticsearch node available
I applied these lines to Monstache configuration:
elasticsearch-validate-pem-file = false
elasticsearch-healthcheck-timeout-startup = 200
elasticsearch-healthcheck-timeout = 200
However, I still encounter the mentioned error. When I searched about it, I found that the problem is due to sniffing in elasticsearch client. But I don't know where and how exactly I must change it?
I should denote that I studied this tutorial for this problem, but I'm still full of ambiguities.
The problem has been solved when I installed Monstache on the same local server on which the ELK stack was installed. Also, the MongoDB database on the remote server has been changed to a single node replica set to be able to connect to Monstache.
let's try to use
elastic.SetSniff(false)
Related
I made a ktor application using exposed for db stuff and it works perfectly fine on my desktop, however when I deploy it on an AWS EC2 instance I get following error
Exposed - Transaction attempt #0 failed: No suitable driver found for
jdbc:postgresql://com.com:5432/DBName. Statement(s): null
java.sql.SQLException: No suitable driver found for jdbc:postgresql://
at
java.sql/java.sql.DriverManager.getConnection(DriverManager.java:702)
java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)
org.jetbrains.exposed.sql.Database$Companion$connect$10.invoke(Database.kt:206)
org.jetbrains.exposed.sql.Database$Companion$connect$10.invoke(Database.kt:206)
org.jetbrains.exposed.sql.Database$Companion$doConnect$3.invoke(Database.kt:127)
org.jetbrains.exposed.sql.Database$Companion$doConnect$3.invoke(Database.kt:128)
and so on.
Here's the connection:
Database.connect(DB_URL, driver = "org.postgresql.Driver", user = DB_USER, password = B_PW)
I've tried it with both, but no luck.
implementation("com.impossibl.pgjdbc-ng:pgjdbc-ng:0.8.9")
implementation("org.postgresql:postgresql:42.3.3")
I found potential solutions for Spring Boot (e.g. setting SPRING_DATASOURCE_DRIVER_CLASS_NAME) but I have no clue how I can relate this to ktor/exposed if even possible.
nvfm
works now. aws magic, idk
edit:
com.impossibl.postgres.jdbc.PGDriver did not work at all so I tried to switch it but org.postgresql.Driver also did nothing at first. looked at the logs, same error as before.
after a while AWS' health thingy switched to Ok and it seems to work just fine now.
i deployed the neo4j in kubernetes, so when i tried to acess http://:7474/ it show me this error( ServiceUnavailable: WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver.), hoe can i solve it?
You need to uncomment a single line inside $NEO4J_HOME/conf/neo4j.conf:
dbms.connector.bolt.address=0.0.0.0:7687
The issue is well described here
If you're using Neo4j Helm instead of neo4j.conf you will have values.yaml. also it is well described here.
I have a play scala app and i have an atlas cluster which i am trying to connect. According to the ReactiveMongo this is possible. I can add my connection string gotten from Atlas to my app via
mongodb.uri
In my application.conf file. I have tried everything based on the instructions from reactivemongo and atlas db but i am still unable to connect to the cluster. using my mongoshell however, i am able to connect and have access to my db but it simply refuses to connect via my app.
Mongo simply returns an error "MongoError['No primary node is available! (Supervisor-13/Connection-14)']" } and logs a warning in my console Some options were ignored because they are not supported (yet): w, retryWrites. I am using scala version 2.12 and reactivemongo 0.12.6 with play 2.6.
My connection string is mongodb+srv://<username>:<password>#my-cluster.abo25.mongodb.net/my-db?retryWrites=true&w=majority
Any info or help would be greatly appreciated.
Solved my problem. It turns out the +srv string format works seamlessly from reactivemongo version 0.17 and i was initially on 0.16. After i upgraded (and also upgraded my code), i was able to connect to my cluster. I also found out one of the user credentials i was using was wrong so that plus the upgrade got me up and running.
I have successfully setup ndbcluster version 7.1.26.
This contains 2 data nodes[NDBD], 2 mysql [MYSQLD] nodes and one management [MGMD] node.
Replication works successfully.
My Web application is deployed in JBoss-5.0.1 and using JNDI for connection resources which are specified in application specific ds.xml file in load balanced url forms e.g. jbdc:mysql:loadbalance:host1:port1,host2:port2/databaseName.
host1 : refers to first mysqld node and port1 refers the port it is running on.
host2 : refers to second mysqld node and port2 refers the port it is running on.
When both of the [MySQLD] nodes are up and running everything works fine and cluster responds well, replicates data, and data retrieval operations also work properly.
But issues are raised when any of the [MySQLD] nodes goes down. Data gets inserted/updated/replicated but the application is unable to retrieve data from cluster and web page remains busy working which means busy retrieving data. As soon as the node which was down goes up it responds properly and application goes forward and shows up data retrieved from cluster.
At JBoss 5.0.1 startup it showed up a NullPointerException in class LoadBalancingConnectionProxy.invoke(LoadBalancingConnectionProxy.java:439). Tell me if the above Exception plays any role in the above explained issues.
If anyone had faced issues like above and if has any solution regarding the issues please let me know.
Thanks and regards.
I have resolved the issue as it was a bug in the connectorJ's version.
As The project I am working on was already using both the buggy jar mysql-connector-java-5.0.8.jar and the jar version in which the issue is already resolved i.e. mysql-connector-java-5.1.13-bin.jar.
After all the search when I removed the jar mysql-connector-java-5.0.8.jar my issues got resolved.
All that was problematic was that the ConnectorJ/Driver was getting referred from the buggy jar.
The bug id and url which refers to this issue is:
http://bugs.mysql.com/bug.php?id=31053
.
Thanks for considerations.
Are you using different userids and passwords for each of the hosts(host1, host2) specified in the tag ? (Either directly or using tag) ?
I am trying to use the ElasticSearch module (https://github.com/cleverage/play2-elasticsearch) with my Play 2 application. In the readme, it says I should add the following to my application.conf:
## define local mode or not
elasticsearch.local=false
## list clients
elasticsearch.client="192.168.0.46:9300"
# ex : elasticsearch.client="192.168.0.46:9300,192.168.0.47:9300"
What is local mode? What is my client URL supposed to be? I can not find any information on what these options should be. With my current options, I get a NoNodeAvailableException.
Some people suggest:
elasticsearch.local=false elasticsearch.client=mynode1:9200,mynode2:9200
But what is mynode1 and mynode2? It doesn't work with my application. Can anyone help? Thanks
What is local mode?
If elaticsearch.local=true, a elasticsearch node is started in your application ( embedded )
What is my client URL supposed to be?
It's your host:port, but the port is the tcp transport define on your elasticsearch node.
By default, the port start on 9300 ( http://www.elasticsearch.org/guide/reference/modules/transport.html )
I can not find any information on what these options should be. With my current options, I get a NoNodeAvailableException.
I think you have a problem on port number.
mynode1 and mynode2 are elasticsearch nodes.
Do you have any Elasticsearch node running?
On which IP address?
Can you try to connect on these nodes using curl, for example:
curl localhost:9200
Or
curl YOURIPADDRESS:9200
If one of this is successful, then configure your play app using YOURIPADDRESS:9300 as Nicolas Boire wrote before.
If no one is successful, check that you have installed Elasticsearch and launched it before.
HTH
I've just had the same problem, be sure that you respect the version requirements written in the table : https://github.com/cleverage/play2-elasticsearch
At the beginning, I set up the latest version of the plugin 0.8.1 but my ElasticSearch version was 1.0.2.
By starting ES with version 0.9.13, it worked.