ArangoDB在macOS修改配置后端点未变更问题求助
I’ve run into this exact quirk with Brew’s ArangoDB install before—since Brew dropped support for symlinking certain components, the default config loading behavior can get a bit wonky. Let’s walk through how to get your configuration changes to stick:
Verify which config files are actually being used
ArangoDB’s binaries (likearangodandarangosh) don’t always pick up the/usr/local/etc/arangodb3/files by default if the Brew install structure differs. To check, run:arangod --dump-config | grep "endpoint" arangosh --dump-config | grep "server.endpoint"This will show you the currently active endpoints. If they don’t match what you set in your config files, the binaries are reading from a different path. You can also check the default config paths with
arangod --help—look for lines starting with--configuration.Explicitly specify the config file when launching
If the default path is wrong, you can force the binaries to use your modified configs by passing the--configurationflag:# For the server arangod --configuration /usr/local/etc/arangodb3/arangod.conf # For the shell arangosh --configuration /usr/local/etc/arangodb3/arangosh.confThis is a quick way to confirm your config changes work before setting up a permanent fix.
Set environment variables for automatic config loading
To avoid typing the flag every time, set environment variables that tell ArangoDB where to find your config files. Add these lines to your shell’s config file (.bashrc,.zshrc, or.fishrcdepending on what you use):export ARANGOD_CONFIG="/usr/local/etc/arangodb3/arangod.conf" export ARANGOSH_CONFIG="/usr/local/etc/arangodb3/arangosh.conf"Then reload your shell config with
source ~/.zshrc(replace with your actual shell config file) and test launchingarangosh—it should now connect to your specified localhost endpoint automatically.Double-check your config file syntax
It’s easy to mistype a parameter name and have changes ignored. Make sure inarangod.confyou have:endpoint = tcp://localhost:####And in
arangosh.conf:server.endpoint = tcp://localhost:####Replace
####with your actual port number. Typos likeendpoints(plural) or missing theserver.prefix in the shell config will cause the changes to not apply.Restart the ArangoDB service
If you modified the server config (arangod.conf), don’t forget to restart the Brew-managed service to apply the changes:brew services restart arangodbThis ensures the server picks up the new endpoint setting instead of running with the old config.
Once you’ve tried these steps, your ArangoDB tools should honor the localhost endpoint you set.
内容的提问来源于stack exchange,提问作者Chris

