Dock on Ubuntu refused to connect

I installed a new image Dokku v0.2.3 at 14.04 (w / Docker 1.2.0) to 512 MB drops in DigitalOcean. To avoid memory problems, I create the swap file as usual.

I deployed two applications for testing, one on a subdomain and the other with a custom domain , and they worked great .

It was just a test server, just to see how it works, if it works, and in general, make sure that it works I of .

So. The next thing is to destroy this droplet and create a new one to deploy some applications there. For me, as the first time, everything worked, these steps are here in this article .

Basically:

  • Generating SSH Keys (This obviously works great)

  • Server access (http: //) to install dokku (here I have enabled the use of virtual hostnames for applications )

  • Update dokku deployment step

    cd ~ / dokku git pull wizard make install

  • Install the dokku postgresql plugin

    cd / var / lib / dokku / plugins git clone https://github.com/Kloadut/dokku-pg-plugin postgresql dokku plugins-install

  • Configure the rail checker application on the server. This is the output:

    git push dokku master
    Counting objects: 6, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (5/5), done.
    Writing objects: 100% (6/6), 491 bytes | 0 bytes/s, done.
    Total 6 (delta 2), reused 3 (delta 0)
    -----> Cleaning up ...
    -----> Building rails-sample ...
           Ruby app detected
    -----> Compiling Ruby/Rails
    -----> Using Ruby version: ruby-2.1.2
    -----> Installing dependencies using 1.6.3
           Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --    deployment
           Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
           installing your bundle as root will break this application for all non-root
           users on this machine.
           Using rake 10.1.1
           Using i18n 0.6.9
           Using minitest 4.7.5
           Using multi_json 1.8.4
           Using tzinfo 0.3.38
           Using builder 3.1.4
           Using erubis 2.7.0
           Using atomic 1.1.15
           Using rack 1.5.2
           Using polyglot 0.3.4
           Using activerecord-deprecated_finders 1.0.3
           Using arel 4.0.2
           Using coffee-script-source 1.7.0
           Using mime-types 1.25.1
           Using execjs 2.0.2
           Using hike 1.2.3
           Using thor 0.18.1
           Using kgio 2.9.2
           Using json 1.8.1
           Using tilt 1.4.1
           Using bundler 1.6.3
           Using pg 0.17.1
           Using raindrops 0.13.0
           Using rails_serve_static_assets 0.0.2
           Using rails_stdout_logging 0.0.3
           Using sass 3.2.14
           Using thread_safe 0.2.0
           Using rack-test 0.6.2
           Using treetop 1.4.15
           Using coffee-script 2.2.0
           Using sprockets 2.11.0
           Using uglifier 2.4.0
           Using rails_12factor 0.0.2
           Using unicorn 4.8.2
           Using rdoc 4.1.1
           Using activesupport 4.0.3
           Using sdoc 0.4.0
           Using mail 2.5.4
           Using actionpack 4.0.3
           Using activemodel 4.0.3
           Using jbuilder 1.5.3
           Using actionmailer 4.0.3
           Using railties 4.0.3
           Using coffee-rails 4.0.1
           Using sprockets-rails 2.0.1
           Using jquery-rails 3.1.0
           Using turbolinks 2.2.1
           Using activerecord 4.0.3
           Using sass-rails 4.0.1
           Using rails 4.0.3
           Your bundle is complete!
           Gems in the groups development and test were not installed.
           It was installed into ./vendor/bundle
           Bundle completed (1.64s)
           Cleaning up the bundler cache.
    -----> Writing config/database.yml to read from DATABASE_URL
    -----> Preparing app for Rails asset pipeline
           Running: rake assets:precompile
           Asset precompilation completed (2.47s)
           Cleaning assets
           Running: rake assets:clean
    
    -----> Discovering process types
           Procfile declares types -> web
           Default process types for Ruby -> rake, console, web, worker
    -----> Releasing rails-sample ...
    -----> Deploying rails-sample ...
    -----> Checking status of PostgreSQL
           Found image postgresql/rails-sample database
           Checking status... ok.
    -----> Running pre-flight checks
           check-deploy: /home/dokku/rails-sample/CHECKS not found. attempting to retrieve it from container ...
           CHECKS file not found in container. skipping checks.
    -----> Running post-deploy
    -----> Creating non-ssl nginx.conf
    -----> Running nginx-pre-reload
           Reloading nginx
    -----> Shutting down old container in 60 seconds
    =====> Application deployed:
           http://rails-sample.domain.com
    
          

  • And finally, back to the server, create the database and migrate the rake

    dokku postgresql: create sample rails docker run -i -t dokku / rails-sample / bin / bash export HOME = / app for file in /app/.profile.d/*; make the source file $ file; made hash -r cd / app RAILS_ENV = production rake db: migrate

Now I am accessing rails-sample.domain.com, it just does nothing. In Chrome I am getting the error ERR_CONNECTION_REFUSED

.

The domain is well resolved to the server IP. There even a wildcard A record pointed to the server.

Didn't see such error on google. Even tell me where to see what might be wrong. Dokku's magazines are almost empty. There is only the beginning part of the log:

INFO -- : Refreshing Gem list
INFO -- : listening on addr=0.0.0.0:5000 fd=9
INFO -- : master process ready
INFO -- : worker=0 ready
INFO -- : worker=1 ready
INFO -- : worker=2 ready

      

So it is obvious that there was never any access to the application.

docker ps

output:

CONTAINER ID        IMAGE                            COMMAND                CREATED             STATUS              PORTS                     NAMES
ce2d9d46f769        dokku/rails-sample:latest        "/bin/bash -c '/star   About an hour ago   Up About an hour    0.0.0.0:49156->5000/tcp   dreamy_curie        
89a111191b6a        postgresql/rails-sample:latest   "/usr/bin/start_pgsq   About an hour ago   Up About an hour    0.0.0.0:49154->5432/tcp   focused_mayer   

      

Where can I see what's wrong with it? I did the creation process about five times (by new droplets) and there is always the same error, but I cannot figure out what is wrong. This is even more frustrating because it worked great the first time.

Thank.

UPDATE When I access domain.com:49158, the application works fine.

UPDATE II So the domain configuration seems fine. It also works with a subdomain, but only if you specify a port after it. Port 80 seems to be giving up connections. But I don’t know how. Nginx config files look ok (ips / ports / hostnames / etc)

+3


source to share





All Articles