Docker4drupal: Exited with code 1 and error message 'sudo: effective uid is not 0 ....'

Created on 7 Jun 2019  ·  6Comments  ·  Source: wodby/docker4drupal

Clean Docker4Drupal installation. Host system Ubuntu 18.04.
Many containers exited with code 1:

sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?
  • /usr/bin/sudo file at host machine has correct permissions.
  • Maybe 'NoNewPrivileges' flag could be a reason but I've changed this at host machine and seems it's not the problem.
$ docker-compose up
Starting my_drupal8_project_traefik   ... done
Starting my_drupal8_project_mailhog   ... done
Starting my_drupal8_project_php       ... done
Starting my_drupal8_project_mariadb   ... done
Starting my_drupal8_project_portainer ... done
Starting my_drupal8_project_nginx     ... done
Attaching to my_drupal8_project_traefik, my_drupal8_project_mailhog, my_drupal8_project_mariadb, my_drupal8_project_php, my_drupal8_project_portainer, my_drupal8_project_nginx
my_drupal8_project_traefik | time="2019-06-07T12:28:58Z" level=info msg="Using TOML configuration file /dev/null"
my_drupal8_project_traefik | time="2019-06-07T12:28:58Z" level=warning msg="web provider configuration is deprecated, you should use these options : api, rest provider, ping and metrics"
my_drupal8_project_traefik | time="2019-06-07T12:28:58Z" level=info msg="Traefik version v1.7.12 built on 2019-05-29_07:35:02PM"
my_drupal8_project_mailhog | 2019/06/07 12:28:58 Using in-memory storage
my_drupal8_project_traefik | time="2019-06-07T12:28:58Z" level=info msg="\nStats collection is disabled.\nHelp us improve Traefik by turning this feature on :)\nMore details on: https://docs.traefik.io/basics/#collected-data\n"
my_drupal8_project_mariadb | sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?
my_drupal8_project_php | sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?
my_drupal8_project_traefik | time="2019-06-07T12:28:58Z" level=info msg="Preparing server traefik &{Address::8080 TLS:<nil> Redirect:<nil> Auth:<nil> WhitelistSourceRange:[] WhiteList:<nil> Compress:false ProxyProtocol:<nil> ForwardedHeaders:0xc00000ad80} with readTimeout=0s writeTimeout=0s idleTimeout=3m0s"
my_drupal8_project_portainer | 2019/06/07 12:29:01 Templates already registered inside the database. Skipping template import.
my_drupal8_project_portainer | 2019/06/07 12:29:01 Instance already has defined endpoints. Skipping the endpoint defined via CLI.
my_drupal8_project_portainer | 2019/06/07 12:29:01 Starting Portainer 1.21.0 on :9000
my_drupal8_project_mailhog | 2019/06/07 12:28:58 [SMTP] Binding to address: 0.0.0.0:1025
my_drupal8_project_mailhog | 2019/06/07 12:28:58 Serving under http://0.0.0.0:8025/
my_drupal8_project_nginx | sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?
my_drupal8_project_traefik | time="2019-06-07T12:28:58Z" level=info msg="Preparing server http &{Address::80 TLS:<nil> Redirect:<nil> Auth:<nil> WhitelistSourceRange:[] WhiteList:<nil> Compress:false ProxyProtocol:<nil> ForwardedHeaders:0xc00000ad20} with readTimeout=0s writeTimeout=0s idleTimeout=3m0s"
my_drupal8_project_mariadb exited with code 1
my_drupal8_project_mailhog | [HTTP] Binding to address: 0.0.0.0:8025
my_drupal8_project_mailhog | Creating API v1 with WebPath: 
my_drupal8_project_mailhog | Creating API v2 with WebPath: 
my_drupal8_project_traefik | time="2019-06-07T12:28:58Z" level=info msg="Starting server on :8080"
my_drupal8_project_traefik | time="2019-06-07T12:28:58Z" level=info msg="Starting provider configuration.ProviderAggregator {}"
my_drupal8_project_php exited with code 1
my_drupal8_project_traefik | time="2019-06-07T12:28:58Z" level=info msg="Starting server on :80"
my_drupal8_project_traefik | time="2019-06-07T12:28:58Z" level=info msg="Starting provider *docker.Provider {\"Watch\":true,\"Filename\":\"\",\"Constraints\":null,\"Trace\":false,\"TemplateVersion\":2,\"DebugLogGeneratedTemplate\":false,\"Endpoint\":\"unix:///var/run/docker.sock\",\"Domain\":\"\",\"TLS\":null,\"ExposedByDefault\":true,\"UseBindPortIP\":false,\"SwarmMode\":false,\"Network\":\"\",\"SwarmModeRefreshSeconds\":15}"
my_drupal8_project_traefik | time="2019-06-07T12:28:58Z" level=info msg="Server configuration reloaded on :8080"
my_drupal8_project_traefik | time="2019-06-07T12:28:58Z" level=info msg="Server configuration reloaded on :80"
my_drupal8_project_traefik | time="2019-06-07T12:29:00Z" level=info msg="Server configuration reloaded on :8080"
my_drupal8_project_traefik | time="2019-06-07T12:29:00Z" level=info msg="Server configuration reloaded on :80"
my_drupal8_project_traefik | time="2019-06-07T12:29:01Z" level=info msg="Skipping same configuration for provider docker"
my_drupal8_project_traefik | time="2019-06-07T12:29:02Z" level=info msg="Server configuration reloaded on :8080"
my_drupal8_project_traefik | time="2019-06-07T12:29:02Z" level=info msg="Server configuration reloaded on :80"
my_drupal8_project_nginx exited with code 1
my_drupal8_project_traefik | time="2019-06-07T12:29:04Z" level=info msg="Skipping same configuration for provider docker"
my_drupal8_project_traefik | time="2019-06-07T12:29:04Z" level=info msg="Skipping same configuration for provider docker"
my_drupal8_project_mailhog | [APIv1] KEEPALIVE /api/v1/events
my_drupal8_project_mailhog | [APIv1] KEEPALIVE /api/v1/events

Most helpful comment

Problem solved. I'm very new to docker and really appreciate you help.
I've change docker's files location using /etc/docker/daemon.json

{
  "graph": "/home/vlad/.docker"
}

And partition '/home' had 'nosuid' option.
Solution: set option 'suid' in /etc/fstab for partition where docker stores it's files.

Now it works!!! I've spent 2 working days and weekend to have docker2drupal up and running. Thanks for your suggestion.

All 6 comments

For some reason your docker doesn't allow using sudo in containers, perhaps there's something with your storage driver. Anyway, it's not the issue with the image. There was a similar report resolved by reinstalling Docker https://github.com/wodby/docker4wordpress/issues/28

First of all I would like to thank you for your reply. I spent 2 days to
get it up and running but without luck and switched back to Vagrant +
VirtualBox.
Strange but I wasn't able to find link
https://github.com/wodby/docker4wordpress/issues/28 via google's search.
I totally removed docker and installed it again very carefully and find
that I missed this:
sudo apt-get install containerd.io

I'm going to install docker4drupal from scratch again to check if it work
for me. Thanks.

пт, 7 июн. 2019 г. в 17:02, Chingis notifications@github.com:

For some reason your docker doesn't allow using sudo in containers,
perhaps there's something with your storage driver. Anyway, it's not the
issue with the image. There was a similar report resolved by reinstalling
Docker wodby/docker4wordpress#28
https://github.com/wodby/docker4wordpress/issues/28


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/wodby/docker4drupal/issues/388?email_source=notifications&email_token=AAHNWJLOGWRGBOJGPFQIRVLPZJS6PA5CNFSM4HVXLOOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXF5DFQ#issuecomment-499896726,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHNWJP4P6B6YSVOBJ3EKFTPZJS6PANCNFSM4HVXLOOA
.

--
Vlad Savitsky

+38096 530 27 12
Skype: vlad_savitsky
vlad.[email protected]
http://www.linkedin.com/in/vladsavitsky

I completly removed docker and installed again but the same errors appears.

vlad@vlad-UX32VD:~/projects/docker4drupal$ sudo docker-compose up
[sudo] password for vlad:
Starting my_drupal8_project_traefik ... done
Starting my_drupal8_project_mariadb ... done
Starting my_drupal8_project_php ... done
Starting my_drupal8_project_mailhog ... done
Starting my_drupal8_project_portainer ... done
Starting my_drupal8_project_nginx ... done
Attaching to my_drupal8_project_traefik, my_drupal8_project_mailhog,
my_drupal8_project_php, my_drupal8_project_mariadb,
my_drupal8_project_portainer, my_drupal8_project_nginx
my_drupal8_project_mailhog | 2019/06/09 00:28:02 Using in-memory storage
my_drupal8_project_traefik | time="2019-06-09T00:28:02Z" level=info
msg="Using TOML configuration file /dev/null"
my_drupal8_project_traefik | time="2019-06-09T00:28:02Z" level=warning
msg="web provider configuration is deprecated, you should use these options
: api, rest provider, ping and metrics"
my_drupal8_project_traefik | time="2019-06-09T00:28:02Z" level=info
msg="Traefik version v1.7.12 built on 2019-05-29_07:35:02PM"
my_drupal8_project_php | sudo: effective uid is not 0, is /usr/bin/sudo on
a file system with the 'nosuid' option set or an NFS file system without
root privileges?
my_drupal8_project_mailhog | [HTTP] Binding to address: 0.0.0.0:8025
my_drupal8_project_mailhog | Creating API v1 with WebPath:
my_drupal8_project_mailhog | Creating API v2 with WebPath:
my_drupal8_project_portainer | 2019/06/09 00:28:03 Templates already
registered inside the database. Skipping template import.
my_drupal8_project_mailhog | 2019/06/09 00:28:02 [SMTP] Binding to address:
0.0.0.0:1025
my_drupal8_project_mailhog | 2019/06/09 00:28:02 Serving under
http://0.0.0.0:8025/
my_drupal8_project_traefik | time="2019-06-09T00:28:02Z" level=info
msg="\nStats collection is disabled.\nHelp us improve Traefik by turning
this feature on :)\nMore details on:
https://docs.traefik.io/basics/#collected-data\n"
my_drupal8_project_nginx | sudo: effective uid is not 0, is /usr/bin/sudo
on a file system with the 'nosuid' option set or an NFS file system without
root privileges?
my_drupal8_project_mariadb | sudo: effective uid is not 0, is /usr/bin/sudo
on a file system with the 'nosuid' option set or an NFS file system without
root privileges?
my_drupal8_project_portainer | 2019/06/09 00:28:03 Instance already has
defined endpoints. Skipping the endpoint defined via CLI.
my_drupal8_project_portainer | 2019/06/09 00:28:03 Starting Portainer
1.21.0 on :9000
my_drupal8_project_php exited with code 1
my_drupal8_project_traefik | time="2019-06-09T00:28:02Z" level=info
msg="Preparing server http &{Address::80 TLS: Redirect:
Auth: WhitelistSourceRange:[] WhiteList: Compress:false
ProxyProtocol: ForwardedHeaders:0xc0005f7bc0} with readTimeout=0s
writeTimeout=0s idleTimeout=3m0s"
my_drupal8_project_traefik | time="2019-06-09T00:28:02Z" level=info
msg="Preparing server traefik &{Address::8080 TLS: Redirect:
Auth: WhitelistSourceRange:[] WhiteList: Compress:false
ProxyProtocol: ForwardedHeaders:0xc0005f7c40} with readTimeout=0s
writeTimeout=0s idleTimeout=3m0s"
my_drupal8_project_traefik | time="2019-06-09T00:28:02Z" level=info
msg="Starting provider configuration.ProviderAggregator {}"
my_drupal8_project_traefik | time="2019-06-09T00:28:02Z" level=info
msg="Starting server on :80"
my_drupal8_project_traefik | time="2019-06-09T00:28:02Z" level=info
msg="Starting server on :8080"
my_drupal8_project_traefik | time="2019-06-09T00:28:02Z" level=info
msg="Starting provider *docker.Provider
{\"Watch\":true,\"Filename\":\"\",\"Constraints\":null,\"Trace\":false,\"TemplateVersion\":2,\"DebugLogGeneratedTemplate\":false,\"Endpoint\":\"unix:///var/run/docker.sock\",\"Domain\":\"\",\"TLS\":null,\"ExposedByDefault\":true,\"UseBindPortIP\":false,\"SwarmMode\":false,\"Network\":\"\",\"SwarmModeRefreshSeconds\":15}"
my_drupal8_project_mariadb exited with code 1
my_drupal8_project_traefik | time="2019-06-09T00:28:02Z" level=info
msg="Server configuration reloaded on :80"
my_drupal8_project_traefik | time="2019-06-09T00:28:02Z" level=info
msg="Server configuration reloaded on :8080"
my_drupal8_project_traefik | time="2019-06-09T00:28:04Z" level=info
msg="Server configuration reloaded on :80"
my_drupal8_project_traefik | time="2019-06-09T00:28:04Z" level=info
msg="Server configuration reloaded on :8080"
my_drupal8_project_traefik | time="2019-06-09T00:28:05Z" level=info
msg="Skipping same configuration for provider docker"
my_drupal8_project_nginx exited with code 1
my_drupal8_project_traefik | time="2019-06-09T00:28:06Z" level=info
msg="Server configuration reloaded on :8080"
my_drupal8_project_traefik | time="2019-06-09T00:28:06Z" level=info
msg="Server configuration reloaded on :80"

вс, 9 июн. 2019 г. в 01:13, Vlad Savitsky vlad.savitsky@gmail.com:

First of all I would like to thank you for your reply. I spent 2 days to
get it up and running but without luck and switched back to Vagrant +
VirtualBox.
Strange but I wasn't able to find link
https://github.com/wodby/docker4wordpress/issues/28 via google's search.
I totally removed docker and installed it again very carefully and find
that I missed this:
sudo apt-get install containerd.io

I'm going to install docker4drupal from scratch again to check if it work
for me. Thanks.

пт, 7 июн. 2019 г. в 17:02, Chingis notifications@github.com:

For some reason your docker doesn't allow using sudo in containers,
perhaps there's something with your storage driver. Anyway, it's not the
issue with the image. There was a similar report resolved by reinstalling
Docker wodby/docker4wordpress#28
https://github.com/wodby/docker4wordpress/issues/28


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/wodby/docker4drupal/issues/388?email_source=notifications&email_token=AAHNWJLOGWRGBOJGPFQIRVLPZJS6PA5CNFSM4HVXLOOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXF5DFQ#issuecomment-499896726,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHNWJP4P6B6YSVOBJ3EKFTPZJS6PANCNFSM4HVXLOOA
.

--
Vlad Savitsky

+38096 530 27 12
Skype: vlad_savitsky
vlad.[email protected]
http://www.linkedin.com/in/vladsavitsky

--
Vlad Savitsky

+38096 530 27 12
Skype: vlad_savitsky
vlad.[email protected]
http://www.linkedin.com/in/vladsavitsky

perhaps the disk partition where you have /var/lib/docker is mounted with nosuid option

anyway, the issue has nothing to do with images or docker4drupal and should be posted somewhere else like stackoverflow, I'm closing this

Problem solved. I'm very new to docker and really appreciate you help.
I've change docker's files location using /etc/docker/daemon.json

{
  "graph": "/home/vlad/.docker"
}

And partition '/home' had 'nosuid' option.
Solution: set option 'suid' in /etc/fstab for partition where docker stores it's files.

Now it works!!! I've spent 2 working days and weekend to have docker2drupal up and running. Thanks for your suggestion.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LordFransie picture LordFransie  ·  3Comments

AminSarafraz picture AminSarafraz  ·  4Comments

jzavrl picture jzavrl  ·  3Comments

ChristianNally picture ChristianNally  ·  8Comments

featherbelly picture featherbelly  ·  5Comments