Closed trevorbernard closed 3 months ago
Just bumped into the same. The log
directory has issues too. I think the following may have worked around the log directory issue for me:
sudo mkdir -p /var/log/mina-indexer/
sudo chown -R jonathan:admin /var/log/mina-indexer/
Is this issue resolved? @jhult's solution worked for me
This makes running and testing on macOS tricky as you have to be sure to apply a workaround.
This is my work around. This exists in the root of the rust directory:
#!/usr/bin/env bash
BLOCKS_DIR=~/.mina-indexer/blocks
STAKING_LEDGERS_DIR=~/.mina-indexer/staking-ledgers
GENESIS_LEDGERS_DIR=~/.mina-indexer/genesis-ledgers
DATABASE_DIR=~/.mina-indexer/database
IDXR="$(pwd)"/target/release/mina-indexer
DOMAIN_SOCKET_PATH="$(pwd)"/mina-indexer.sock
mina-indexer() {
"$IDXR" "$@"
}
mina-indexer server start \
--blocks-dir "$BLOCKS_DIR" \
--staking-ledgers-dir "$STAKING_LEDGERS_DIR" \
--database-dir "$DATABASE_DIR" \
--log-level debug 2>&1
Blocked on #920 and #921. After those are complete, then all that remains is to set good defaults for blocks directory and staking ledgers directory.
Also blocked on #1082 .
I no longer use Nix on my MacOS machine, so it is difficult for me to work on this issue.
Since the Indexer is a server, then by the Linux FHS, one would expect the logs in /var/log/mina-indexer despite the fact that this is a read-only directory for non-root users.
So, @jhult, what is the status of this issue, now that various blocking issues have changed? Do we expect to be able to start the server without arguments when we are not root?
As long as you set VOLUMES_DIR
to a writable directory, this is no longer an issue.
Example: export VOLUMES_DIR="~/.mina-indexer"
As long as you set
VOLUMES_DIR
to a writable directory, this is no longer an issue.
I'll close, since this is no longer an issue.
The problem is that on darwin system, it protects the
/usr
directory