Code Monkey home page Code Monkey logo

dokku-md-plugin's Introduction

MariaDB plugin for Dokku

Project: https://github.com/progrium/dokku

Installation

cd /var/lib/dokku/plugins
git clone --recursive https://github.com/Kloadut/dokku-md-plugin mariadb
cd mariadb/dockerfiles
git checkout master
dokku plugins-install

Commands

$ dokku help
     mariadb:create <app>      Create a MariaDB container
     mariadb:delete <app>      Delete specified MariaDB container
     mariadb:info <app>        Display database informations
     mariadb:link <app> <db>   Link an app to a MariaDB database
     mariadb:console <app>     Open mysql-console to MariaDB container
     mariadb:dump <app> <file> Dump default db database into file <file> is optional. 
     mariadb:dumpraw <app>     Dump default db database to std out
     mariadb:logs <app>        Display last logs from MariaDB container
     mariadb:list              Display list of MariaDB containers

Info

This plugin adds following envvars to your project automatically:

  • DATABASE_URL
  • DB_HOST
  • DB_PORT
  • DB_NAME
  • DB_USER
  • DB_PASSWORD

Simple usage

Create a new DB:

$ dokku mariadb:create foo            # Server side
$ ssh dokku@server mariadb:create foo # Client side

-----> MariaDB container created: mariadb/foo

       Host: 172.16.0.104
       User: 'root'
       Password: 'RDSBYlUrOYMtndKb'
       Database: 'db'
       Public port: 49187

Deploy your app with the same name (client side):

$ git remote add dokku git@server:foo
$ git push dokku master
Counting objects: 155, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (70/70), done.
Writing objects: 100% (155/155), 22.44 KiB | 0 bytes/s, done.
Total 155 (delta 92), reused 131 (delta 80)
remote: -----> Building foo ...
remote:        Ruby/Rack app detected
remote: -----> Using Ruby version: ruby-2.0.0

... blah blah blah ...

remote: -----> Deploying foo ...
remote: 
remote: -----> App foo linked to mariadb/foo database
remote:        DATABASE_URL=mysql://root:[email protected]/db
remote: 
remote: -----> Deploy complete!
remote: -----> Cleaning up ...
remote: -----> Cleanup complete!
remote: =====> Application deployed:
remote:        http://foo.server

Advanced usage

Inititalize the database with SQL statements:

cat init.sql | dokku mariadb:create foo

Deleting databases:

dokku mariadb:delete foo

Linking an app to a specific database:

dokku mariadb:link foo bar

MariaDB logs (per database):

dokku mariadb:logs foo

Database informations:

dokku mariadb:info foo

Login to mariadb console

dokku mariadb:console

Import to existing database

dokku mariadb:console < import.sql

Copy database from one container to another

ssh -t [email protected] mariadb:dumpraw foo | ssh -t [email protected] mariadb:console foo

dokku-md-plugin's People

Contributors

asyrique avatar crisward avatar jeresig avatar kloadut avatar marvinroger avatar misto avatar mlomnicki avatar motin avatar onnimonni avatar parkr avatar sammy8806 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dokku-md-plugin's Issues

Can't connect -- Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

I get the above error after trying to connect to a newly created database from the dokku instance to test. Should I not be trying to connect from the same machine or is there something wrong with a config somewhere?

root@dokkutest:~# dokku mariadb:create muratest2

-----> MariaDB container created: mariadb/muratest2

       Host: 172.17.42.1
       Port: 49154
       User: 'root'
       Password: 'FJ1fGrOdKpNKrmvX'
       Database: 'db'

root@dokkutest:~# mysql -u root -p -H 172.17.42.1 -P 49154
Enter password: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
root@dokkutest:~# ps aux | grep mysql
root      1190  0.0  0.0  18000  1668 ?        S    20:58   0:00 /bin/bash /usr/bin/mysqld_safe
102       1820  0.6  4.6 883496 95068 ?        Sl   20:58   0:01 /usr/sbin/mysqld --basedir=/usr --datadir=/opt/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
root      1821  0.0  0.0   4308   628 ?        S    20:58   0:00 logger -t mysqld -p daemon.error
root      1976  0.0  0.0   4300   540 ?        S    20:58   0:00 tailf /var/log/mysql.log
root      2164  0.0  0.0  18000  1656 ?        S    20:59   0:00 /bin/bash /usr/bin/mysqld_safe
102       2792  0.3  4.8 891980 98884 ?        Sl   20:59   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/opt/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
root      2793  0.0  0.0   4308   632 ?        S    20:59   0:00 logger -t mysqld -p daemon.error
root      2866  0.0  0.0   4300   536 ?        S    20:59   0:00 tailf /var/log/mysql.log
root      2870  0.0  0.0   9444   904 pts/2    S+   21:01   0:00 grep --color=auto mysql
root@dokkutest:~# telnet 172.17.42.1 49154
Trying 172.17.42.1...
Connected to 172.17.42.1.
Escape character is '^]'.
`
5.5.36-MariaDB-1~quantal-log!ExN]fh?cfWbdPB:>edHmysql_native_passwordConnection closed by foreign host.

Mariadb not booting after server reboot

Hey guys,
After running a sudo reboot it seems like a mariadb container didn't restart properly. I am not able to access it or anything until I manually remove it (see #12), then recreate it and restore the data from a SQL backup.
Here are the logs :

140318 20:33:07 mysqld_safe Logging to syslog.
140318 20:33:07 mysqld_safe Starting mysqld daemon with databases from /opt/mysql
140318 20:47:27 mysqld_safe Number of processes running now: 0
140318 20:47:27 mysqld_safe mysqld restarted
140318 20:53:13 mysqld_safe Number of processes running now: 0
140318 20:53:13 mysqld_safe mysqld restarted
140318 20:59:54 mysqld_safe Number of processes running now: 0
140318 20:59:54 mysqld_safe mysqld restarted
140318 21:00:07 mysqld_safe Number of processes running now: 0
140318 21:00:07 mysqld_safe mysqld restarted
140318 21:00:12 mysqld_safe Number of processes running now: 0
140318 21:00:12 mysqld_safe mysqld restarted
140318 21:00:35 mysqld_safe Number of processes running now: 0
140318 21:00:35 mysqld_safe mysqld restarted
140318 22:53:22 mysqld_safe Logging to syslog.
140318 22:53:22 mysqld_safe Starting mysqld daemon with databases from /opt/mysql
140318 22:53:23 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

The reboot happened around 22:50, so only the last 3 lines seems to be useful.

Permission denied when deleting database

ubuntu@domU-12-31-39-0A-3A-57:~$ sudo dokku mariadb:delete piwik
rm: cannot remove ‘/var/lib/docker/vfs/dir/23f991bcddde4db2af45a0377a89e0caf4a8d81c44377531754b5aa3a5cc81c1’: Permission denied

when recreating

ubuntu@domU-12-31-39-0A-3A-57:~$ dokku mariadb:create piwik

-----> Reusing mariadb/piwik database
2014/01/19 01:12:50 Error: start: Invalid bind mount '/var/lib/docker/vfs/dir/23f991bcddde4db2af45a0377a89e0caf4a8d81c44377531754b5aa3a5cc81c1:/opt/mysql' : source doesn't exist

Mysql Repair Table

After a crash of the host machine, my mariadb instances are crash. I can't connect with mariadb:console, I just get the following error.

ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0

The logs say the following.

150223 16:04:17 [Note] Server socket created on IP: '0.0.0.0'.
150223 16:04:17 [ERROR] mysqld: Table './mysql/user' is marked as crashed and should be repaired
150223 16:04:17 [ERROR] mysqld: Table 'user' is marked as crashed and should be repaired
150223 16:04:17 [Warning] Checking table:   './mysql/user'
150223 16:04:17 [ERROR] mysql.user: 1 client is using or hasn't closed the table properly
150223 16:04:17 [Warning] 'user' entry 'root@dd40882ba0ea' ignored in --skip-name-resolve mode.
150223 16:04:17 [Warning] 'proxies_priv' entry '@ root@dd40882ba0ea' ignored in --skip-name-resolve mode.
150223 16:04:17 [Note] Event Scheduler: Loaded 0 events
150223 16:04:17 [Note] /usr/sbin/mysqld: ready for connections

Any ideas how to recover from this. I could rebuild from a backup (this is just a dev server). However if there is a way of recovering from this, it would could prove very useful. If not, if there is anything I can contribute to making this repairable, I'd be happy to help.

Can't connect to DB -- host not allowed

Hi. There's a closed ticket that talk about a similar issue but the resolution does not help.

I've created a db instance but can't connect to it:

+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/git/commands mariadb:info foo
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/mariadb/commands mariadb:info foo

       Host: 172.17.42.1
       Port: 49156
       User: 'root'
       Password: 'tvgBftypUwCJPQPW'
       Database: 'db'

+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/mysql/commands mariadb:info foo
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/nginx-vhosts/commands mariadb:info foo
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/mysql/commands mariadb:create foo
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/nginx-vhosts/commands mariadb:create foo
+ case "$1" in
root@test:/home/dokku# mysql -u root -p -H 172.17.42.1 -P 49156
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
root@test:/home/dokku#

Running the same command from within the container:

root@1cf73d9743a5:/# mysql -u root -p -H 172.17.42.1 -P 49156
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
root@1cf73d9743a5:/# ps aux | grep mysql
root        18  0.0  0.2  18000  1268 ?        S    20:39   0:00 /bin/bash /usr/bin/mysqld_safe
mysql      646  0.1 19.3 888024 97056 ?        Sl   20:39   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/opt/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
root       647  0.0  0.1   4308   544 ?        S    20:39   0:00 logger -t mysqld -p daemon.error
root      1933  0.0  0.1   6516   620 ?        S+   20:52   0:00 grep mysql
root@1cf73d9743a5:/# telnet 172.17.42.1 49156
Trying 172.17.42.1...
Connected to 172.17.42.1.
Escape character is '^]'.
FHost '172.17.42.1' is not allowed to connect to this MariaDB server
Connection closed by foreign host.

So what gives? mysql is running, ip/port are accessible but no permission to connect.

Thanks.

`linked` line not seen when deploying NodeJS app

I'm deploying a NodeJS app (Ghost) on dokku, and want to use the MariaDB plugin to provide persistent storage for it.

The plugin installs fine, and creates the right docker instance, which I can connect to from the host system.

The problem comes when I deploy my node app. In the docs, I don't see the following snippet when pushing up to dokku:

remote: -----> Deploying foo ...
remote: 
remote: -----> App foo linked to mariadb/foo database
remote:        DATABASE_URL=...

Because I don't get that link, I think my Node app is struggling to connect across containers, so I get a database timeout when it attempts to reach the MariaDB container.

Do I need to add some metadata to my node app to tell dokku that it's looking for a database container?

Cant do create db

When i try to sudo dokku mariadb:create xyz

i get the following error. Mongodb plugin works fine which means my dokku installations is fine.

2014/07/10 19:05:04 Error response from daemon: Cannot start container 88acfc064c87bf4db2e1c966bae978396d39fac38752bb1b23e0ec83087ff08e: exec: "exit": executable file not found in $PATH

"Your docker version is too old, please update it"

Hi! I am getting this:

# dokku mariadb:create myps
Your docker version is too old, please update it

# docker -v
Docker version 1.4.1, build 5bc2ff8
# docker -D -v
Docker version 1.4.1, build 5bc2ff8
# dokku version
0.3.13

I think it maybe problem with my docker data path. At commands:64 there are check for /var/lib/docker/vfs/dir/, but my dir is /home/lib/docker/vfs/ currently.

plugins-install Fails - returned a non-zero code: 100

Followed the instruction and I'm getting the following error when running "plugins-install":

The command [/bin/sh -c LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server-5.5] returned a non-zero code: 100

I am trying to setup mariadb on a DigitalOcean droplet. Not sure what's going on, I can run the "apt-get install" manually and it runs fine.

Initializing the db with a sql file isn't working

I tried importing a mysqldump of a WordPress database while migrating a site

cat wprunners.sql | dokku mariadb:create wprunners

Based on the "Advanced usage" instructions in the readme. The database is created fine, but it's empty.

Port changing

I hadn't noticed this before I upgraded to Ubuntu 14.04, but I can't say for sure it wouldn't have happened before.

When I stop and start a docker container (like on reboot) for a mariadb instance, the exposed port number changes, but the linked applications environment variables are not updated and neither is .mariadb/port_APPNAME. I end up having to update that manually, then re-link and then rebuild my app.

I am not sure why my app rebuild is necessary. Since re-linking looks like it reboots the container.

I noticed that this port change issue is also affecting the domains plugin and I think I would have noticed that before, so I suspect that this behavior is related to the Ubuntu 14.04 or docker 1.2 which was installed in the upgrade.

hangs on creation/info and wont create the password

for some reason mariadb:create is hanging before finishing. The container is running and created but it seems part of the initialization is missing as running mariadb:info appname won't show password and hangs too.

looking into dokku_root/.mariadb/ I don't see any file created.

any pointers on how to debug it better ?

Thanks

MariaDB image not found...

Fresh install from Digital Ocean Dokku 0.3.18 image on Ubuntu 14.04:
After followed installation instructions for plugin.

$ dokku mariadb:create app
MariaDB image not found... Did you run 'dokku plugins-install' 

dokku plugins-install has been run with and without sudo, as well as dokku plugins-update.

dokku plugins returns mariadb as an active dokku plugin;
.mariadb dir is present in /home/dokku, but empty.

I'm running MariaDB 10.0.19, installed according to these instructions

Copying Databases - feature request

When moving databases from server to server I like to pipe them over ssh i.e.

ssh -C {ssh.user}@{remote_host} mysqldump -u {remote_dbuser} --password={remote_dbpassword} {remote_dbname} | mysql -u {local_dbuser} --password={local_dbpassword} -D {local_dbname}

It would be really cool if I could pipe from the mariadb command - i.e.

ssh -C dokku@SERVER1 mariadb:dump db1 | ssh -C dokku@SERVER2 mariadb:console db1 

plugin.toml: no such file or directory

I try to install this plugin. After I enter

dokku plugins-install

I get this error message:

open /var/lib/dokku/plugins/available/mariadb/plugin.toml: no such file or directory
open /var/lib/dokku/plugins/available/md-plugin/plugin.toml: no such file or directory

MariaDB container image is not building

Installation wasn't finished succesfully after dokku plugins-install so i figured to do that manually but that didn't help either. I'm using dokku v0.2.1.

[email protected]:/var/lib/dokku/plugins#git clone https://github.com/Kloadut/dokku-md-dockerfiles /tmp/dokku-md-dockerfiles
[email protected]:/var/lib/dokku/plugins# docker build -q=true -t kloadut/mariadb /tmp/dokku-md-dockerfiles
Uploading context 153.6 kB
Uploading context
Step 1 : FROM ubuntu:quantal
 ---> 3e47bae8d07a
Step 2 : MAINTAINER kload "[email protected]"
 ---> Using cache
 ---> 09dbcd90f94f
Step 3 : RUN echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d; chmod +x /usr/sbin/policy-rc.d
 ---> Using cache
 ---> 99749ae47e69
Step 4 : RUN apt-get update
 ---> Using cache
 ---> 440244a2abda
Step 5 : RUN apt-get install -y software-properties-common
 ---> Using cache
 ---> 585f24d46baa
Step 6 : RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
 ---> Using cache
 ---> eab8acbb8c6d
Step 7 : RUN add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu quantal main'
 ---> Using cache
 ---> 330cbdde136a
Step 8 : RUN apt-get update
 ---> Using cache
 ---> ebfac514babd
Step 9 : RUN echo mysql-server-5.5 mysql-server/root_password password 'a_stronk_password' | debconf-set-selections
 ---> Using cache
 ---> 1e77db1824c2
Step 10 : RUN echo mysql-server-5.5 mysql-server/root_password_again password 'a_stronk_password' | debconf-set-selections
 ---> Using cache
 ---> c7f06101f0a1
Step 11 : RUN LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server-5.5
 ---> Running in bf851941ffe7
2014/01/25 19:01:23 The command [/bin/sh -c LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server-5.5] returned a non-zero code: 100

Fails creating database.

dokku mariadb:create test
mv: missing destination file operand after /var/lib/docker/volumes/mariadb-test' Trymv --help' for more information.

I think that the offending code is:

VOLUME_PATH=$(docker inspect $ID | grep "/var/lib/docker/volumes/" | awk '{print $2}' | sed -e"s//layer//" | sed -e's/"//g')

echo VOLUME_PATH returns nothing

Database Create Error

I am getting this when running: "dokku mariadb:create appname"

-----> Running pre-flight checks
       CHECKS file not found in container: running simple container check...
-----> Waiting for 35 seconds ...
App container failed to start!!
=====> #### container output:
       Booting on port 5000...
       Starting php-fpm...
       Starting httpd...
       [24-May-2015 18:17:04] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
       [24-May-2015 18:17:04] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
=====> end #### container output
/var/lib/dokku/plugins/ps/commands: line 5:  3601 Killed                  dokku deploy "$APP"

Any ideas?

Issues while connecting

I am assuming that mariadb allow connections from root@localhost only, because I am getting the following error:

mysql -u root -h 172.17.42.1 --port 49163 -p
Enter password: 
ERROR 1130 (HY000): Host '172.17.42.1' is not allowed to connect to this MariaDB server

...or am I doing something wrong?

Connection rights after reboot

After a reboot, MariaDB containers become unavailable since the /etc/mysql/my.cnf seems to be reset.

The workaround by now is to restart (stop, then start) every containers. It keeps persistent data and port.

Database URI scheme not compatible with Ruby's mysql2 gem

To work with the mysql2 gem in Rails, one needs to specify the adapter as mysql2 in database.yml. However, because this plugin writes out the DATABASE_URL variable with a mysql:// scheme, the adapter option is always mysql, which makes Rails think you want to use the old and seemingly abandoned activerecord-mysql-adapter.

Is there a way we could make the URI scheme of DATABASE_URL configurable, so users of the mysql2 gem could let the scheme be equal to mysql2://?

I would be happy to contribute a Pull Request if you can help me get going on a general approach for this.

executable file not found in $PATH

Hi,

I've found that this line is giving me an error when creating a new instance

ID=$(docker run -d kloadut/mariadb exit 0)

The error was:

2014/07/09 23:55:22 Error response from daemon: Cannot start container e6e4fb1265869601d8e97c197818dd03b75c1f0e00dcd777987d74f87113dd03: exec: "exit": executable file not found in $PATH

So I've found the solution from another fork (https://github.com/udzura/dokku-ephemeral-mysql-plugin/blob/master/commands)

BASE_IMAGE_NAME=kloadut/mariadb
ID=$(docker run -d $BASE_IMAGE_NAME /bin/bash -c 'exit 0')

Please take a look at this issue an update to plugin if you found my solution usefull.

Regards,
Augusto

Environment variables are not set correctly

I'm having problems with the environment variables that are set when I link a database (I'm using the latest dokku and dokku-md-plugin versions):

 dokku mariadb:link play-slick play-slick
-----> Setting config vars and restarting play-slick
       DATABASE_URL: mysql2://root:[email protected]:49153/db
-----> Setting config vars and restarting play-slick
       DB_HOST: 172.17.42.1 DB_PASSWORD=XXX DB_NAME=db DB_PORT=49153 DB_USER=root
...

as you can see, only one variable DB_HOST is set, the key=value pairs don't get split into single variables:

% dokku config play-slick                 
=== play-slick config vars ===
DATABASE_URL: mysql2://root:[email protected]:49153/db
DB_HOST:      172.17.42.1 DB_PASSWORD=XXX DB_NAME=db DB_PORT=49153 DB_USER=root

when I run the config:set myself, everything gets set correctly:

dokku config:set play-slick DB_HOST=172.17.42.1 DB_PASSWORD=XXX DB_NAME=db DB_PORT=49153 DB_USER=root
-----> Setting config vars and restarting play-slick
       DB_HOST:     172.17.42.1$
       DB_PASSWORD: XXX$
       DB_NAME:     db$
       DB_PORT:     49153$
       DB_USER:     root

Dockerfile not found

I receive an error when following the installation steps exactly:

2014/08/30 11:03:51 no Dockerfile found in /var/lib/dokku/plugins/mariadb/dockerfiles

It looks like the submodule is not being checked out. This is fixed by

git clone --recursive https://github.com/Kloadut/dokku-md-plugin mariadb

However when I run dokku plugins-install (on Ubuntu 14.04) I get this output:

Sending build context to Docker daemon 7.168 kB
Sending build context to Docker daemon
2014/08/30 11:06:08 The command [/bin/sh -c apt-get update] returned a non-zero code: 100

(I get this same issue with your Postgresql plugin by the way). After seeing #13, I tried a fresh approach:

cd /var/lib/dokku/plugins/
git clone --recursive https://github.com/Kloadut/dokku-md-plugin mariadb
cd mariadb/dockerfiles
git checkout master
dokku plugins-install

This worked.

userland proxy

I can't seem to get it working at all
docker info
Containers: 23
Images: 56
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Dirs: 102
Execution Driver: native-0.2
Kernel Version: 3.13.0-40-generic
Operating System: Ubuntu 14.04.1 LTS

docker version
Client version: 1.3.2
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): 39fa2fa
OS/Arch (client): linux/amd64
Server version: 1.3.2
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): 39fa2fa

dokku mariadb:create rails-rt

Error response from daemon: Cannot start container 
20f439178e29b4ba06d041cce3102a36b53cb19621b90e017f79ad9b46c5214d: 
Error starting userland proxy: listen tcp 0.0.0.0:49160: bind: address already in use

ps aux | grep docker

root       789  4.0  0.3 684608 15284 ?        Ssl  03:29   0:00 /usr/bin/docker -d
root      1239  0.4  0.1 255632  7572 ?        Sl   03:29   0:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 49153 -container-ip 172.17.0.2 -container-port 5000
root      1370  0.2  0.1 190096  7524 ?        Sl   03:29   0:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 49154 -container-ip 172.17.0.3 -container-port 5000
root      1501  0.2  0.1 247436  5612 ?        Sl   03:29   0:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 49155 -container-ip 172.17.0.4 -container-port 5000
root      1645  0.3  0.1 255632  5488 ?        Sl   03:29   0:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 49156 -container-ip 172.17.0.5 -container-port 5000
root      1773  0.0  0.0  11744   916 pts/0    R+   03:29   0:00 grep --color=auto docker

mariadb

Sorry for the noobish question, but I can't seem to get it working.. after rebooting my server, dokku logs app keeps telling me this:

What am I doing wrong? (I have linked my app container to a dokku:mariadb container)

root@vm1:~# dokku logs app

ERROR: There is a problem with the database
connect ETIMEDOUT, sql: select * from information_schema.tables where table_schema = ? and table_name = ?, bindings: db,settings

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.