Automatic Backup Not working -Orient Db - orientdb

I Have enable automatic backup by xml file(orientdb-server-plugin.xml)
it as follows.
<handler class="com.orientechnologies.orient.server.handler.OAutomaticBackup"> <parameters>
<parameter value="true" name="enabled"/>
<parameter value="4h" name="delay"/>
<parameter value="23:00:00" name="firstTime"/>
<parameter value="backup" name="target.directory"/>
<parameter value="${DBNAME}-${DATE:yyyyMMddHHmmss}.zip" name="target.fileName"/>
<parameter value="9" name="compressionLevel"/>
<parameter value="1048576" name="bufferSize"/>
<parameter value="" name="db.include"/>
<parameter value="" name="db.exclude"/>
</parameters>
</handler>
But backup not working for me.
Please assist me to do this.

You should put the configuration into orientdb-server-config.xml file (Reference: Automatic Backup Server Plugin).
What OS are you using? You can also put absolute path of the backup folder in the target.directory parameter, just to be sure of location where backups will be stored. Check you logs, there should be a line saying:
Automatic backup plugin installed and active: ...
If not, please post your logs here for further investigation.
Thanks.
Hope it helps.

Related

setting up client affinity for db2 purescale

I have a DB2 Purescale environment set up. I am trying to configure client affinity for it on my client machine. I have modified my db2dsdriver.cfg file as follows to include the client affinity parameters:-
<configuration>
<dsncollection>
<dsn alias="sample" name="sample" host="127.0.0.0" port="50000">
<parameter name="Authentication" value="Server"/>
</dsn>
</dsncollection>
<databases>
<database name="sample" host="127.0.0.0" port="50000">
<parameter name="keepAliveTimeout" value="20"/>
<acr>
<parameter name="enableAcr" value="true"/>
<parameter name="enableSeamlessACR" value="true"/>
<parameter name="maxAcrRetries" value="2"/>
<parameter name="acrRetryInterval" value="3"/>
<parameter name="affinityFailbackInterval" value="60"/>
<parameter name="enableAlternateServerListFirstConnect" value="false"/>
<alternateserverlist>
<server name="host-1" hostname="127.0.0.0" port="50000"/>
<server name="host-2" hostname="127.0.0.1" port="50000"/>
<server name="host-3" hostname="127.0.0.2" port="50000"/>
</alternateserverlist>
<affinitylist>
<list name="list1" serverorder="host-1,host-2,host-3">
</list>
</affinitylist>
<clientaffinitydefined>
<client name="ABC" hostname="127.0.0.3" listname="list1">
</client>
</clientaffinitydefined>
</acr>
</database>
</databases>
</configuration>
Please note that all the IPs and the machine names provided here are just made up.
But, when I try the db2clp to connect to my database, I get the following error:-
"SQL5163N A required configuration parameter "listname or serverorder under affinitylist group" is missing from the db2dsdriver.cfg configuration file."I have tried but cannot figure out what is missing as both the listname and the serverorder are present in the file.
Also, if I use the CLPPLUS to access the DB from client machine, I can access the DB on host-1, but if I stop the instance on host-1 to test client affinity, my client machine cannot connect to the DB on host-2. I get the following error:-
Error when instance stopped on host-1 and running on host-2
Can someone please help me understand what might be the problem?
Check the following address:
<client name="ABC" hostname="127.0.0.3" listname="list1">
</client>
This must be your client's address. If it's not correct, you get such an error you mentioned.
As for CLPPLUS. It's a jdbc application, and it doesn't use db2dsdriver.cfg.
You must set the corresponding properties.
Example of enabling client affinities in Java clients for Db2 on Linux, UNIX, and Windows systems connections.

Service Fabric Application settings not being overriden by Application Manifest parameters

Need some help understanding why the configuration settings of a service fabric application aren't being overriden by the values defined in the application manifest, as expected. Curently I have some settings defined for my two different environments: the default settings are for the final Azure cluster and I have a custom publish profile for my local dev cluster.
Below what I have for each file:
SampleServFabricApp/ApplicationPackageRoot/ApplicationManifest.xml
<ApplicationManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ApplicationTypeName="SampleServFabricAppType" ApplicationTypeVersion="1.0.0" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<Parameters>
<Parameter Name="SampleServFabricApp_MessageTransportConfig_CertificateFindValue" DefaultValue="e47c0e4b80e9b83e39e5e1dc35610b6b84a3b764" />
<Parameter Name="SampleServFabricApp_MessageTransportConfig_CertificateRemoteCommonNames" DefaultValue="*.thefinaldomain.com" />
<Parameter Name="SampleServFabricApp_MessageTransportConfig_CertificateRemoteThumbprints" DefaultValue="e47c0e4b80e9b83e39e5e1dc35610b6b84a3b764" />
<Parameter Name="SampleServFabricApp_PartitionCount" DefaultValue="10" />
<Parameter Name="SampleServFabricApp_MinReplicaSetSize" DefaultValue="3" />
<Parameter Name="SampleServFabricApp_TargetReplicaSetSize" DefaultValue="3" />
</Parameters>
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="SampleServFabricApp.EndpointPkg" ServiceManifestVersion="1.0.0" />
<ConfigOverrides>
<ConfigOverride Name="Config">
<Settings>
<Section Name="SampleServFabricApp_MessageTransportConfig">
<Parameter Name="CertificateFindValue" Value="[SampleServFabricApp_MessageTransportConfig_CertificateFindValue]" />
<Parameter Name="CertificateRemoteCommonNames" Value="[SampleServFabricApp_MessageTransportConfig_CertificateRemoteCommonNames]" />
<Parameter Name="CertificateRemoteThumbprints" Value="[SampleServFabricApp_MessageTransportConfig_CertificateRemoteThumbprints]" />
</Section>
</Settings>
</ConfigOverride>
</ConfigOverrides>
</ServiceManifestImport>
<DefaultServices>
<Service Name="SampleServFabricAppActorService" GeneratedIdRef="e07529c2-2426-4065-b621-90033a78704c|Persisted">
<StatefulService ServiceTypeName="SampleServFabricAppActorServiceType" TargetReplicaSetSize="[SampleServFabricApp_TargetReplicaSetSize]" MinReplicaSetSize="[SampleServFabricApp_MinReplicaSetSize]">
<UniformInt64Partition PartitionCount="[SampleServFabricApp_PartitionCount]" LowKey="-9223372036854775808" HighKey="9223372036854775807" />
</StatefulService>
</Service>
</DefaultServices>
</ApplicationManifest>
SampleServFabricApp/ApplicationParameters/dev_cluster.xml
<?xml version="1.0" encoding="utf-8"?>
<Application xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="fabric:/SampleServFabricApp" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<Parameters>
<Parameter Name="SampleServFabricApp_MessageTransportConfig_CertificateFindValue" Value="4826f9a3ac95bca949fab19ea136e197" />
<Parameter Name="SampleServFabricApp_MessageTransportConfig_CertificateRemoteCommonNames" Value="ServiceFabricDevClusterCert" />
<Parameter Name="SampleServFabricApp_MessageTransportConfig_CertificateRemoteThumbprints" Value="4826f9a3ac95bca949fab19ea136e197" />
</Parameters>
</Application>
SampleServFabricApp.Endpoint/PackageRoot/Config/Settings.xml
<?xml version="1.0" encoding="utf-8"?>
<Settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<Section Name="SampleServFabricApp_MessageTransportConfig">
<Parameter Name="MaxMessageSize" Value="10000000" />
<Parameter Name="SecurityCredentialsType" Value="X509" />
<Parameter Name="CertificateFindType" Value="FindByThumbprint" />
<Parameter Name="CertificateFindValue" Value="e47c0e4b80e9b83e39e5e1dc35610b6b84a3b764" />
<Parameter Name="CertificateStoreLocation" Value="LocalMachine" />
<Parameter Name="CertificateStoreName" Value="My" />
<Parameter Name="CertificateProtectionLevel" Value="EncryptAndSign" />
<Parameter Name="CertificateRemoteCommonNames" Value="*.thefinaldomain.com" />
<Parameter Name="CertificateRemoteThumbprints" Value="e47c0e4b80e9b83e39e5e1dc35610b6b84a3b764" />
</Section>
</Settings>
When publishing the application to the local cluster, I can see in the output the log when creating the application and it seems the parameters are ok:
2>Creating application... 2> 2> 2>ApplicationName :
fabric:/SampleServFabricApp 2>ApplicationTypeName :
SampleServFabricAppType 2>ApplicationTypeVersion : 1.0.0
2>ApplicationParameters : {
"SampleServFabricApp_MessageTransportConfig_CertificateRemoteThumbprints"
= 2> "4826f9a3ac95bca949fab19ea136e197"; 2> "SampleServFabricApp_MessageTransportConfig_CertificateRemoteCommonNames"
= 2> "ServiceFabricDevClusterCert"; 2> "SampleServFabricApp_MessageTransportConfig_CertificateFindValue" =
2> "4826f9a3ac95bca949fab19ea136e197"; } 2>
2>Create application succeeded.
But using the service explorer I can see that errors occurred during the application startup and if I check the event log I can see the following error:
failed to set security settings to { provider=SSL
protection=EncryptAndSign certType = '' store='LocalMachine/My'
findValue='FindByThumbprint:e47c0e4b80e9b83e39e5e1dc35610b6b84a3b764'
remoteCertThumbprints='e47c0e4b80e9b83e39e5e1dc35610b6b84a3b764'
remoteX509Names=('*.thefinaldomain.com',issuer=)
certChainFlags=40000000 isClientRoleInEffect=false
claimBasedClientAuthEnabled=false }: FABRIC_E_CERTIFICATE_NOT_FOUND
Some things I've already tried:
- Used Service Fabric explorer and confirmed that the Parameters under the Details tab of the application are correct and match the parameters that have been sent to the deployment script according to the Output window;
- Confirmed that the contents of the "Settings.xml" file under "C:\SfDevCluster\Data_App_Node_0\SampleServFabricAppType_App18\SampleServFabricApp.EndpointPkg.Config.1.0.0" are equal to the contents of the "SampleServFabricApp.Endpoint/PackageRoot/Config/Settings.xml";
Any idea if this is a bug or if its missing something that I truly cannot see?
As you can see it seems that the deployment process assumes the correct overridden values, but the application doesn't work and event viewer shows the default values instead of the ones used during deployment.
Thanks.
I just had a reply to the issue I opened on GitHub. It seems the described behavior is known and it will be fixed on the SDK 3.3 release. For all of you that may want to check it, you can find the issue here

Why can't I connect to this Service Fabric cluster?

I'm blocked by an error when connecting to a remote service fabric cluster running on premise (not on Azure) using the Connect-ServiceFabricCluster PowerShell command for a network-connected virtual machine:
WARNING: Failed to contact Naming Service. Attempting to contact Failover Manager Service...
WARNING: Failed to contact Failover Manager Service, Attempting to contact FMM...
False
WARNING: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.1.102:19000
Connect-ServiceFabricCluster : No cluster endpoint is reachable, please check if there is connectivity/firewall/DNS issue.
At Install.ps1:3 char:1
+ Connect-ServiceFabricCluster -ConnectionEndpoint "FABRICTESTSRV:19000" -WindowsCred ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Connect-ServiceFabricCluster], FabricException
+ FullyQualifiedErrorId : TestClusterConnectionErrorId,Microsoft.ServiceFabric.Powershell.ConnectCluster
The command is:
Connect-ServiceFabricCluster -ConnectionEndpoint "FABRICTESTSRV:19000" -WindowsCredential:$True
Why isn't it working?
Here is what I have tried:
I have tried turning Windows Firewall off entirely. No luck there.
Connecting locally to the cluster while inside of the virtual machine works just fine: Connect-ServiceFabricCluster "localhost:19000"
This is not a DNS issue. I can ping the FQDN of the machine just fine.
Note: This is not an Azure hosted Virtual Machine. This is simply a network-connected virtual machine running Service Fabric Core, vanilla Windows 8.1 x64 fully up to date.
Edit: Get-ServiceFabricClusterManifest reads as follows:
<ClusterManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="ComputerName-Local-Cluster" Version=
"1.0" xmlns="http://schemas.microsoft.com/2011/01/fabric">
<NodeTypes>
<NodeType Name="NodeType0">
<Endpoints>
<ClientConnectionEndpoint Port="19000" />
<LeaseDriverEndpoint Port="19001" />
<ClusterConnectionEndpoint Port="19002" />
<HttpGatewayEndpoint Port="19080" Protocol="http" />
<HttpApplicationGatewayEndpoint Port="19081" Protocol="http" />
<ServiceConnectionEndpoint Port="19006" />
<ApplicationEndpoints StartPort="30001" EndPort="31000" />
</Endpoints>
</NodeType>
<NodeType Name="NodeType1">
<Endpoints>
<ClientConnectionEndpoint Port="19010" />
<LeaseDriverEndpoint Port="19011" />
<ClusterConnectionEndpoint Port="19012" />
<HttpGatewayEndpoint Port="19082" Protocol="http" />
<HttpApplicationGatewayEndpoint Port="19083" Protocol="http" />
<ServiceConnectionEndpoint Port="19016" />
<ApplicationEndpoints StartPort="31001" EndPort="32000" />
</Endpoints>
</NodeType>
<NodeType Name="NodeType2">
<Endpoints>
<ClientConnectionEndpoint Port="19020" />
<LeaseDriverEndpoint Port="19021" />
<ClusterConnectionEndpoint Port="19022" />
<HttpGatewayEndpoint Port="19084" Protocol="http" />
<HttpApplicationGatewayEndpoint Port="19085" Protocol="http" />
<ServiceConnectionEndpoint Port="19026" />
<ApplicationEndpoints StartPort="32001" EndPort="33000" />
</Endpoints>
</NodeType>
<NodeType Name="NodeType3">
<Endpoints>
<ClientConnectionEndpoint Port="19030" />
<LeaseDriverEndpoint Port="19031" />
<ClusterConnectionEndpoint Port="19032" />
<HttpGatewayEndpoint Port="19086" Protocol="http" />
<HttpApplicationGatewayEndpoint Port="19087" Protocol="http" />
<ServiceConnectionEndpoint Port="19036" />
<ApplicationEndpoints StartPort="33001" EndPort="34000" />
</Endpoints>
</NodeType>
<NodeType Name="NodeType4">
<Endpoints>
<ClientConnectionEndpoint Port="19040" />
<LeaseDriverEndpoint Port="19041" />
<ClusterConnectionEndpoint Port="19042" />
<HttpGatewayEndpoint Port="19088" Protocol="http" />
<HttpApplicationGatewayEndpoint Port="19089" Protocol="http" />
<ServiceConnectionEndpoint Port="19046" />
<ApplicationEndpoints StartPort="34001" EndPort="35000" />
</Endpoints>
</NodeType>
</NodeTypes>
<Infrastructure>
<WindowsServer IsScaleMin="true">
<NodeList>
<Node NodeName="_Node_0" IPAddressOrFQDN="localhost" IsSeedNode="true" NodeTypeRef="NodeType0" FaultDomain="fd:/0" UpgradeDomain="0" />
<Node NodeName="_Node_1" IPAddressOrFQDN="localhost" IsSeedNode="true" NodeTypeRef="NodeType1" FaultDomain="fd:/1" UpgradeDomain="1" />
<Node NodeName="_Node_2" IPAddressOrFQDN="localhost" IsSeedNode="true" NodeTypeRef="NodeType2" FaultDomain="fd:/2" UpgradeDomain="2" />
<Node NodeName="_Node_3" IPAddressOrFQDN="localhost" NodeTypeRef="NodeType3" FaultDomain="fd:/3" UpgradeDomain="3" />
<Node NodeName="_Node_4" IPAddressOrFQDN="localhost" NodeTypeRef="NodeType4" FaultDomain="fd:/4" UpgradeDomain="4" />
</NodeList>
</WindowsServer>
</Infrastructure>
<FabricSettings>
<Section Name="Security">
<Parameter Name="ClusterCredentialType" Value="None" />
<Parameter Name="ServerAuthCredentialType" Value="None" />
</Section>
<Section Name="FailoverManager">
<Parameter Name="ExpectedClusterSize" Value="4" />
<Parameter Name="TargetReplicaSetSize" Value="3" />
<Parameter Name="MinReplicaSetSize" Value="3" />
<Parameter Name="ReconfigurationTimeLimit" Value="20" />
<Parameter Name="BuildReplicaTimeLimit" Value="20" />
<Parameter Name="CreateInstanceTimeLimit" Value="20" />
<Parameter Name="PlacementTimeLimit" Value="20" />
</Section>
<Section Name="ReconfigurationAgent">
<Parameter Name="ServiceApiHealthDuration" Value="20" />
<Parameter Name="ServiceReconfigurationApiHealthDuration" Value="20" />
<Parameter Name="LocalHealthReportingTimerInterval" Value="5" />
<Parameter Name="IsDeactivationInfoEnabled" Value="true" />
<Parameter Name="RAUpgradeProgressCheckInterval" Value="3" />
</Section>
<Section Name="ClusterManager">
<Parameter Name="TargetReplicaSetSize" Value="3" />
<Parameter Name="MinReplicaSetSize" Value="3" />
<Parameter Name="UpgradeStatusPollInterval" Value="5" />
<Parameter Name="UpgradeHealthCheckInterval" Value="5" />
<Parameter Name="FabricUpgradeHealthCheckInterval" Value="5" />
</Section>
<Section Name="NamingService">
<Parameter Name="TargetReplicaSetSize" Value="3" />
<Parameter Name="MinReplicaSetSize" Value="3" />
</Section>
<Section Name="Management">
<Parameter Name="ImageStoreConnectionString" Value="file:C:\SfDevCluster\Data\ImageStoreShare" />
<Parameter Name="ImageCachingEnabled" Value="false" />
<Parameter Name="EnableDeploymentAtDataRoot" Value="true" />
</Section>
<Section Name="Hosting">
<Parameter Name="EndpointProviderEnabled" Value="true" />
<Parameter Name="RunAsPolicyEnabled" Value="true" />
<Parameter Name="DeactivationScanInterval" Value="60" />
<Parameter Name="DeactivationGraceInterval" Value="10" />
<Parameter Name="EnableProcessDebugging" Value="true" />
<Parameter Name="ServiceTypeRegistrationTimeout" Value="20" />
<Parameter Name="CacheCleanupScanInterval" Value="300" />
</Section>
<Section Name="HttpGateway">
<Parameter Name="IsEnabled" Value="true" />
</Section>
<Section Name="PlacementAndLoadBalancing">
<Parameter Name="MinLoadBalancingInterval" Value="300" />
</Section>
<Section Name="Federation">
<Parameter Name="NodeIdGeneratorVersion" Value="V4" />
<Parameter Name="UnresponsiveDuration" Value="0" />
</Section>
<Section Name="ApplicationGateway/Http">
<Parameter Name="IsEnabled" Value="true" />
</Section>
<Section Name="FaultAnalysisService">
<Parameter Name="TargetReplicaSetSize" Value="3" />
<Parameter Name="MinReplicaSetSize" Value="3" />
</Section>
<Section Name="Trace/Etw">
<Parameter Name="Level" Value="4" />
</Section>
<Section Name="Diagnostics">
<Parameter Name="ProducerInstances" Value="ServiceFabricEtlFile, ServiceFabricPerfCtrFolder" />
<Parameter Name="MaxDiskQuotaInMB" Value="10240" />
</Section>
<Section Name="ServiceFabricEtlFile">
<Parameter Name="ProducerType" Value="EtlFileProducer" />
<Parameter Name="IsEnabled" Value="true" />
<Parameter Name="EtlReadIntervalInMinutes" Value=" 5" />
<Parameter Name="DataDeletionAgeInDays" Value="3" />
</Section>
<Section Name="ServiceFabricPerfCtrFolder">
<Parameter Name="ProducerType" Value="FolderProducer" />
<Parameter Name="IsEnabled" Value="true" />
<Parameter Name="FolderType" Value="ServiceFabricPerformanceCounters" />
<Parameter Name="DataDeletionAgeInDays" Value="3" />
</Section>
<Section Name="TransactionalReplicator">
<Parameter Name="CheckpointThresholdInMB" Value="64" />
</Section>
</FabricSettings>
</ClusterManifest>
Why isn't it working?
It is not working because you set IP address of your nodes as localhost thus making them undiscoverable. It will work for local debug cluster, but for on-premises and for Azure clusters you have to specify valid and reachable IP address or qualified name.
Also, I'm not 100% sure right now, but I can suggest to specify FQDN instead of IP address if you want your cluster be accessible by URI and not by IP. I remember I had troubles with this, but it is still not clear what has helped — FQDN or something else.
There were a few issues, but the biggest, as #cassandrad mentioned, was that the default deployment binds to the TCP FQDN of localhost (IPAddressOrFQDN="localhost") and not the IP address of the machine, so it only allows local connections by default.
Here are complete steps for fixing my issue:
I first ran netstat -a | FindStr "19000" in Command Prompt to check what bindings were active, in order to affirm what #cassandrad said.
Reading this guide, I decided to download the Service Fabric standalone package for Windows Server (works just fine outside of Windows Server, on Windows 8.1 x64 by the way).
I copied and then modified ClusterConfig.Unsecure.DevCluster.json, under the nodes section I changed all nodes' iPAddress to be 192.168.1.102. I called the new file ClusterConfig.Unsecure.CustomDevCluster.json.
I ran CreateServiceFabricCluster.ps1. It asked me what JSON configuration to use, so I gave it ClusterConfig.Unsecure.DevCluster.json.
The first time it failed because of an error fetching Newtonsoft.JSON version 6.0.0.0, as visible from the traces, which was a rather annoying, obfuscated error. The error was because I did not have .NET Framework 4.6.2, so I downloaded and installed it.
The second time it failed because a Microsoft Azure Service Fabric MSI was installed. This error came up because I had previously installed MicrosoftAzure-ServiceFabric-CoreSDK.exe. I went to Programs and Features and uninstalled Microsoft Azure Service Fabric (I left the Microsoft Azure Service Fabric SDK installed).
I ran the script one last time, fingers crossed, it finally worked.
It is an unsecure cluster, so I was able to simply connect to it using Connect-ServiceFabricCluster "192.168.1.102:19000". If you want to enable other authentication mechanisms, modify and use some of the other .json sample configurations.

Relative path of file in jasperserver

In jasperStudio we are passing the absolute path of the file in the following manner:
<parameter name="Parameter1" class="java.lang.String">
<defaultValueExpression><![CDATA["C:\\Users\\ABC\\Desktop\\dynamicSubreport\\ABC.xml"]]></defaultValueExpression>
</parameter>
Here in jasperstudio it’s working fine.
While in jasperserver we need to pass the relative path instead absolute. In jasperserver we have added these xml template under Resources and tried calling the same in following way
<parameter name="Parameter1" class="java.lang.String">
<defaultValueExpression><![CDATA["repo:ABC.xml"]]></defaultValueExpression>
</parameter>
We also uploaded these files under reports folder in jasperserver and tried calling in the following way:
<parameter name="Parameter1" class="java.lang.String">
<defaultValueExpression><![CDATA["repo:reports/ABC.xml"]]></defaultValueExpression>
</parameter>
None of the above ways worked out in jasperserver. So any suggestions or feedback on the above scenario would be very helpful.

OrientDB Embedded and Distributed error: Distributed Storage was not installed

Hello thank you for reading this question. I have orient db set up and would like to add a second server and have them replicate between each other. When one goes on its own it runs fine and I have been using it for months. When enabling the hazelcast plugin, the servers start communicating, and I can see they start to talk to each other. An error happens when they try to write to each other though. This is the same issue discussed here:
https://groups.google.com/forum/#!topic/orient-database/QpZPG4y_KpU
For what its worth, I have both of these servers deployed on the same machine, each with their own embedded database. The database paths are plocal:/home/chris/dbs/db2 and plocal:/home/chris/dbs/db1
2015-10-08 08:56:14:048 INFO [db2-orient] Saving distributed configuration file for database 'db' to: ./databases/db/distributed-config.json [OHazelcastPlugin]
2015-10-08 08:56:14:049 INFO [db2-orient] received new status idp2-orient.idp=SYNCHRONIZING [OHazelcastPlugin]
2015-10-08 08:56:18:054 WARNING [db2-orient]->[[db1-orient]] requesting deploy of database 'db' on local server... [OHazelcastPlugin]
Then on the other server, the one that started first, I see
[OHazelcastPlugin]{db=db} [db1-orient]<-[db2-orient] error on executing distributed request 0: deploy_db
com.orientechnologies.orient.server.distributed.ODistributedException: Distributed storage was not installed for database 'db'. Implementation found: com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.executeOnLocalNode(OHazelcastPlugin.java:745)
at com.orientechnologies.orient.server.hazelcast.ODistributedWorker.onMessage(ODistributedWorker.java:298)
at com.orientechnologies.orient.server.hazelcast.ODistributedWorker.run(ODistributedWorker.java:121)
I put a breakpoint on the line that throws that exception, and the storage type present at that time is indeed OLocalPaginatedStorage. My orientDB version is 2.0.15.
My distributed config. (Same on both servers)
{
"autoDeploy": true,
"hotAlignment": false,
"executionMode": "undefined",
"readQuorum": 1,
"writeQuorum": 2,
"failureAvailableNodesLessQuorum": false,
"readYourWrites": true,
"clusters": {
"internal": {
},
"index": {
},
"*": {
"servers" : [ "<NEW_NODE>" ]
}
}
}
This is how I start my server. It is embedded, and started via a java application.
OServer server = OServerMain.create(true);
OPartitionedDatabasePool pool = server.startup(config.toString()).activate().getDatabasePoolFactory().get(dbPath, OUser.ADMIN, OUser.ADMIN);
The config the server uses to start up is this
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<orient-server>
<handlers>
<handler class="com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin">
<parameters>
<parameter name="nodeName" value="db2-orient" />
<parameter name="enabled" value="true" />
<parameter name="configuration.db.default" value="${orientDBConfigs}/orientdb-default-distributed-db-config.json" />
<parameter name="configuration.hazelcast" value="${orientDBConfigs}/orientdb-hazelcast.xml" />
<parameter name="conflict.resolver.impl" value="com.orientechnologies.orient.server.distributed.conflict.ODefaultReplicationConflictResolver" />
<parameter name="sharding.strategy.round-robin" value="com.orientechnologies.orient.server.hazelcast.sharding.strategy.ORoundRobinPartitioninStrategy" />
</parameters>
</handler>
<handler class="com.orientechnologies.orient.server.handler.OAutomaticBackup">
<parameters>
<parameter name="enabled" value="false" />
<parameter name="delay" value="4h" />
<parameter name="target.directory" value="backup" />
<parameter name="target.fileName" value="${DBNAME}-${DATE:yyyyMMddHHmmss}.json" />
<parameter name="db.include" value="" />
<parameter name="db.exclude" value="" />
</parameters>
</handler>
<handler class="com.orientechnologies.orient.server.plugin.mail.OMailPlugin">
<parameters>
<parameter name="enabled" value="false" />
<parameter name="profile.default.mail.smtp.host" value="localhost" />
<parameter name="profile.default.mail.smtp.port" value="25" />
<parameter name="profile.default.mail.smtp.auth" value="true" />
<parameter name="profile.default.mail.smtp.starttls.enable" value="true" />
<parameter name="profile.default.mail.smtp.user" value="" />
<parameter name="profile.default.mail.smtp.password" value="" />
<parameter name="profile.default.mail.date.format" value="yyyy-MM-dd HH:mm:ss" />
</parameters>
</handler>
<handler class="com.orientechnologies.orient.server.handler.OServerSideScriptInterpreter">
<parameters>
<parameter name="enabled" value="false" />
</parameters>
</handler>
</handlers>
<network>
<protocols>
<protocol name="binary" implementation="com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary" />
</protocols>
<listeners>
<listener protocol="binary" ip-address="0.0.0.0" port-range="2424-2430" />
</listeners>
<cluster>
</cluster>
</network>
<storages>
<storage name="${dbName}" path="${dbPath}" loaded-at-startup="true" />
</storages>
<users>
<user name="root" password="root" resources="*"/>
</users>
<properties>
<entry name="db.pool.min" value="1" />
<entry name="db.pool.max" value="20" />
<entry name="cache.level1.enabled" value="false" />
<entry name="cache.level1.size" value="1000" />
<entry name="cache.level2.enabled" value="true" />
<entry name="cache.level2.size" value="1000" />
<entry name="profiler.enabled" value="true" />
<entry name="log.console.level" value="info" />
<entry name="log.file.level" value="fine" />
<entry name="plugin.dynamic" value="false"/>
</properties>
Thanks again.
as wolf4ood pointed out, the storage type is replaced by the hazelcast plugin in the hazelcast plugin's onOpen method. Paginated storage gets switched to Distributed. This replacement does not happen if the path doesnt start with "plocal:./databases". Solution: make the path start with that. I have no idea if this is a good idea or not. That check seems to be in there for a reason, the comments in the code seem to indicate something about running on the same jvm.