-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I started OrientDb with a certificate to run over HTTPS. That works. But I cannot connect with the .NET Core driver to the OrientDb server.
Configuration at orientdb-server-config.xml is as follows:
<network>
<sockets>
<socket implementation="com.orientechnologies.orient.server.network.OServerTLSSocketFactory" name="ssl">
<parameters>
<parameter value="false" name="network.ssl.clientAuth"/>
<parameter value="config/cert/orientdb.ks" name="network.ssl.keyStore"/>
<parameter value="password" name="network.ssl.keyStorePassword"/>
<parameter value="config/cert/orientdb.ks" name="network.ssl.trustStore"/>
<parameter value="password" name="network.ssl.trustStorePassword"/>
</parameters>
</socket>
<socket implementation="com.orientechnologies.orient.server.network.OServerTLSSocketFactory" name="https">
<parameters>
<parameter value="false" name="network.ssl.clientAuth"/>
<parameter value="config/cert/orientdb.ks" name="network.ssl.keyStore"/>
<parameter value="Store241" name="network.ssl.keyStorePassword"/>
<parameter value="config/cert/orientdb.ks" name="network.ssl.trustStore"/>
<parameter value="Store241" name="network.ssl.trustStorePassword"/>
</parameters>
</socket>
</sockets>
<protocols>
<protocol implementation="com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary" name="binary"/>
<protocol implementation="com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpDb" name="http"/>
</protocols>
<listeners>
<listener protocol="binary" socket="default" port-range="2424-2430" ip-address="0.0.0.0" />
<listener protocol="http" socket="https" port-range="2434-2440" ip-address="0.0.0.0">
When I try to connect to the OrientDb server using this code I have an error. The code is as follows:
IOrientServerConnection server = new OrientDBConfiguration()
.ConnectWith<byte[]>()
.Connect(new BinaryProtocol(hostname, rootUsername, rootPassword, port))
.SerializeWith.Serializer(new OrientDBRecordCSVSerializer())
.LogWith.Logger(ApplicationLogging.LoggerFactory.CreateLogger("OrientDb"))
.CreateFactory()
.CreateConnection();
I am using hostname="127.0.0.1" and port "2424" and I get this error:
com.orientechnologies.orient.core.exception.OConfigurationException: Session open with token flag false is not supported anymore please use token based sessions
I analyzed the code at OrientDBBinaryConnectionStream.cs and I see this logic. My code goes with ProtocolVersion 38 and UseTokenBasedSession runs with FALSE value.
if (ConnectionMetaData.ProtocolVersion < 27)
{
ConnectionMetaData.UseTokenBasedSession = false;
}
I do not know if what I am doing is right or wrong because of the documentation.
Any help will be appretiated.