How to make changes of neo4j.conf take effect? - neo4j

$ neo4j version
neo4j 3.3.4
Host machine
https://neo4j.com/developer/neo4j-cloud-google-image/
Data Import
neo4j-admin import --database=actors.db --nodes movies.csv --nodes actors.csv --relationships roles.csv
after I changes to neo4j.conf as follows:
#dbms.active_database=graph.db
# changed into
dbms.active_database=actors.db
The server still points to graph.db.
I tried to restart the neo4j service to see if it will help
$ sudo service neo4j restart
However, neo4j.conf gets fully reset, and it is reverted back to
#dbms.active_database=graph.db
what is the proper step by step solution to change neo4j.conf?

Can't comment because I don't have enough reputation points... but did you ever figure this out? I've been running into the same issue.
I overwrite the neo4j.conf file, but everytime I restart the service with:
$ sudo service neo4j restart
The neo4j.conf file goes back to how it was
Update: I was able to figure this out. Chances are you have a neo4j.template file which is used to create the neo4j.conf file each time the database is reset. If you edit that, you should be good to go.

I also ran into same issue. When I dig more I found the answer. It is happening when I am trying to runNeo4J server on aws ec2 instance using custom community ami provided by Neo4j. There is a script having name pre-neo4j.sh which is configured to run on every restart of Neo4j service. Inside that script, it is replacing neo4j.conf on every restart of service with some configured template to preserve public-ip or anything like that.

Related

uninstall and reinstall neo4j

On ubuntu 16.04, when trying to uninstall neo4j I typed:
sudo apt-get purge neo4j*
However, the neo4j folder and all of the data still exist in
/var/lib/neo4j
Secondly, I tried to just install the newest version using:
sudo apt-get install neo4j
and when I checked the version from the commandline I got:
neo4j 3.3.4
This is what I want, but when I start the service and check the version in the web application (http://localhost:7474/browser/), it says that the neo4j version is still 3.1.4.
So, basically I would like to completely remove neo4j, and download the newest version. What is the recommended way of doing this in ubuntu 16.04.
I'm new to neo4j, so I'm sure I'm missing something. Thanks for your help.
I followed the instructions here and they really helped.
Specifically, I deleted my old neo4j folder located in /var/lib/, and in it's place, I put the new version (which was downloaded from the link above and the top folder was renamed "neo4j"). I'm rebuilding my database from scratch, so I wasn't concerned about keeping any of the data I had previously (although maybe you could just copy it over to the new neo4j folder, I don't know).
I started the neo4j service by typing
/var/lib/neo4j/bin/neo4j start
and everything was brand new and seemed to be working. Part of the reason I did a fresh install was because I could not understand how to upgrade based on the documentation. I'll have to look into that more.
I also added the jar file for the corresponding apoc procedures to my plugins folder (/var/lib/neo4j/plugins), and adjusted the neo4j conf file (var/lib/neo4j/conf/neo4j.conf) accordingly:
dbms.security.procedures.unrestricted=apoc.*
and apoc procedures are now being recognized, which is fantastic.
Perhaps there is a better way to have done this, but things seem to be working so far. My database is small right now, so I can build it from scratch easily. Let me know if there is a better way to go about it.
well, I have tried the method above and it did not work. Since the main purpose is to use the verison 4.x.x of neo4j, I tried anothor way to reach the same effect.
At first, download the neo4j-community-4.x.x and put it in someplace where you want, then open the config/neo4j.conf file and change some configuration as follows:
dbms.connector.bolt.listen_address=:7688
dbms.connector.http.listen_address=:7475
After that, start the neo4j by running neo4j start and you shall access the neo4j from browser at localhost:7475, it did work for me. As for the old version, just let it go.

Start neo4j server with other configuration file

I try to start neo4j on OSX and change the chosen configuration file. I'd like to start a test server for unit tests with a different port and a database, which shall be deleted while startup (I will solve the deletion part in a shell script, which should stop and start the server).
My problem is neo4j ignores the configuration file from the parameter. My call looks like this (from the terminal and the current folder is bin:
./neo4j start -server -Dorg.neo4j.server.properties=conf/neo4j-server-test.properties
The default configuration file is still chosen.
Thanks for your help
There are no 'ad hoc' arguments to the neo4j command script, so your arguments after start are ignored. You need to either make a modified version of the neo4j command script, or swap out neo4j-server.properties files.
You can use ineo to manage two or more Neo4j instances:
https://github.com/cohesivestack/ineo
You can specify the path to a folder containing a customized configuration file with an environment variable:
NEO4J_CONF=../conf neo4j start

Jenkins job lost upon restart even though configuration is on the disk

I have restarted Jenkins using the following:
service jenkins stop
service jenkins start
Followed to that I can see some jobs are missing from the GUI.
I have also tried to go the job URL using http://<jenkins_url>/job/<JOBNAME>/
Unfortunately it is also giving:
HTTP ERROR 404
Problem accessing /job/<JOBNAME>/. Reason:
Not Found
Powered by Jetty://
Also performed Doing a Reload Configuration from Disk with no luck.
I checked the config.xml file and I can see it is corrupted. The size of config.xml file is around 110 MB. Why this file got corrupted? How to trace it.
Can anyone give me any pointer how to troubleshoot this problem?
I had the same symptoms, but I'm using a homebrew installation of Jenkins.
The Jenkins machine was shut down improperly, likely from a power outage, so when it came back up it was basically a clean instance. No jobs and no system configurations.
The following solution isn't for your exact use case, but it does solve the problem for some users who return to Jenkins to find it without any jobs.
The solution basically involves you checking to see if you have started the Jenkins service incorrectly or from the wrong place.
...
On to the specific homebrew issue:
For whatever reason, the homebrew.mxcl.jenkins.plist file was found in ~/Library/LaunchDaemons/
It belongs in ~/Library/LaunchAgents/ only.
If this happens, it can be solved as follows
Stop the service:
sudo launchctl unload ~/Library/LaunchDaemons/homebrew.mxcl.jenkins.plist
Reload the correct file, located in ~/Library/LaunchAgents/ by trying the following line in case it's running:
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist
Note: the above line may yell at you if it's not running, which is ok.
Start it up again:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist
If all looks good when Jenkins loads again, you can and should
delete homebrew.mxcl.jenkins.plist in ~/Library/LaunchDaemons/:
sudo rm ~/Library/LaunchDaemons/homebrew.mxcl.jenkins.plist

Neo4j StartService FAILED 1053 after copying Beer DB example

I installed Neo4j as instructed in the site and was able to install and stat server. However I tried to copy the Beer example DB by stopping the server and deleting the current graph.db in the \data folder and replaced with the one Beer example downloaded from online (graph.db folder). This is the only step I did.
Now the issue is, when i tried to start the Server I get "StartService FAILED 1053"
I am using following command on the powershell in windows - c:\neo4j-community-2.0.0-M03> .\bat\Neo4j.bat start
Can someone please help if I have done anything wrong here.
Thank you!
You are running neo4j 2.0 against an older database file. You'll need to set the config parameter to allow the store to be upgraded before starting. See instructions here:
http://docs.neo4j.org/chunked/milestone/deployment-upgrading.html#_explicit_upgrade

could not start the sphinx search service on local computer?

i am getting this
Windows could not start the SphinxSearch service on Local Computer.
Error 1067: The process terminated unexpectedly.
i got installation instruction from this .
http://blog.robbsnet.com/2011/07/how-to-install-and-implement-sphinx.html
build process is complete but when i start the sphinx search service i got errors .
Try running searchd manually from Command Prompt. Maybe it will give you a useful error message.
Try also looking in searchd.log
For anyone who is still having problems with the Windows service:
Make sure your configuration is correct for both database and paths and the needed folders & files are created.
Make sure that the service "command" matches the correct paths and files, to do so you have to:
Run administrative tools, click on local services, then find SphinxSearch. Click on its properties and read the line the service is trying to execute. If the configuration path doesn't match the service start command, it will fail to start.
FYI, this can also happen because your search data files are corrupt. Easy fix for that is to nuke the files and refill them.

Resources