Code Monkey home page Code Monkey logo

Comments (8)

corneversloot avatar corneversloot commented on July 16, 2024

It seems like the driver is unable to find a method in one of Elastic's dependencies. This is odd since the dependencies are packaged within the jar file... Can you provide a bit more information like: driver version, connection url used and elasticsearch version?

from sql4es.

sundeepkmr avatar sundeepkmr commented on July 16, 2024

I have attached a file for your reference. Thanks!
Sql4ES.docx

from sql4es.

corneversloot avatar corneversloot commented on July 16, 2024

It seems a different version of Google Guava is used during execution which leads to the 'NoSuchMethodError' you get. To avoid this situation I build the driver using the Maven shade plugin but for some reason this does not help in your case. Can you try using another client like SQLWorkbench to see if that works (not really a solution I admit but could be a work around for now)

from sql4es.

sundeepkmr avatar sundeepkmr commented on July 16, 2024

I tried it with SQLWorkBench. But it's not working. It shows 'Unable to connect to database' message when I click on the Test button post configuration.

from sql4es.

corneversloot avatar corneversloot commented on July 16, 2024

Strange, I tested it as well with Elasticsearch 2.4.0 and works fine. However, I do not have a remote desktop to test it on but that should not make a difference as far as I know.

Can you provide the logs of SQLWorkbench (help -> View Logfile), it should show why it is unable to connect?

from sql4es.

sundeepkmr avatar sundeepkmr commented on July 16, 2024

Here's the log:

2016-10-10 12:46:48 INFO =================== Log started ===================
2016-10-10 12:46:48 INFO Using configdir: C:\Users\gpzikum.sqlworkbench
2016-10-10 12:46:48 INFO Setting default locale to: en
2016-10-10 12:46:48 INFO Starting SQL Workbench/J, Build 121 (2016-07-31 23:50)
2016-10-10 12:46:48 INFO Java version=1.8.0_102, java.home=C:\Program Files\Java\jre1.8.0_102, vendor=Oracle Corporation, name=Java HotSpot(TM) 64-Bit Server VM
2016-10-10 12:46:48 INFO Operating System=Windows 7, version=6.1, platform=amd64
2016-10-10 12:46:48 INFO Available memory: 2320MB
2016-10-10 12:46:49 INFO Current DPI: 120, Default DPI: 96, scale factor: 1.25
2016-10-10 12:46:49 INFO Scaling default fonts by: 1.25
2016-10-10 12:46:50 INFO Using sizes: toolbar: 24, menu: 24
2016-10-10 12:46:56 INFO Loading connection profiles from C:\Users\gpzikum.sqlworkbench\WbProfiles.xml
2016-10-10 12:46:59 INFO Creating new connection for [{Default group}/SQL for ES] for driver=nl.anchormen.sql4es.jdbc.ESDriver and URL=[jdbc:sql4es://n01sml104.aap.csaa.pri:9300/dtcalert]
2016-10-10 12:46:59 INFO Adding ClassLoader URL=file:/C:/Program%20Files/squirrel-sql-3.7.1/lib/sql4es-0.8.2.4.jar
2016-10-10 12:47:04 ERROR Error connecting to the database using URL=jdbc:sql4es://n01sml104.aap.csaa.pri:9300/dtcalert, username=null Unable to connect to database
java.sql.SQLException: Unable to connect to database
at nl.anchormen.sql4es.jdbc.ESConnection.buildClient(ESConnection.java:129)
at nl.anchormen.sql4es.jdbc.ESConnection.(ESConnection.java:78)
at nl.anchormen.sql4es.jdbc.ESDriver.connect(ESDriver.java:46)
at workbench.db.DbDriver.connect(DbDriver.java:513)
at workbench.db.ConnectionMgr.connect(ConnectionMgr.java:244)
at workbench.db.ConnectionMgr.getConnection(ConnectionMgr.java:172)
at workbench.gui.profiles.ConnectionGuiHelper$1.run(ConnectionGuiHelper.java:104)
Caused by: NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{172.29.28.71}{172.29.28.71:9300}]]
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:290)
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:207)
at org.elasticsearch.client.transport.support.TransportProxyClient.execute(TransportProxyClient.java:55)
at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:288)
at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:359)
at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:348)
at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java:1221)
at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.exists(AbstractClient.java:1241)
at nl.anchormen.sql4es.jdbc.ESConnection.buildClient(ESConnection.java:122)
... 6 more

from sql4es.

corneversloot avatar corneversloot commented on July 16, 2024

Well, it sais it cannot find an elasticsearch node on the host you provided. In my experience this can mean a couple of things:

  • there is no route from your machine to n01sml104.aap.csaa.pri. Are you sure you can reach the specified host and there are no firewalls in the way?
  • Elasticsearch is not running or it is running on a port other than 9300
  • you have a cluster name other than the default: 'elasticsearch'. If your cluster name is different you have to specify the cluster name in the connection url like jdbc:sql4es://n01sml104.aap.csaa.pri:9300/dtcalert?cluster.name=your-cluster-name

from sql4es.

sundeepkmr avatar sundeepkmr commented on July 16, 2024

My shield password had the special character '#' in it. I removed it from my password and it worked.

So apparently the problem was with that special character only. Thanks!

from sql4es.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.