Where does Neo4J writes configuration with 'dump_configuration=true'? - neo4j

I've added dump_configuration=true to my neo4j.properties file but couldn't find the effective configuration written anywhere.
The terminal where I run bin/neo4j start from is empty and the data/log/console.log file shows that the web interface is ready but no additional prints.
Does anyone know where is it written to?

According source code of Neo4j it should be printed to stdout.
https://github.com/neo4j/neo4j/blob/4540b18f95e7eddd1cbc36c990c852962175755a/community/kernel/src/main/java/org/neo4j/unsafe/batchinsert/BatchInserterImpl.java#L1135

Related

How do I add logs to MongooseIM logs?

I am trying to modify some APIs in MongooseIM and I want to see some logs. I tried adding lager-logging using MongooseIM, but the APIs stopped working after that.
If you have source code, you can add debug statement into it and compile it to beam file then replace the old file. The debug statement is to write some log into log file. I have used this method solving the problem in rabbitmq before.

Log org.springframework

I have a non-Spring appliation. However, we are pulling in spring-security-config and spring-security-web. We use Log4j and have a log4j.properties file.
We want to log all the output from 'org.springframework' with the 'trace' log level.
We do not have an application.properties file, but can create one if we need one.
So, when I run my non-Spring app, all my code logs properyly, but I am not seeing anything from org.springframework in my logs.
Since Spring Security pulls in Spring Core, we created an application.properties on the classpath. We then setup a logging.file property to our log file. Then we setup some other logging property files to see if that would help. We also set debug=true as well.
So, I'll keep trying ....
Thanks in advance!
So, I found the problem. The logs were going to another log file in a different directory. I believe this is because it was a container log and not an application log.
Hope this helps someone else out.

neo4j-APOC plugin stopped working

Plugin APOC was working for me for a long time which means I have it copied at right place and I have edited config file correctly. But today I needed to create same graph on different data set so I stopped neo4j service, removed database directy, restarted it, changed password then copied plugins directory in neo4j directory(as I'm not using shell) and again restarted neo4j serivice. Then tried to execute the same query again and got error messgae.
There is no procedure with the name apoc.create.relationship registered for this database instance. and the query I'm using is as following
CALL apoc.create.relationship(n, network.connection, {}, m) yield rel
I have made following change based on a stackoverflow post,
uncommented following line
#dbms.directories.plugins=plugins
and added plugin directory path, restarted service even restarted system but still not working. I have done this(removing neo4j directory...) in past multiple times but this has never happened to me. Even I have tried replacing old apoc.jar with newly downloaded one before. I have neo4j3.3.0 with apoc3.3.0.1jar with windows10. Can anybody tell me what have I done wrong this time? Thanks in advance.
EDIT 1: when I uncomment above line in config file my other plugins also stop working but after commenting it other plugins like graph algorithms are working but not APOC
Since you are using APOC procedures and graph algorithms, I think you have configured your config file this way:
dbms.security.procedures.unrestricted=algo.*
dbms.security.procedures.unrestricted=apoc.*
If it is the case, change these lines to:
dbms.security.procedures.unrestricted=algo.*,apoc.*
I really don't know what the problem was, I uninstalled it with logs and config files, downloaded latest version which didn't pose any headaches of editing config file for csv files and for plugins and it worked.
If someone is reading this question and has done everything correctly. Set the correct permissions on the plugins directory, uncommented the whitelisted and unrestricted sections of the /etc/neo4j.conf, checked if the version of the Apoc jar you're loading is the same version as neo4j, etc. and can't make it work.
Try to restart your PC, that was what did it for me, for some weird reason.

Calling Excel from a Child Powershell script...losing context/session

Ok due to requirements I have a main powershell that calls child powershell scripts using the & command. In two of my child powershell scripts I use Excel object to either read an excel file and/or create an excel file. If I run these files locally run great no problems. If I run them through a scheduler (in this case Tidal Scheduling Tool) I have issues.
Issue 1:
The first child script reads an excel file to get the names of the worksheets then uses the worksheet name to query the excel file using OleDB. The query function is in a utilities module and gives an error that it can not find the file or it is locked by another process. I've killed the excel process and still wasn't allowing me to query from the file. As a test I commented out the portion of the script that reads the file and hard coded the worksheet name and works fine so somehow the child script is not able to release the handle on the COM object/file.
Issue 2:
From a second child script I create an excel spreadsheet. I'm creating a csv file which I then save as xls file. Again works fine when running locally but when I run through scheduler I get an error when attempting to run the following line: [void]$worksheet.QueryTables.item($connector.name).Refresh and the error that I get is:
Exception calling "Refresh" with "0" argument(s): "Excel cannot find the text f
ile to refresh this external data range.
Check to make sure the text file has not been moved or renamed, then try the re
fresh again."
Again I'm calling these children scripts using the & command (i.e. & \scriptpath\script.ps1)
Anyone seen this before and know how I can make this work?
Thanks!
I have resolved this issue. Looks like Tidal scheduler has Agents and some of the agents setup at my client will run my scripts with no problems while others will not create files or lock files with no real errors given. Anyway, sorry I don't have more than that but powershell is working fine. :)

Extract information from a log file using powershell

Hi I am new to the language of powershell s i though about playing around with it. I am trying to extract information out of a log file (the file belongs to a program called event viewer). I need to use the information under Boot Duration.
Could somebody guide me a little bit?
It will be greatly appreciated
Thanks.
Logs are always the same. Not sure if you are going to monitor boot log of windows or linux or what.. but will try to answer.
If you edit your question and add info on the operating system and an example of relevant lines of boot log file I can provide you with some powershell code.
In general you should do:
Identify how to manually see boot time in log file. For example
probably it will have a starting boot time and a finished boot time.
Something similar to this.
[2012-06-08 12:00:04] starting boot
lot of log entries
[2012-06-08 12:00:34] finished boot
Once you know how to do it manually, you have to convince powershell to do it for you. You can use regular expressions to look for the pattern of dates. In my example look for lines that contains "starting boot" and then parse it to load date.
Here you have an useful link on powershell and regular expressions: http://www.regular-expressions.info/powershell.html

Resources