Neo4j browser.post_connect_cmd does not work - neo4j

I run neo4j Version: 3.3.2 in a docker container and tried to configure a default style as described above.
Grass file is accessible via HTTP (http://somedomain.com/resources/style.grass)
CORS rules are set
Command added to config: browser.post_connect_cmd=style http://somedomain.com/resources/style.grass
When i start my container with this config and run match (n) return n i see nothing.
Then i run :style http://somedomain.com/resources/style.grass and it works... Why?
That leads me to conclude that the grass file ifself (content) and the accessible of this file are not the problem.
It seems that there is an error with the default style configuration.
Do you have any tips to debug this? The logs are clean.

I found the problem. We added this property at the end of the neo4j.conf. After startup neo4j reorder the properties, put it at the 2nd place and accidentally add the 3rd property at the end of the 2nd, so that it’s not valid. We put it manually at the 2nd place and now it works.

Related

Cannot alias database connection string in conf/neo4j.conf when using apoc.load.jdbc()

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

How I can import db(archive) neo4j

I have archive(tar.gz) which was dumped from production neo4j server. Now I want to get this db locally in my computer. I did it in several steps:
I was maked this command: neo4j-admin load --from=<archive-path> --database=<database> [--force](I did it correct, set path to my archive and gave name for database)
2.When I maked previous command then folder in data/databases appeared, that's cool, I thought
Next I was change active db I changed this value:
dbms.active_database=graph.db.test
And when all must work I typed "./neo4j console" it started in localhost:7474 I see that db is my,for example "test" db but all was empty. No node labels, no relations and when I used simple command "MATCH(n) RETURN n" there are no records. But I totally sure that it's must to be not empty.
Question:
What I did incorrect and what I need to do to make it works?
I believe that you are having problems with the param database and the value of dbms.active_database property.
Try using the same value for both:
bin/neo4j-admin load --from=/backups/graph.db/2016-10-02.dump --database=graph.test.db --force
and
dbms.active_database=graph.test.db
after it, restart Neo4j.
You may try refreshing and re-entering your credentials. Also, it may be the case that your file might not be unzipped properly.

Problems with Dockerbeats dashboard containerName field

I have dockerbeats set up on a local cluster that is running ELK stack and some other misc. dockers (all containers controlled via kubernetes). I set up the dashboard from Ingensi (Ingensi dockerbeat Dashboard) for kibana and ran into an issue with the containerNames field while setting up the graphs. Now, for context, my docker containers have names like these:
k8s_dockerbeats.79c42f90_dockerbeats-796n9_default_472faa11-1b3a-11e6-8bf4-28924a2bffbf_2832ea88
(as well as supporting containers for kubernetes with similar container names) [2]: http://i.stack.imgur.com/hvIUG.png
k8s_POD.6d00e006_dockerbeats-796n9_default_472faa11-1b3a-11e6-8bf4-28924a2bffbf_3ddcfe44
When I set up the dashboard in kibana I get an issue where I get multiple containerNames from the same container. For example instead of a single containerName output I get the containerName split up into smaller segments:
k8s_dockerbeats
79c42f90_dockerbeats
796n9
28924a2bffbf_3ddcfe44
and so on...
I assume that the format of the container name is confusing the dashboard (maybe in the way that it parses the name information) and I could probably go around renaming every container to a more sensible name.
But before I do that, is there a way to configure the dashboard in such a way that I read in the entire container name string so that it does not break up like it does in the first image? (assuming I'll have to dig into the .json files from the repository mentioned above)
Thanks in advance if anyone answers this.
It sounds like the container name is being analyzed by Elasticsearch. You need to make sure that the container name field is marked as not_analyzed in the Elasticsearch index template. You can do this by installing the index template provided by Dockerbeat.
Marking the field as not_analyzed ensures that the data is not tokenized and it gets indexed as is. It will only be searchable by specifying the exact string.
You will need to delete your current indexes after installing the new index template in order to change the mappings.
Install the provided index template:
curl -XPUT 'http://elasticsearch:9200/_template/dockerbeat' -d#dockerbeat.template.json
Delete your the existing indexes:
curl -XDELETE 'http://elasticsearch:9200/dockerbeat-*'
You can view your current mappings by querying Elasticearch:
curl http://elasticsearch:9200/dockerbeat-*/_mapping

Error running command oninit -i for Informix on Ubuntu Server

When I call oninit -i command in an Ubuntu server terminal, it shows an error like this:
INFORMIXSERVER does not match DBSERVERNAME or any of the DBSERVERALIASES.FAILED
Can anyone give me a solution for this problem?
What is the setting of $INFORMIXSERVER in your environment, and what values are set for DBSERVERNAME and DBSERVERALIASES in the $ONCONFIG file? It seems that you've set $INFORMIXSERVER to a value that isn't present in the $ONCONFIG file that is in use. Maybe you didn't set $ONCONFIG at all, or maybe you set $INFORMIXSERVER incorrectly, or maybe the names in the $ONCONFIG file are incorrect.
If you don't set $ONCONFIG, it defaults to onconfig (and maybe even falls back to onconfig.std). But you should normally set $ONCONFIG to a known value. I usually use onconfig.<servername> where the <servername> is the value of DBSERVERNAME in the file. However, nothing enforces that convention.
http://www.ibm.com/developerworks/data/library/techarticle/dm-0606bombardier/ is a good tutorial for setting up informix DB, I came up with same issue since my rootdbs file was owned by 'root', not by 'informix', make sure all file that are mentioned in the above tutorial to be owned by user 'informix' are correctly owned.

How do I fix 'Setup project with custom action file not found' exception?

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])

Resources