<p>I think i had the same problem when running locally.
Forgot to do the initial DB migration.</p>

<pre><code>bundle exec rake db:migrate
</code></pre>

<p>after this, it worked for me</p>

CC BY-SA 3.0
2015-03-18T13:49:30.730Z
2015-03-18T13:49:30.730Z
thepiwo
<p>I'm trying to install <a href="https://github.com/coinbase/toshi" rel="nofollow">toshi</a> over docker and am using an AWS RDS DB for postgres. After running <code>docker build -t=coinbase/toshi .</code> on an AWS ec2 instance I attempt to run:</p>

<pre><code>sudo docker run -e REDIS_URL=redis://toshi-001.ithq2b.0001.use2.cache.amazonaws.com:6379 -e DATABASE_URL=postgres://username:password@toshi-db.adfgsdsadfd.us-east-2.rds.amazonaws.com:5432/toshi -e TOSHI_ENV=production coinbase/toshi foreman start
</code></pre>

<p>Which starts up the process but inevitably fails</p>

<pre><code>00:22:59 web.1                | started with pid 11
00:22:59 block_worker.1       | started with pid 12
00:22:59 transaction_worker.1 | started with pid 14
00:22:59 peer_manager.1       | started with pid 15
00:23:01 web.1                | [11] Puma starting in cluster mode...
00:23:01 web.1                | [11] * Version 2.9.0 (ruby 2.1.2-p95), codename: Team High Five
00:23:01 web.1                | [11] * Min threads: 1, max threads: 16
00:23:01 web.1                | [11] * Environment: development
00:23:01 web.1                | [11] * Process workers: 3
00:23:01 web.1                | [11] * Phased restart available
00:23:01 web.1                | [11] * Listening on tcp://0.0.0.0:5000
00:23:01 web.1                | [11] Use Ctrl-C to stop
00:23:02 peer_manager.1       | /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/sequel-4.13.0/lib/sequel/adapters/postgres.rb:161:in `async_exec': PG::UndefinedTable: ERROR:  relation "peers" does not exist (Sequel::DatabaseError)
00:23:02 peer_manager.1       | LINE 1: SELECT * FROM "peers"
00:23:02 peer_manager.1       |                       ^
00:23:02 peer_manager.1       |     from /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/sequel-4.13.0/lib/sequel/adapters/postgres.rb:161:in `block in execute_query'
00:23:02 peer_manager.1       |     from /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/sequel-4.13.0/lib/sequel/database/logging.rb:33:in `log_yield'
...
</code></pre>

<p>So it seems that for some reason the DB is not able to migrate. When I run the same command without specifying that DB name toshi at the end of the postgres connection url I get a different error:</p>

<pre><code>Unable to find image 'coinbase:latest' locally
Pulling repository coinbase
FATA[0000] Error: image library/coinbase:latest not found
</code></pre>

<p>Any ideas what could be causing either of these errors?</p>

<coinbase.com><toshi>
Database error when installing Coinbase's Toshi with Docker
Loourr
# Database error when installing Coinbase's Toshi with Docker

(Asked by: username_0 on 2015-01-19)

I'm trying to install [toshi](https://github.com/coinbase/toshi) over docker and am using an AWS RDS DB for postgres. After running `docker build -t=coinbase/toshi .` on an AWS ec2 instance I attempt to run:

```
sudo docker run -e REDIS_URL=redis://toshi-001.ithq2b.0001.use2.cache.amazonaws.com:6379 -e DATABASE_URL=postgres://username:password@toshi-db.adfgsdsadfd.us-east-2.rds.amazonaws.com:5432/toshi -e TOSHI_ENV=production coinbase/toshi foreman start

```

Which starts up the process but inevitably fails

```
00:22:59 web.1                | started with pid 11
00:22:59 block_worker.1       | started with pid 12
00:22:59 transaction_worker.1 | started with pid 14
00:22:59 peer_manager.1       | started with pid 15
00:23:01 web.1                | [11] Puma starting in cluster mode...
00:23:01 web.1                | [11] * Version 2.9.0 (ruby 2.1.2-p95), codename: Team High Five
00:23:01 web.1                | [11] * Min threads: 1, max threads: 16
00:23:01 web.1                | [11] * Environment: development
00:23:01 web.1                | [11] * Process workers: 3
00:23:01 web.1                | [11] * Phased restart available
00:23:01 web.1                | [11] * Listening on tcp://0.0.0.0:5000
00:23:01 web.1                | [11] Use Ctrl-C to stop
00:23:02 peer_manager.1       | /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/sequel-4.13.0/lib/sequel/adapters/postgres.rb:161:in `async_exec': PG::UndefinedTable: ERROR:  relation "peers" does not exist (Sequel::DatabaseError)
00:23:02 peer_manager.1       | LINE 1: SELECT * FROM "peers"
00:23:02 peer_manager.1       |                       ^
00:23:02 peer_manager.1       |     from /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/sequel-4.13.0/lib/sequel/adapters/postgres.rb:161:in `block in execute_query'
00:23:02 peer_manager.1       |     from /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/sequel-4.13.0/lib/sequel/database/logging.rb:33:in `log_yield'
...

```

So it seems that for some reason the DB is not able to migrate. When I run the same command without specifying that DB name toshi at the end of the postgres connection url I get a different error:

```
Unable to find image 'coinbase:latest' locally
Pulling repository coinbase
FATA[0000] Error: image library/coinbase:latest not found

```

Any ideas what could be causing either of these errors?

**Tags:** coinbase.com, toshi


---

## 1 answers

### Answer by username_1 on 2015-03-18. Score: 4

I think i had the same problem when running locally.
Forgot to do the initial DB migration.

```
bundle exec rake db:migrate

```

after this, it worked for me


---

