Cannot open local storage

1,474 views
Skip to first unread message

Hung Tran

unread,
Jun 3, 2014, 4:32:05 AM6/3/14
to orient-...@googlegroups.com
Hi,

Since the last update to Orient v1.7, I often see this error although I rebuilt my database again.

"
orientdb> connect remote:localhost/test admin admin

Connecting to database [remote:localhost/test] with user 'admin'...
Error: com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage 'D:/Working Folder/Database/OrientDB/git/releases/orientdb-community-1.7/databases/test' with mode=rw

Error: com.orientechnologies.orient.core.exception.OSerializationException: Cannot load database's configuration. The database seems to be corrupted.

Error: java.io.IOException: The process cannot access the file because another process has locked a portion of the file
"

It won't happen when i shutdown, and restart server. I often happen daily. 

Any help will be very appreciated!

My Best,
Hung Tran

Artem Orobets

unread,
Jun 4, 2014, 1:40:06 AM6/4/14
to orient-...@googlegroups.com
Hi Hung,

Have you checked that any other process haven't access the database in the same time?

Best regards,
Artem Orobets

Orient Technologies

the Company behind OrientDB



--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hung Tran

unread,
Jun 4, 2014, 1:43:19 AM6/4/14
to orient-...@googlegroups.com
Hi,

For more information, when my application can access the database, i cannot access it from Console due to the error above, and vice versa. I got the same issue with OrientDB Studio. Look like it is locked by application name. Could you check it? It is really annoying.

I got it since v1.7 (use plocal storage), it won't happen on v1.6 (use local storage).

Any help will be very appreciated!

My Best,
Hung Tran


Hung Tran Dinh

unread,
Jun 4, 2014, 2:55:47 AM6/4/14
to orient-...@googlegroups.com
Hi Artem Orobets,

I am pretty sure that there is no any other applications involved here. I get that problem with OrientDB console, and OrientDB studio on the same database. When one access, another could not.

My Best,
Hung Tran


--

---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/ffuzA5IflO4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Hung Tran

Artem Orobets

unread,
Jun 4, 2014, 3:09:35 AM6/4/14
to orient-...@googlegroups.com
Hi Hung,

I'm sorry for inconvenience, but this is a right behavior for OrientDB in embedded mode.

As soon as all data manipulation performed right in your application, OrientDB works directly with files. But to do that in a most efficient way it need an exclusive access it is by design, otherwise interprocess synchronization would make a significant slowdown.

In the previous versions of OrientDB there were no locking of files, that may lead to data corruption.

To get access to the database from the several places simultaneously (like from your app and console) use OrientDB server and connect via remote protocol


Best regards,
Artem Orobets

Orient Technologies

the Company behind OrientDB



--

Hung Tran Dinh

unread,
Jun 4, 2014, 3:34:59 AM6/4/14
to orient-...@googlegroups.com
Hi Artem Orobets,

Your explanation makes sense for embedded database, however I am using remote protocol - I think you saw it from the error.

 "
orientdb> connect remote:localhost/test admin admin

Connecting to database [remote:localhost/test] with user 'admin'...
Error: com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage 'D:/Working Folder/Database/OrientDB/git/releases/orientdb-community-1.7/databases/test' with mode=rw

Error: com.orientechnologies.orient.core.exception.OSerializationException: Cannot load database's configuration. The database seems to be corrupted.

Error: java.io.IOException: The process cannot access the file because another process has locked a portion of the file
"

That's the problem. 

My Best,
Hung Tran



--

---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/ffuzA5IflO4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Hung Tran

Artem Orobets

unread,
Jun 4, 2014, 3:40:29 AM6/4/14
to orient-...@googlegroups.com
Hi Hung,

Oh, sorry. I missed that.

Is there any chance to reproduce the issue on other PC?



Best regards,
Artem Orobets

Orient Technologies

the Company behind OrientDB



Artem Orobets

unread,
Jun 4, 2014, 3:41:18 AM6/4/14
to orient-...@googlegroups.com
I meant: how can I reproduce the issue?

Best regards,
Artem Orobets

Orient Technologies

the Company behind OrientDB



Hung Tran Dinh

unread,
Jun 4, 2014, 4:08:29 AM6/4/14
to orient-...@googlegroups.com
Hi Artem Orobets,

Sorry, I forgot to test it on another PC. I just did, it seems to work very well on my testing VPS server. So, the problem occured on my development machine only.

Step to reproduce
1/ Create a test database
2/ Open OrientDB Studio, and connect to it
3/ Open OrientDB console, connect remote:localhost/test admin admin
4/ It shows error
5/ Shutdown the server, start it again
6/ From OrientDB console, reconnect again => it works fine
7/ Back to OrientDB Studio, cannot connect to it any more.

I will restart my development machine to check whether that error still occurs or not.

Thank you!

My Best,
Hung Tran

Artem Orobets

unread,
Jun 4, 2014, 5:19:10 AM6/4/14
to orient-...@googlegroups.com
Could you check that server has shut down after step 4? Ensure that server process ends and check what ports get the new instance.

Best regards,
Artem Orobets

Orient Technologies

the Company behind OrientDB



Hung Tran Dinh

unread,
Jun 4, 2014, 5:57:54 AM6/4/14
to orient-...@googlegroups.com
Hi Artem Orbets,

1/ After step 4, the OrientDB Studio is still working, query is still success.

2/ I have restarted my development server, it does not fix the problem

3/ I have also re-created entire database, it also get that problem.

My Best,
Hung Tran

Artem Orobets

unread,
Jun 4, 2014, 6:41:05 AM6/4/14
to orient-...@googlegroups.com
This mean that the server has not shut down.

What version do you use?
Do you see any errors in logs?

Best regards,
Artem Orobets

Orient Technologies

the Company behind OrientDB



Hung Tran Dinh

unread,
Jun 4, 2014, 7:06:52 AM6/4/14
to orient-...@googlegroups.com
Hi Artem Orobets,

1/ You should see the OrientDb version in my previous messages. That's OrientDB 1.7.
2/ No, there is no error in logs
3/ It is really strange behaviours
+ I shutdown the server, rename the database folder "A", 
+ I start the server, and it is working.
+ I shut down the server again, and rename it back to original name, 
+ I start server again, and it is working perfectly !???? the issue is gone.

My Best,
Hung Tran

Artem Orobets

unread,
Jun 4, 2014, 7:31:45 AM6/4/14
to orient-...@googlegroups.com
Hi Hung,

Sorry, I'm not sure that understand your point.

Could you confirm that server process still alive after shutdown?

Best regards,
Artem Orobets

Orient Technologies

the Company behind OrientDB



Hung Tran Dinh

unread,
Jun 4, 2014, 7:40:07 AM6/4/14
to orient-...@googlegroups.com
Hi Artem Orobets,

No, the server is gone after shutdown command.

I mean that the problem is gone after i did some tricks (change the name of database folder to another - Of course, I needed to shutdown the server in order to be able to do it).

My Best,
Hung Tran

Artem Orobets

unread,
Jun 4, 2014, 7:43:35 AM6/4/14
to orient-...@googlegroups.com
Hi Hung,

My linux allow to remove folder even when server is still working... Could you check in process list?

Best regards,
Artem Orobets

Orient Technologies

the Company behind OrientDB



Hung Tran

unread,
Jun 6, 2014, 4:16:09 AM6/6/14
to orient-...@googlegroups.com
Hi Artem Orobets,

I am using Windows 7 which does not allow me rename a folder if any process hold the exclusive lock on it, I need to shutdown the server in order to rename the folder (double checked). What are you looking for in process list?

Cheers,
Hung Tran
Reply all
Reply to author
Forward
0 new messages