496 & 497 NOT working for pre-receive hook declined #649

dskvr opened this Issue Aug 7, 2014 · 20 comments


None yet
dskvr commented Aug 7, 2014

I used the following code, sometime last month, which fixed this issue

sudo wget -O /etc/init/docker.conf https://raw.github.com/dotcloud/docker/master/contrib/init/upstart/docker.conf
sudo service docker restart

But only temporarily. I tried to push again (4 weeks later) and I got the nasty error again.

 ! [remote rejected] master -> master (pre-receive hook declined)

This bug is like kryptonite to my patience. It appears that all issues for this happening in Dokku lead back to issues #496 & #497, and I have applied fixes in these issues without relief. I am running Nginx on DigitalOcean using Dokku v0.2.3 on Ubuntu 14.04 (w/ Docker 1.0)

Any tips?


Same problem here, i think it is related with a change in the php buildpack!


Yup. still hosed. I'm sat around holding out hope that Dokku will save me from having to roll my own webservers for some pretty basic PHP applications.

JMSwag commented Aug 12, 2014

As a temp solution

Git clone buildstep
cd buildstep
Checkout commit 90aa814
make build


Another solution:

I'm using the official heroku-buildpack-php.


git clone buildstep
cd buildstep

add to stack/packages.txt:


in stack/buildpacks.txt:

replace https://github.com/CHH/heroku-buildpack-php.git

with https://github.com/heroku/heroku-buildpack-php.git


sudo make build

Now you have a new progrium/buildstep-image.

In your app create a file conf/php-fpm-fix.conf:

; Set permissions for unix socket, if one is used. In Linux, read/write
; permissions must be set in order to allow connections from a web server. Many
; BSD-derived systems allow connections regardless of permissions.
; Default Values: user and group are set as the running user
;                 mode is set to 0666
listen.owner = nobody
listen.mode = 0666

and add a Procfile:

web: vendor/bin/heroku-php-nginx -F conf/php-fpm-fix.conf

Deploy your app.

You have to adjust your composer.json as the heroku buildpack needs different settings.


Same issue, thx for workaround.

0atman commented Sep 2, 2014

Another solution: This is a classic docker problem, docker containers can't get access to the Internetin some (all, it seems to me) network environments. This manifests itself as buildout not able to grab dependencies for your app, very silently failing.

Just edit /etc/defaults/docker and uncomment the line::

DOCKER_OPTS="--dns --dns"

And sudo service docker restart, you'll be golden.
Hat tip to nottrobin for his solution:

RobinQu commented Sep 16, 2014


Strange! I am deploying a nodejs app not php!

neither checking out 90aa814 nor using dns options is working for me.

BTW I'm using Ubuntu 14.04.1 LTS and docker 1.2.0


Having this problem when trying the DigitalOcean Go tutorial, and 0atman's fix does not work for me.

0atman commented Sep 18, 2014

@michel-slm More details?


@0atman linked above, #688

0atman commented Sep 19, 2014

Ah, I missed that. Commenting there.

dskvr commented Sep 24, 2014

I have been spending some time attempting to apply this solution to a Wordpress deploy using Dokku on Nginx with no movement. Any suggestions? (new to Dokku)


@dskvr If you are still seeing this issue, can you adding export DOKKU_TRACE=1 to your /home/dokku/dokkurc as mentioned here and gisting your logs for us?


Had the same issue deploying node.js app on Ubuntu 14.04.1 LTS and docker 1.2.0. @0atman's dns solution works.

0atman commented Nov 12, 2014

@nottrobin found an even better method than tweaking the dns: Just re-run sudo resolvconf -u and your resolv.conf will be updated with your current dns server. The problem comes when you change networks without restarting - the old dns server are persisted in the conf.


@0atman any idea what we can do in dokku to avoid this issue?

@josegonzalez josegonzalez added this to the v0.3.2 milestone Nov 16, 2014
stepri commented Nov 16, 2014

@0atman's dns solution works.

0atman commented Nov 16, 2014

@josegonzalez An excellent question. I don't know where lxc containers get their dns server from, but at the very least this should be mentioned in the tutorial. I believe my latest resolvconf -u fix may not work in every case.
Either way, https://robinwinslow.co.uk/2014/08/27/fix-docker-networking/ works.

@josegonzalez josegonzalez modified the milestone: v0.3.3, v0.3.2, v0.3.4 Nov 22, 2014

More DO oddness? Does our recent documentation addition cover this well enough?


Add a note about the resolvconf I guess and we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment