Hello,
Build awx project is failing with nginx error.
I have pulled the lasted version of the code.
awx_1 | (changed: True)
awx_1 | 2019-03-03 21:57:18,845 DEBUG awx.main.dispatch publish awx.main.tasks.apply_cluster_membership_policies(dd4a973d-9f25-40c5-bf97-5ac4a8dd0105, queue=awx_private_queue)
awx_1 | 2019-03-03 21:57:18,871 DEBUG awx.main.dispatch publish awx.main.tasks.apply_cluster_membership_policies(f4776581-043d-4706-b7cc-5b1bcf61cdf0, queue=awx_private_queue)
awx_1 | Creating instance group tower
awx_1 | (changed: True)
awx_1 | 21:57:19 system | daphne.1 started (pid=249)
awx_1 | 21:57:19 system | runworker.1 started (pid=247)
awx_1 | 21:57:19 system | nginx.1 started (pid=245)
awx_1 | 21:57:19 system | receiver.1 started (pid=256)
awx_1 | 21:57:19 system | dispatcher.1 started (pid=253)
awx_1 | 21:57:19 system | uwsgi.1 started (pid=262)
awx_1 | 21:57:19 system | jupyter.1 started (pid=265)
awx_1 | 21:57:19 nginx.1 | nginx -g “daemon off;”
awx_1 | 21:57:19 nginx.1 | nginx: [emerg] getpwnam(“nginx”) failed
awx_1 | 21:57:19 nginx.1 | make: *** [nginx] Error 1
awx_1 | 21:57:19 system | nginx.1 stopped (rc=2)
awx_1 | 21:57:19 system | sending SIGTERM to runworker.1 (pid 247)
awx_1 | 21:57:19 system | sending SIGTERM to daphne.1 (pid 249)
awx_1 | 21:57:19 system | sending SIGTERM to dispatcher.1 (pid 253)
awx_1 | 21:57:19 system | sending SIGTERM to receiver.1 (pid 256)
awx_1 | 21:57:19 system | sending SIGTERM to uwsgi.1 (pid 262)
awx_1 | 21:57:19 system | sending SIGTERM to jupyter.1 (pid 265)
awx_1 | 21:57:19 runworker.1 | make: *** wait: No child processes. Stop.
awx_1 | 21:57:19 runworker.1 | make: *** Waiting for unfinished jobs…
awx_1 | 21:57:19 runworker.1 | make: *** wait: No child processes. Stop.
awx_1 | 21:57:19 dispatcher.1 | make: *** [dispatcher] Terminated
awx_1 | 21:57:19 jupyter.1 | make: *** [jupyter] Terminated
awx_1 | 21:57:19 receiver.1 | make: *** [receiver] Terminated
awx_1 | 21:57:19 daphne.1 | make: *** [daphne] Terminated
awx_1 | 21:57:19 system | runworker.1 stopped (rc=2)
awx_1 | 21:57:19 system | dispatcher.1 stopped (rc=-15)
awx_1 | 21:57:19 system | jupyter.1 stopped (rc=-15)
awx_1 | 21:57:19 uwsgi.1 | make: *** [collectstatic] Terminated
awx_1 | 21:57:19 system | uwsgi.1 stopped (rc=-15)
awx_1 | 21:57:19 system | receiver.1 stopped (rc=-15)
awx_1 | 21:57:19 system | daphne.1 stopped (rc=-15)
tools_awx_1 exited with code 2
Hi Danny,
I feel like I've seen this before. If I remember correctly, this error:
nginx: [emerg] getpwnam("nginx")
was due to the fact that my user wasn't a member of the docker group. Can you tell us what command you're calling to get this output? Also, can you run `id` to determine if your user is a member of the docker group?
Hello Jim,
Thanks for your inputs.
I was doing the awx building
make docker-compose-build
make docker-compose
This is where the error occurred.
Best regards.
Okay, can you confirm whether or not you're a member of the docker group? (Again, `id` will show you this).
-Jim
Hello friends,
I have the same problem and my user root is member of the docker group.
$id
uid=0(root) gid=0(root) groups=0(root),994(docker) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
It's been a while since I've run into this, but I think that in order to get things to work I both needed to be a regular user and needed the regular user to be a member of the docker group. Can you try running this as a regular user?
-Jim
Hello Jim
Thanks for yor help. I got it but I have a doubt, When I try to enter to localhost:8043 as the contributing page said https://github.com/ansible/awx/blob/devel/CONTRIBUTING.md
I get a 400 bad request but I could get the web interface in the port 8013. Why I doing bad?
Have you created the superuser? (See [1]). The username / password will be whatever you enter when you run `awx-manage createsuperuser`
[1] https://github.com/ansible/awx/blob/devel/CONTRIBUTING.md#create-an-admin-user
Thanks for your help. I tried it using a regular user and I finally got
it.
Great!
But I'm not sure why when I enter to localhost:8043 I get a 400 bad
request and when I enter to localhost:8013 I get the awx login screen but
the credentials are not admin/password.
8043 maps to a secure connection, while 8013 maps to an insecure connection. When specifying a port, you have to make sure that you use the correct protocol as well. So, the two options are:
https://localhost:8043 (secure)
http://localhost:8013 (insecure)
Both are supported:
https://github.com/ansible/awx/blob/devel/tools/docker-compose/nginx.vh.default.conf#L17
https://github.com/ansible/awx/blob/devel/tools/docker-compose/nginx.vh.default.conf#L65
I just confirmed that I'm able to use both in my environment.
-Jim
Hello Jim,
Thanks a lot.I forgot to create the admin user. And you are right the port 8043 is for secure connection.
Finally I could get a development awx.
-Michael