I need to put a new ES index in place to switch over to at some point in the future. I've been using aliases to do this, by having my app reference an alias, and using the HTTP API to point the alias at either the existing or new index as needed. Unfortunately, when the app gets re-started it complains that the index already exists as an alias. See stacktrace:
org.elasticsearch.indices.InvalidIndexNameException: [redacted] Invalid index name [redacted], already exists as alias
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:174)
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:510)
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$100(MetaDataCreateIndexService.java:86)
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:209)
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:328)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153)
Anyone got any idea why this is happening and how I can prevent it?
This appears to have been fixed, coincidentally, by the release of v0.0.4.0 the plugin today
https://noamt.github.io/elasticsearch-grails-plugin/guide/single.html#history
Related
After upgrading to Vaadin 23.0.x (from former 22.0.2) I now keep getting the following error when opening a certain dialog:
2022-08-01 18:56:25,977 ERROR [http-nio-8085-exec-5] net.mmo.utils.kism.ui.views.nodes.NodeView: java.lang.IllegalStateException: All bindings created with forField must be completed before calling readBean
at com.vaadin.flow.data.binder.Binder.checkBindingsCompleted(Binder.java:3070)
at com.vaadin.flow.data.binder.Binder.readBean(Binder.java:2110)
at net.mmo.utils.kism.ui.views.nodes.NodeForm.readBean(NodeForm.java:487)
at net.mmo.utils.kism.ui.views.nodes.NodeForm.setNode(NodeForm.java:211)
This dialog has worked perfectly fine since I wrote it (using version 18.0.x about 2 years ago) and up to v22.0.2. I can't make sense of that error message and I don't understand what the issue could be here. I verified that issue going back and forth and the difference is really only the Vaadin version upgrade. Before it, the dialog works just fine and after it I get the above Exception when opening it.
I also can't quite believe what I think the message is stating here: if it would indeed check that I define or complete any bindings AFTER calling Binder.readBean() - how could it know that already in that very moment, i.e. when the code calls readBean() - as indicated by the stacktrace?
If there would indeed be any bindings being defined afterwards, IMHO it could only find that out AFTER said readBean()-call, i.e. when any additional bindings were actually defined, couldn't it?
So, could someone please try to "translate" or explain that issue or the background behind it to me?
The error basically states the problem: in the process of binding a field to a property (or getter/setter in general), the finishing step of actually binding was not undertaken. So the process was started with .forField() but never finished by .bind().
Since the error message as of now only states the fact, but not the culprit, a developer would be in need of a debugger to inspect the private state of the Binder, where the map incompleteBindings holds the current state of the Binder. The content of this map may help to find the culprit, e.g. by only holding one entry and by inspecting the flow of the program so far, that would conclude, what binding attempt failed. Or e.g. via the included field types.
Other than plain "bugs" by the developer, there are some potential reasons, why this suddenly happens by like an update or what places to look for:
multiple (re-)binding was recently added (e.g. to first bind "automatically" and then hand-tune the result); this holds potential, that older versions of the code just kept the initial binding and ignored the dangling second process.
the binding process uses a builder pattern; builder must build up on the result of the previous steps. This means, that in imperative code, there is the chance, that this chained call miss reassigning the build step. E.g.
var b = binder.forField(field)
if (predicate)
b.asRequired() // XXX: should be `b = b.asRequired()`
b.bind(...)
(this may or may not be a source for this kind of problem, but it's good to point out here, since the binder builder implementation actually switche(s|d) the builder (in the past)
I have neo4j installed using docker-compose and successfully enabled apoc plug-in.
I'm able to use call
apoc.load.jdbc("hard-coded-db-connection-string", "my-table")
to retrieve data from my database which is good.
Of course, this is not convenient, so I tried to alias the connection string by adding below to the conf/neo4j.conf.
apoc.jdbc.mydb.url=jdbc:postgresql://"hard-coded-db-connection-string
and then restarted the container. However i can't call the apoc using the alias and I see a message in the log:
Unrecognized setting. No declared setting with name: apoc.jdbc.mydb.url
I also tried to run below to check the settings in the conf/neo4j.conf file, but the results don't show the alias line i just added.
CALL dbms.listConfig()
YIELD name, value
WHERE name STARTS WITH 'apoc.'
RETURN name, value
ORDER BY name
;
Wondering can someone help me troubleshooting this? Is this because I was working on the wrong conf file? Thx!
Please try to use an apoc.conf file instead.
Since 4.x neo4j got more restrictive with variable settings In neo4j.conf
I am instantiating PackageIdentifier class to pass it to DataFlowTemplate.streamOperations().updateStream(..) method, I set properties repositoryName and packageName, but I want to know if packageVersion is required property? Because I can see that it works without it.
It is just, I had an exception, but not able to reproduce it again, and was wondering if packageVersion is the cause of this problem?:
Caused by: org.springframework.cloud.dataflow.rest.client.DataFlowClientException: Can not find package 'input-to-event-message-channel', version 'null'
at org.springframework.cloud.dataflow.rest.client.VndErrorResponseErrorHandler.handleError(VndErrorResponseErrorHandler.java:65) ~[spring-cloud-dataflow-rest-client-2.0.2.RELEASE.jar:2.0.2.RELEASE]
The packageVersion is not required as far as there is a package with the desired name (in this case the "stream name") that exists in Skipper database.
See: Stream.java#L112-L114.
As for the error, it could be that you were using H2 instead of a persistent database for Skipper, and upon a restart, perhaps your client/test continued to attempt an upgrade on the transient database that doesn't have any footprint anymore.
I am trying to setup Usergrid 2.1.0. I downloaded binaries and trying to setup with tomcat, cassandra and elasticsearch. I am following this. i created 'usergrid-default.properties' and saved in my 'tomcat_home/lib' folder. when i going to start the server, it is throwing the exception
1) Error injecting constructor, java.lang.IllegalArgumentException: usergrid.cluster_name property must be set.
at org.apache.usergrid.persistence.core.guice.SettingsValidationCluster.<init>(SettingsValidationCluster.java:17)
at org.apache.usergrid.persistence.core.guice.CommonModule.configure(CommonModule.java:98) (via modules: org.apache.usergrid.corepersistence.CoreModule -> org.apache.usergrid.persistence.core.guice.CommonModule)
while locating org.apache.usergrid.persistence.core.guice.SettingsValidationCluster
i have added a property 'usergrid.cluster_name' but it is still not working. can some one help me?
Resolve this issue. as i had properties file 'usergrid-default'. It should be 'usergrid-deployment'. I renamed and things are working.
I am trying to create a setup project for a Windows Service. I've followed the directions at http://support.microsoft.com/kb/816169 to create the setup project with no trouble.
I want to be able to get a value during the installation in order to update the app.config with the user's desired settings. I added a Textboxes (A) dialog to retrieve the values. I set the Edit1Property property to "TIMETORUN", and in my Primary Output action's CustomActionData property I put in the following: /TimeToRun="[TIMETORUN]\". So far so good. Running the setup I can retrieve the TimeToRun value from the Context.Parameters collection without issue.
In order to locate the app.config I need to also pass in the value of the TARGETDIR Windows Installer Property to my custom action. This is where things begin to fall apart. In order to achieve this, the above CustomActionData must be altered like so: /TimeToRun="[TIMETORUN]\" /TargetDir="[TARGETDIR]\". Now when I run the setup I get the following error message:
Error 1001. Exception occurred while initializing the installation.
System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Windows\SysWOW64\Files' or one of its dependencies. The system cannot
find the file specified.
If you google this problem you will inevitably find people having tremendous success by simply adding the trailing slash to the /TargetDir="[TARGETDIR]\" portion of the CustomActionData. This unfortunately does not solve my issue.
I tried so many different variations of the CustomActionData string and none of them worked. I tried logging to a file from my overridden Install method to determine where the breakage was, but no log file is created because it's not even getting that far. As the error indicates, the failure is during the Initialization step.
I have a hunch that it could be one of the dependencies that the setup project is trying to load. Perhaps somehow something is being appended to the CustomActionData string and isn't playing well with the TARGETDIR value (which contains spaces, i.e. "C:\Program Files\My Company\Project Name"). Again, this is another hunch that I cannot seem to confirm due to my inability to debug the setup process.
One further thing to mention, and yes it's another hunch, could this be an issue with Setup Projects on 64-bit version of Windows? I'm running Windows 7 Professional.
I'll provide names of the dependencies in case it helps:
Microsoft .NET Framework
Microsoft.SqlServer.DtsMsg.dll
Microsoft.SqlServer.DTSPipelineWrap.dll
Microsoft.SqlServer.DTSRuntimeWrap.dll
Microsoft.SQLServer.ManagedDTS.dll
Microsoft.SqlServer.msxml6_interop.dll
Microsoft.SqlServer.PipelineHost.dll
Microsoft.SqlServer.SqlTDiagM.dll
As you may glean from the dependencies, the Windows Service is scheduling a call to a DTSX package.
Sorry for the long rant. Thanks for any help you can provide.
The answer is so maddeningly simple. If the last argument in the CustomActionData is going to contain spaces and thus you have to surround it with quotes and a trailing slash, you must also have a space following the trailing slash, like this:
/TimeToRun="[TIMETORUN]\" /TargetDir="[TARGETDIR]\ "
The solution and explanation can be found here.
Had a similar issue. In my case, it was odd because my installer had ran successfully once, then I uninstalled my app via Add/Remove Programs successfully, did some coding (did NOT touch my CustomActionData string), and rebuilt my project and setup project. It was when I re-ran my MSI that I got this error.
The coding I had done was to bring in more values of more parameters I had been specifying in my CustomActionData string. That syntax for getting the parameter values (i.e. string filepath = Context.Paramenters["filepath"]), which was in my Installer class, was actually fine, but as I found out, the syntax of the later parameters I was now trying to get from my CustomActionData string had not been correct, from the very beginning. I had failed to add a second quote around one of those parameters, so nothing else could be obtained.
I was using the "Textboxes (A)" and "Textboxes (B)" windows in the User Interface section. A has 1 box, EDITA1, where I get the path to a file, and B has 2 boxes, EDITB1 and EDITB2, for some database parameters. My CustomActionData string looked like this:
/filepath="[EDITA1]" /host="[EDITB1] /port="[EDITB2]"
It should have been:
/filepath="[EDITA1]" /host="[EDITB1]" /port="[EDITB2]"
(closing quote on [EDITB1])