MartinHeinz / mastodon-local

Setup for local/playground instance for Mastodon
4 stars 0 forks source link

Unable to create initial admin account #1

Open paulhart opened 1 year ago

paulhart commented 1 year ago

I'm following along with the steps, but the admin account doesn't appear to be created correctly:

[prior items removed, including "Redis configuration works!"]
Do you want to create an admin user straight away? Yes
Username: admin
E-mail: admin@localhost
RedisCacheStore: read_entry failed, returned nil: Redis::CannotConnectError: Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED)
RedisCacheStore: write_entry failed, returned false: Redis::CannotConnectError: Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED)
RedisCacheStore: read_entry failed, returned nil: Redis::CannotConnectError: Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED)
RedisCacheStore: write_entry failed, returned false: Redis::CannotConnectError: Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED)
rake aborted!
Redis::CannotConnectError: Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED)
[stack traces removed]

I've confirmed that the services are running (and made a couple of changes to the docker-compose.yml to expose redis to the external network):

NAME                     IMAGE                COMMAND                  SERVICE             CREATED             STATUS                    PORTS
mastodon-local-db-1      postgres:14-alpine   "docker-entrypoint.s…"   db                  14 minutes ago      Up 31 seconds (healthy)   
mastodon-local-redis-1   redis:7-alpine       "docker-entrypoint.s…"   redis               14 minutes ago      Up 31 seconds (healthy)   127.0.0.1:6379->6379/tcp
paulhart commented 1 year ago

FWIW, the way I got around this was by not creating an admin account initially, and then doing the following (in a separate terminal once docker-compose up had been run):

docker-compose run web bash
RAILS_ENV=production tootctl accounts create paulhart --email admin@localhost --confirmed --role Owner

Thanks for putting this together - it makes life so much easier for local bot development!