Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: The Client driver version is different than Server version #6494

Closed
amrabed opened this issue Aug 2, 2016 · 5 comments
Closed

Warning: The Client driver version is different than Server version #6494

amrabed opened this issue Aug 2, 2016 · 5 comments
Assignees

Comments

@amrabed
Copy link

amrabed commented Aug 2, 2016

OrientDB Version

v2.2.6 on both server and client

Operating System

Server running on Docker Container from the latest official Docker image running on Mint/Ubuntu OS

Client running from Java API on Mac OS

Expected behavior and actual behavior

Expected: Connect to server

Actual:
WARNING: The Client driver version is different than Server version: client=36, server=32. You could not use the full features of the newer version. Assure to have the same versions on both

Steps to reproduce the problem

Java:
final ODatabaseDocumentTx db = new ODatabaseDocumentTx("remote:localhost").open("admin", "admin");

Gradle:
compile group: 'com.orientechnologies', name: 'orientdb-core', version: '2.2.6'
compile group: 'com.orientechnologies', name: 'orientdb-client', version: '2.2.6'
compile group: 'com.orientechnologies', name: 'orientdb-enterprise', version: '2.2.6'
compile group: 'com.googlecode.concurrentlinkedhashmap', name: 'concurrentlinkedhashmap-lru', version: '1.4.2'

@robfrank
Copy link
Contributor

robfrank commented Aug 2, 2016

I setup a similar scenario, doing a docker pull orientdb:latest and using a Main that connects to the localhost in remote.
First, in your connection url you don't state the db name:
final ODatabaseDocumentTx db = new ODatabaseDocumentTx("remote:localhost").open("admin", "admin")

rather than:

final ODatabaseDocumentTx db = new ODatabaseDocumentTx("remote:localhost/DB_NAME").open("admin", "admin")

Dependency check: orientdb-enterprise isn't needed anymore, the module is now collapsed inside client. Even com.googlecode.concurrentlinkedhashmap, because it is a transitive dependency that I hope gradle is able to download (I'm a maven user, but AFAIK gradle dependency resolution works the same way).

So, check your client dependencies, don't know in gradle, but with maven I will do a mvn dependency:tree just to understand what jars are effectively used.

@amrabed
Copy link
Author

amrabed commented Aug 2, 2016

First, in your connection url you don't state the db name:
final ODatabaseDocumentTx db = new ODatabaseDocumentTx("remote:localhost").open("admin", "admin")
rather than:
final ODatabaseDocumentTx db = new ODatabaseDocumentTx("remote:localhost/DB_NAME").open("admin", "admin")

I have tried both and I get the same error either way

Dependency check: orientdb-enterprise isn't needed anymore, the module is now collapsed inside client. Even com.googlecode.concurrentlinkedhashmap, because it is a transitive dependency that I hope gradle is able to download

I only included them because the manual says they are required to use the Document API

@robfrank
Copy link
Contributor

robfrank commented Aug 3, 2016

I will fix documentation about dependencies.
BTW, can you check your dependency tree with gradle dependencies command?
Can you post the docker command used to run Orientdb?
Check the OrientDB server log with docker logs <container_hash> to be sure that is the right version.
It is not clear if the docker is running in a separate linux box or on your mac, in the second case, what is the ip address of the docker container? Are you using docker for mac or docker toolbox?
Can you connect to the running orientDB via the studio web interface? (http://<docker_container_ip>:2480)

Thanks

@amrabed
Copy link
Author

amrabed commented Aug 4, 2016

Thanks, @robfrank. Problem solved. Turned out Docker has been using an old image pulled 3 months ago. My fault I assumed that docker run orientdb will always pull the latest. Removing the image and re-running the container fixed it. See below for details.

I only have one question: Why I got stuck at this warning in the first place? I may have a server running for months, and the client just happens to use the latest version. Shouldn't that still work?

BTW, can you check your dependency tree with gradle dependencies command?

+--- com.orientechnologies:orientdb-core:2.2.6
|    +--- org.xerial.snappy:snappy-java:1.1.0.1
|    \--- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.1 -> 1.4.2
+--- com.orientechnologies:orientdb-client:2.2.6
|    \--- com.orientechnologies:orientdb-core:2.2.6 (*)
+--- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2

I only needed to include:
compile group: 'com.orientechnologies', name: 'orientdb-client', version: '2.2.6'

+--- com.orientechnologies:orientdb-client:2.2.6
|    \--- com.orientechnologies:orientdb-core:2.2.6
|         +--- org.xerial.snappy:snappy-java:1.1.0.1
|         \--- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.1

Can you post the docker command used to run Orientdb?

docker run -d --name orientdb -p 2480:2480 -p 2424:2424 -v /mnt/orientdb/databases:/orientdb/databases -e ORIENTDB_ROOT_PASSWORD=$ORIENTDB_ROOT_PASSWORD orientdb

Check the OrientDB server log with docker logs to be sure that is the right version.

INFO  OrientDB Server v2.1.14 (build 2.1.x@r4d21d805fc9574c11b334a453161920cc1ed9cb7; 2016-03-30 15:26:04+0000) is starting up... [OServer]
INFO  Databases directory: /orientdb/databases [OServer]
INFO  Listening binary connections on 0.0.0.0:2424 (protocol v.32, socket=default) [OServerNetworkListener]
INFO  Listening http connections on 0.0.0.0:2480 (protocol v.10, socket=default) [OServerNetworkListener]

It is not clear if the docker is running in a separate linux box or on your mac, in the second case, what is the ip address of the docker container? Are you using docker for mac or docker toolbox?

I am running Docker on a remote Linux server and accessing it from my Mac through SSH tunneling

Can you connect to the running orientDB via the studio web interface? (http://<docker_container_ip>:2480)

Yes, I have always been able to connect to the studio web interface at localhost:2480

@lvca lvca added invalid and removed invalid labels Aug 4, 2016
@robfrank
Copy link
Contributor

robfrank commented Aug 4, 2016

Well done. Yes, docker never pull an image again. You can use the versioned tag instead of latest, e.g.: orientdb:2.2.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants