Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to restart/stop arangodb server on mac osx

Tags:

arangodb

I'm following the first section of the documentation for arangodb 2.7.3. I've made it as far as

brew install
/usr/local/sbin/arangod &

The very next section after install on basic cluster setup is written for folks using linux. It asks you to modify the configuration file, which I've done, followed by restarting arango via /etc/init.d/arangodb What is the correct way to restart the arango daemon on mac osx?

like image 475
ThinkingInBits Avatar asked Jan 02 '16 17:01

ThinkingInBits


Video Answer


3 Answers

I know there is accepted answer, but documentation for using homebrew was updated and right now it is quite a bit easier:

Start service

sudo brew services start arangodb

Stop service

sudo brew services stop arangodb

Restart service

sudo brew services restart arangodb

Configuration file is located at

/usr/local/etc/arangodb3/arangod.conf

It is a lot easier to edit it vs changing settings in plist file located in the arangodb installation.

like image 135
vittore Avatar answered Oct 24 '22 01:10

vittore


You should use the regular homebrew way to start/stop services which also works for ArangoDB.

Quoting brew install arangodb:

To have launchd start arangodb at login:

ln -sfv /usr/local/opt/arangodb/*.plist ~/Library/LaunchAgents

Then to load arangodb now:

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.arangodb.plist

Or, if you don't want/need launchctl, you can just run:

/usr/local/opt/arangodb/sbin/arangod --log.file -

You should refrain from killing services (be it ArangoDB or anything else) with -9 unless its really neccessary - no clean shut down will be possible, and you may loose data integrity. Killing without a specified signal will default to signal 15 (SIGTERM) which will command the service to shut itself down.

like image 29
dothebart Avatar answered Oct 24 '22 01:10

dothebart


I'm going with:

jobs -l

to get the pid of the process. Followed by:

kill -9 <pid>

to kill the process. Followed by:

/usr/local/sbin/arangod &

to start the process once again.

like image 2
ThinkingInBits Avatar answered Oct 24 '22 00:10

ThinkingInBits