Failed to get: undefined GET returned: 401 Authentication credentials were not provided.
Closed this issue · 12 comments
ISSUE TYPE
- Bug Report
COMPONENT NAME
- UI
SUMMARY
Clicking nearly any button brings up errors messages. I have deployed being Route 53 and AWS ELB.
ENVIRONMENT
- AWX version: AWX 1.0.2.370
- AWX install method: docker on linux
- Ansible version: 2.4.2.0
- Operating System: Centos 7.3
- Web Browser: Chrome
STEPS TO REPRODUCE
Spin up AWX on Centos 7.3 on EC2, place EC2 port 80 behind ELB.
EXPECTED RESULTS
Errors not to happen.
ACTUAL RESULTS
ADDITIONAL INFORMATION
Logging out and in does not resolve not does using ELB url vs Route53 url
related to #902
On AWS, i seemed to fix this for now, will monitor this for a little. But enabling load balancer generated cookie stickiness
for the classic ELB seems to mitigate this issue. Will close for now and re-open if I see this agian.
woops, just kidding, still seeing this issue...
You'll need to add the settings from: #902
To your AWX settings file that's been deployed in the docker container, in order to obey the X-Forwarded-For header.
@matburt not sure what you mean but 'settings file". I dont see anything that looks like configmap.yml
in the docker deployment
for others that are looking
in container: /etc/tower/setting.py
in build: image_build/files/settings.py
@matburt unfortunately this doesnt resolve my issue, i get the same errors. Please re-open, or I can submit a new ticket. Still trying to debug whats going on.
I am getting the same issue in docker deployment. I added REMOTE_HOST_HEADERS = ['HTTP_X_FORWARDED_FOR']
in /etc/tower/settings.py in container. But it doesn't work.
My versions:
- AWX 1.0.2.101
- Ansible 2.4.2.0
hey @sgykfjsm i found that just adding it to setting.py
inside the container doesnt work, must be the way django instantiate the setting. If you add it to image_build/files/settings.py
and build the image locally it seems to work.
@wallnerryan It works! Thank you very much.
inside the container doesnt work, must be the way django instantiate the setting
Changing this setting does require a restart of the container.
I am using AWX 1.0.4/Docker and just encountered the same issue. It actually worked pretty well before I accessed it once with VPN at home. For my case, however, it's not related to that config. That REMOTE_HOST_HEADERS
line does not exist in my /etc/tower/settings.py
by default either. But It still doesn't work after I added that line and restarted the web container. I got these 401 messages in the log:
2018-03-02 09:40:20,097 INFO awx.api.generics status 401 received by user AnonymousUser attempting to access /api/v2/config/ from my_ip_addr
my_ip_addr - - [02/Mar/2018:09:40:20 +0000] "GET /api/v2/config/ HTTP/1.1" 401 58 "http://my-tower-host/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36" "-"
The only working method for me is to clear the browser's history data for my-tower-host especially the time period when I accessed the AWX with VPN. Then, everything is fine now. Just for those with the similar case with mine.