orientechnologies / orientdb

OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.
https://orientdb.dev
Apache License 2.0
4.76k stars 871 forks source link

Replication not working with OrientDB 1.5.0 #1589

Closed edalorzo closed 10 years ago

edalorzo commented 11 years ago

I have been struggling with making replication work with OrientDB 1.5.0.

Following the description of the failing simple scenario. Attached you can see configuration of every one of my two servers and their corresponding log files.

System Information

lvca commented 11 years ago

Seems databases are not aligned at the start. Where you placed the database directory? It needs to stay under each $ORIENTDB_HOME/databases and MUST have the same name.

edalorzo commented 11 years ago

The two database installations were two exact copies. In the databases folder there was only the tinkerpop database that comes by default with the product.

The orientdb installations and their corresponding databases folders were placed under:

+--- C:
       \--- Software
             \--- orientdb-graph-1.5.0
                   \--- databases
                         \--- tinkerpop
             \--- orientdb-graph-1.5.0-rep
                   \-- databases
                        \--- tinkerpop

Since I was running the two instances in the same machine I did not set the ORIENTDB_HOME globally, but in the terminal session by doing SET ORIENTDB_HOME=C:\Software\orientdb-graph-1.5.0 and SET ORIENTDB_HOME=C:\Software\orientdb-graph-1.5.0-rep respectively in every terminal.

Issuing an echo %ORIENTDB_HOME% confirmed in every case that the variable was present in every corresponding terminal session.

After setting the variables I ran the ORIENTDB_HOME\bin\dserver.bat in every terminal.

To test the insert I used another set of terminals in which, once again, I set the ORIENTDB_HOME variable locally and then opened the ORIENTDB_HOME\bin\console.bat program.

As I mentioned in the post I also tested all this using two different machines with the same results.

lvca commented 11 years ago

Seems all perfect. Maybe it doesn't get the env variable. Try to modify the dserver.bat adding -DORIENTDB_HOME= but don't use backslash \ but slash /

edalorzo commented 11 years ago

Man Lucca, you are the best!

That was it! I tested first in a Linux box and it worked like a charm, then I retested the Windows scenario and it worked too.

Still, I believe the application should handle the ORIENTDB_HOME variable according to the operating system, but at least I now can make this work.

Thanks a million, Lucca!

lvca commented 11 years ago

Great! ;-)

lvca commented 11 years ago

The / works on all the OS, so use always /.

edalorzo commented 11 years ago

As a matter of fact, I feel this case should not be closed until the problem has been properly addressed. Paths should be specified according to the user's operating system. This is customary of other Java-related paths like JAVA_HOME, ANT_HOME or CATALINA_HOME.

To this day, I have never had to specify any of those paths using forward slashes in Windows. They all can be specified using the path separator supported by the operating system.

I believe the ORIENTDB_HOME should be the same.

lvca commented 10 years ago

We convert ORIENTDB_HOME path once loaded.