Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crontab archive issue: Name or service not known #17

Closed
Toub opened this issue Feb 1, 2016 · 2 comments
Closed

Crontab archive issue: Name or service not known #17

Toub opened this issue Feb 1, 2016 · 2 comments

Comments

@Toub
Copy link

Toub commented Feb 1, 2016

Thanks for this good docker configuration.

However, I have some issue with the crontab job.

  1. When I try to run the archive command manually (from inside the cron container), I get the following error:
root@bfa28b94d1c0:/var/www/html# su www-data -c "/usr/local/bin/php /var/www/html/console core:archive"
This account is currently not available.

Cause group www-data does not exists in the container.

  1. When I launch the command as root, I have a network error, even if I specify the piwik URL as it is documented as "required".
root@bfa28b94d1c0:/var/www/html# /usr/local/bin/php /var/www/html/console core:archive --url=http://piwik.mydomain.com                 

  [Zend_Db_Adapter_Exception]                                                                     
  SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known  

  [PDOException]                                                                                  
  SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known  

Both piwik.mydomain.com and piwik.org pings are OK.

Any help appreciated!

@pierreozoux
Copy link
Collaborator

You can run like this:

su -s "/bin/bash" -c "/usr/local/bin/php /var/www/html/console core:archive" www-data

If you cat /etc/passwd you'll see that the shell for this user is
nologin, this is what cause the error.

But I didn't like it anyway :/

So I changed it: docker-library/official-images#1203 (comment)

@pierreozoux
Copy link
Collaborator

Ok, I think we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants