Coder Social home page Coder Social logo

Comments (8)

sameersbn avatar sameersbn commented on August 26, 2024

Please make sure that you are allowing the application enough time to start.
A typical docker log will look like this https://gist.github.com/sameersbn/b5b99fb72ed4eb22908f

You have to wait until you see the below lines in the log.

--2014-02-03 10:20:55--  http://localhost/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/users/sign_in [following]
--2014-02-03 10:20:55--  http://localhost/users/sign_in
Reusing existing connection to localhost:80.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `/dev/null'

     0K ..                                                      347M=0s

2014-02-03 10:20:56 (347 MB/s) - `/dev/null' saved [2589]

If you make requests to the gitlab application before this you will see the 500 errors since the application has not started yet, but should respond correctly once its up. Please check if this is the case.

If you are still seeing this issue then just try restarting the container.
A few people have reported this issue but they have found that restarting the container fixes this issue. I think that its got something with gitlab.

If you are seeing this issue consistently, try running the image without any arguments

docker run -i -t sameersbn/gitlab

If you do not see the issue after this, then maybe it could be a problem with the application arguments.

from docker-gitlab.

riaanvddool avatar riaanvddool commented on August 26, 2024

OK, I will try that.

This is what I see in unicorn.stderr.log:

I, [2014-02-03T11:10:18.193141 #234]  INFO -- : Refreshing Gem list
fatal: Not a git repository (or any of the parent directories): .git
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': Host '172.17.42.1' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' (Mysql2::Error)

from docker-gitlab.

riaanvddool avatar riaanvddool commented on August 26, 2024

Via docker logs:

fatal: Not a git repository (or any of the parent directories): .git
rake aborted!
Host '172.17.42.1' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

Later on in the log:

--2014-02-03 11:40:19--  http://localhost/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 502 Bad Gateway
2014-02-03 11:40:19 ERROR 502: Bad Gateway.

from docker-gitlab.

sameersbn avatar sameersbn commented on August 26, 2024

@riaanvddool If the mysql error, can you add the parameter

-e "DB_POOL=10"

to the run command and retry. If it still does not work, try increasing the number.

from docker-gitlab.

riaanvddool avatar riaanvddool commented on August 26, 2024

I restarted the (separate) mysql docker and the "is blocked because of many connection errors" message disappeared.

Now I get:

Access denied for user 'gitlab'@'172.17.42.1' (using password: YES)

Looking into that now...

from docker-gitlab.

sameersbn avatar sameersbn commented on August 26, 2024

@riaanvddool You mean you are using the mysql docker container? i.e. https://github.com/sameersbn/docker-mysql
If yes, then edit the https://github.com/sameersbn/docker-mysql/blob/master/resources/setup/commands.sql file appropriately and rebuild the mysql docker images.

from docker-gitlab.

riaanvddool avatar riaanvddool commented on August 26, 2024

I am using https://github.com/orchardup/docker-mysql.

The problem seemed to be with a line in https://github.com/orchardup/docker-mysql/blob/master/run

GRANT ALL PRIVILEGES ON . TO 'root'@'%';
should have read
GRANT ALL PRIVILEGES ON . TO 'root'@'%' WITH GRANT OPTION;

The omission of the "WITH GRANT OPTION" part stopped root from granting privileges to the gitlab user.

I see that in your file (https://github.com/sameersbn/docker-mysql/blob/master/resources/setup/commands.sql) you have the "WITH GRANT OPTION" part.

Thanks for the pointers, I hope this might help someone else.

from docker-gitlab.

sameersbn avatar sameersbn commented on August 26, 2024

@riaanvddool glad to hear that the issue is resolved for you.

from docker-gitlab.

Related Issues (20)

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.