Orientdb 401 Unauthorized error

1,026 views
Skip to first unread message

Alexander Kuleshov

unread,
Oct 4, 2012, 8:55:04 AM10/4/12
to orient-...@googlegroups.com
Hello,

I wrote some test with orientdb-graphed-SNAPSHOT-1.2.0 and i user erlang and orientdb rest api.

My test send http request to create 2 vertex with 2 random properties and 1 edge beetween this vertex. I send 5 req/sec to the orientdb. Orientdb creates 200 - 500 vertices and after that from time to time i got error message from orientdb: 401 Unauthorized error, and following requests are good, than after some good requests i again got 401 Unauthorized error and and kept repeating. Why is it might occur?

Thank you.

Luca Garulli

unread,
Oct 4, 2012, 8:57:26 AM10/4/12
to orient-...@googlegroups.com
Hi,
can you send the console messages? Probably something wrong occurs in the back-end and destroy the user's session?

Lvc@

--
 
 
 

Alexander Kuleshov

unread,
Oct 4, 2012, 9:12:15 AM10/4/12
to orient-...@googlegroups.com


2012/10/4 Luca Garulli <l.ga...@gmail.com>
Hi,
can you send the console messages? Probably something wrong occurs in the back-end and destroy the user's session?

Lvc@
  -- 
 

Orientdb server.sh console log:

2012-10-04 19:09:47:992 SEVE Internal server error:
com.orientechnologies.common.concur.OTimeoutException: Timeout on acquiring shared lock against resource of class : class com.orientechnologies.common.concur.resource.OSharedResourceAdaptiveExternal with timeout=5000 [ONetworkProtocolHttpDb]
2012-10-04 19:09:48:146 SEVE Internal server error:
java.net.SocketException: Broken pipe [ONetworkProtocolHttpDb]
2012-10-04 19:10:29:917 SEVE Internal server error:
com.orientechnologies.common.concur.OTimeoutException: Timeout on acquiring shared lock against resource of class : class com.orientechnologies.common.concur.resource.OSharedResourceAdaptiveExternal with timeout=5000 [ONetworkProtocolHttpDb]
2012-10-04 19:10:30:094 SEVE Internal server error:
java.net.SocketException: Broken pipe [ONetworkProtocolHttpDb]
2012-10-04 19:10:36:632 SEVE Internal server error:
com.orientechnologies.common.concur.OTimeoutException: Timeout on acquiring shared lock against resource of class : class com.orientechnologies.common.concur.resource.OSharedResourceAdaptiveExternal with timeout=5000 [ONetworkProtocolHttpDb]
2012-10-04 19:10:36:957 SEVE Internal server error:

Luca Garulli

unread,
Oct 8, 2012, 5:16:04 PM10/8/12
to orient-...@googlegroups.com
Hi,
seems that you don't release connections once acquired. Can you check it?

Lvc@

--
 
 
 

Gaurav Dhiman

unread,
Apr 17, 2014, 8:26:38 AM4/17/14
to orient-...@googlegroups.com, kulesh...@gmail.com
Hi,

I am pulling out older thread as I am still facing this issue. I even found bug report related to it https://bugster.forgerock.org/jira/browse/OPENIDM-863
Bug is closed in system, but still I am facing the issue.

Problem / Issue:
I get 401 HTTP error on random basis.

1. If I make regular HTTP calls (one after another) to server, it works fine, but if I give gap of 10 sec or more between two HTTP calls, the call returns with 401 (unauthorized) error.
2. Also if I make simultaneous aync calls to OrientDB, only first call succeeds, rest all returns 401 error.

NOTE:
I am using v1.7-rc1 version of OrientDB
I am not explicitely sending OSESSIONID in request header, but its already set in cookies and I expect that its sent in subsequent HTTP calls automatically. Below is the screenshot of OSESSIONID in chrome debugger:



Below is the OrientDB server console output:


           ,,:` `,,.
          ,,,    .,`
         ,,.     `,                                          GRAPH DATABASE
       ``        `.
                 ``                                         www.orientdb.org
                 `
Can't load log handler "java.util.logging.FileHandler"
java.io.IOException: Couldn't get lock for ../log/orient-server.log
java.io.IOException: Couldn't get lock for ../log/orient-server.log
        at java.util.logging.FileHandler.openFiles(FileHandler.java:389)
        at java.util.logging.FileHandler.<init>(FileHandler.java:225)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at java.lang.Class.newInstance(Class.java:374)
        at java.util.logging.LogManager$4.run(LogManager.java:785)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:778)
        at java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java
:1350)
        at java.util.logging.LogManager.access$1500(LogManager.java:148)
        at java.util.logging.LogManager$RootLogger.getHandlers(LogManager.java:1
433)
        at com.orientechnologies.common.log.OLogManager.installCustomFormatter(O
LogManager.java:273)
        at com.orientechnologies.orient.server.OServer.<init>(OServer.java:103)
        at com.orientechnologies.orient.server.OServerMain.create(OServerMain.ja
va:22)
        at com.orientechnologies.orient.server.OServerMain.main(OServerMain.java
:31)

2014-04-17 16:54:08:967 INFO Loading configuration from: config/orientdb-server-
config.xml... [OServerConfigurationLoaderXml]
2014-04-17 16:54:09:198 INFO OrientDB Server v1.7-rc1 (build UNKNOWN@r${buildNum
ber}; 2014-02-06 12:04:16+0100) is starting up... [OServer]
2014-04-17 16:54:09:208 INFO Databases directory: C:\Users\Gaurav\Downloads\orie
ntdb-community-1.7-rc1\databases [OServer]
2014-04-17 16:54:09:256 INFO Listening binary connections on 0.0.0.0:2424 (proto
col v.20) [OServerNetworkListener]
2014-04-17 16:54:09:258 INFO Listening http connections on 0.0.0.0:2480 (protoco
l v.10) [OServerNetworkListener]
2014-04-17 16:54:09:280 INFO Installing dynamic plugin 'studio-1.7-rc1.zip'... [
OServerPluginManager]
2014-04-17 16:54:09:344 INFO Installing GREMLIN language v.2.5.0-SNAPSHOT - grap
h.pool.max=50 [OGraphServerHandler]
2014-04-17 16:54:09:361 INFO Mail plugin installed and active. Loaded 1 profile(
s): [default] [OMailPlugin]
2014-04-17 16:54:09:361 INFO OrientDB Server v1.7-rc1 is active. [OServer]


Regards,
Gauarv

Gaurav Dhiman

unread,
Apr 17, 2014, 8:35:12 AM4/17/14
to orient-...@googlegroups.com, kulesh...@gmail.com
Nother point to note:
I have set the session time out to 1 month (108000 sec) by setting network.http.sessionExpireTimeout property in config file.

So in any case the session should not expire before 1 month unless user logout explicitly.

Regards,
Gaurav
Reply all
Reply to author
Forward
0 new messages