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

stdout capture is missing #9

Open
datpham23 opened this issue May 26, 2017 · 16 comments
Open

stdout capture is missing #9

datpham23 opened this issue May 26, 2017 · 16 comments

Comments

@datpham23
Copy link

datpham23 commented May 26, 2017

Can't execute any jobs, getting the following error in the standard out panel:
stdout capture is missing

Tried the image on my mac and linux box.

@ybalt
Copy link
Owner

ybalt commented Jun 1, 2017

What docker parameters you used for running?

@datpham23
Copy link
Author

I ran it w/ the basic parameters you had in your readme.

docker run -d -p 443:443 --name tower lardos/ansible-tower

@tchellomello
Copy link
Contributor

Same issue here. Looking at the logs this is the error:

==> tower.log <==
2018-02-07 07:38:08,064 ERROR    awx.main.tasks project_update 45 execution encountered exception.
Traceback (most recent call last):
  File "/var/lib/awx/venv/awx/local/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/var/lib/awx/venv/awx/local/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__
    return self.run(*args, **kwargs)
  File "/tmp/buildd/ansible-tower-3.2.1/debian/ansible-tower/usr/lib/python2.7/dist-packages/awx/main/tasks.py", line 466, in _wrapped
  File "/tmp/buildd/ansible-tower-3.2.1/debian/ansible-tower/usr/lib/python2.7/dist-packages/awx/main/tasks.py", line 915, in run
Exception: project_update 45 (error) encountered an error (rc=None), please see task stdout for details.

@tchellomello
Copy link
Contributor

To workaround the issue, I've expected the volume /var/lib/awx and create a directory with my playbook to test under the projects subdir, however whenever trying to execute it throws the error:

Traceback (most recent call last):
File "/tmp/buildd/ansible-tower-3.2.1/debian/ansible-tower/usr/lib/python2.7/dist-packages/awx/main/tasks.py", line 839, in run
RuntimeError: bubblewrap is not installed

@ybalt
Copy link
Owner

ybalt commented Feb 7, 2018

@tchellomello it's strange issues, as Ansible Tower in docker installed via official playbook and it should install all needed dependencies.

@tchellomello
Copy link
Contributor

@ybalt yes, I'm trying to troubleshoot why this is not working.

I'm currently running the image 0fa5972fcdfa

docker.io/ybalt/ansible-tower latest 0fa5972fcdfa 5 weeks ago 1.37 GB

@ybalt
Copy link
Owner

ybalt commented Feb 7, 2018

@ you can try to build docker image by yourself, during the process it will show how dep install work

@tchellomello
Copy link
Contributor

@ybalt I think I found the problem. I had a similar issue with the pihole image too as I'm running on Fedora. It seems the systemd is not being able to spawn and the workaround is to provide a mount dir for the /run. I did that and worked on my environment. I also found another issue that I'm sending you a patch shortly. I'll keep you posted.

@ybalt
Copy link
Owner

ybalt commented Feb 7, 2018

@tchellomello thanks!

@ybalt
Copy link
Owner

ybalt commented Feb 7, 2018

PR merged, need some time for Docker Hub to build new image

@tchellomello
Copy link
Contributor

tchellomello commented Feb 7, 2018

@ybalt Thanks for accepting #16. I'm now testing the changes on a local build and I'll let you know the results. That PR still does not fix the problems related on this issue, but I think we are almost there.

@tchellomello
Copy link
Contributor

@ybalt ok, after troubleshooting I not able to experience the issue only when the image is running with privileged. When the container is running without the privileged option, the git repository does not sync and only show the error "stdout capture is missing".

Plus when trying to execute a playbook, I get the error:

==> tower.log <==
2018-02-07 09:01:03,444 ERROR    awx.main.tasks job 248 execution encountered exception.
Traceback (most recent call last):
  File "/var/lib/awx/venv/awx/local/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/var/lib/awx/venv/awx/local/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__
    return self.run(*args, **kwargs)
  File "/tmp/buildd/ansible-tower-3.2.1/debian/ansible-tower/usr/lib/python2.7/dist-packages/awx/main/tasks.py", line 466, in _wrapped
  File "/tmp/buildd/ansible-tower-3.2.1/debian/ansible-tower/usr/lib/python2.7/dist-packages/awx/main/tasks.py", line 915, in run
Exception: job 248 (error) encountered an error (rc=None), please see task stdout for details.

however this does not occur when running with priviliged.

@datpham23 could you try to run the container with --privileged to see if the error goes away?

@tchellomello
Copy link
Contributor

It could be related to a permission under /dev directory for stdout or stderr. I'll try to run a rpdb on that code to see if we can find as running as privileged is not the best solution.

@BlackCorsair
Copy link

Hello,
I had the same issue: if I don't have the '--privileged' flag, when I run anything it will show stdout capture is missing.
Also, the project wouldn't sync with github. But I found something that may be the cause:

I create the container with the following commands:

docker create -v /var/lib/postgresql/9.6/main --name tower-data ybalt/ansible-tower /bin/true
docker run -d -p 8443:443 -v ~/ansible_projects:/var/lib/awx/projects --volumes-from tower-data --name ansible-tower --privileged ybalt/ansible-tower

And then, I noticed that on the container, there are two projects directories:

root@4b138f244a8a:/var/lib/awx# ll
total 44
drwxr-xr-x 1 awx  awx    108 May 31 12:28 ./
drwxr-xr-x 1 root root    33 Mar 14 19:45 ../
drwx------ 3 awx  awx     17 May 31 12:08 .ansible/
-rw------- 1 awx  awx    126 May 31 12:31 .bash_history
drwx------ 2 awx  awx      6 Mar 14 19:46 .ssh/
-rw-r--r-- 1 root root     5 Mar 14 20:03 .tower_version
prw------- 1 awx  awx      0 May 31 12:21 awxfifo|
-rw-r--r-- 1 awx  awx  16384 May 31 12:36 beat.db
-rw-r--r-- 1 root root 15086 Oct 11  2017 favicon.ico
drwxr-x--- 1 awx  awx    308 May 31 12:32 job_status/
drwxr-xr-x 3 awx  awx     55 May 31 12:32 projects/
drwxr-xr-x 2 root root     6 May 31 10:49 projects,/
drwxr-xr-x 3 root awx     20 Mar 14 19:46 public/
drwxr-xr-x 4 root root    32 Mar 14 19:42 venv/
-rw-r--r-- 1 root root   200 Oct 11  2017 wsgi.py

The "projects," have the right ownership (awx:awx), but the correct directory "projects" has the same ownership as the host docker user (root). When I changed the permissions from the container, it resolved correctly and the project started syncing.

@debovis
Copy link

debovis commented Aug 14, 2019

@BlackCorsair I am having the same issues. Project is not sync-ing and stdout capture is missing. Did you find a solution?

@debovis
Copy link

debovis commented Aug 14, 2019

Vagrant is the better option

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

5 participants