Closed liulirun closed 6 years ago
@liulirun could you show me an example Selenium URL when going through Ggr? Should be something like:
http://griduser:<password>@your-ggr-host.example.com:4444/wd/hub
Thank you so much for your reply.
http://griduser:
http://griduser:@your-ggr-host.example.com:4444 also looks like
ggr docker logs looks like:
2018/03/01 17:03:01 [17] [-] [QUOTA_INFO_REQUESTED] [griduser] [172.22.9.113] [-] [-] [-] [-] [-] 2018/03/01 17:03:01 [18] [-] [QUOTA_INFO_REQUESTED] [griduser] [172.22.9.113] [-] [-] [-] [-] [-] 2018/03/01 17:03:01 [19] [-] [QUOTA_INFO_REQUESTED] [griduser] [172.22.9.113] [-] [-] [-] [-] [-] 2018/03/01 17:03:01 [20] [-] [QUOTA_INFO_REQUESTED] [griduser] [172.22.9.113] [-] [-] [-] [-] [-] 2018/03/01 17:03:01 [21] [-] [QUOTA_INFO_REQUESTED] [griduser] [172.22.9.113] [-] [-] [-] [-] [-] 2018/03/01 17:03:01 [22] [-] [QUOTA_INFO_REQUESTED] [griduser] [172.22.9.113] [-] [-] [-] [-] [-] 2018/03/01 17:03:02 [23] [-] [QUOTA_INFO_REQUESTED] [griduser] [172.22.9.113] [-] [-] [-] [-] [-] 2018/03/01 17:03:02 [24] [-] [QUOTA_INFO_REQUESTED] [griduser] [172.22.9.113] [-] [-] [-] [-] [-] 2018/03/01 17:03:02 [25] [-] [QUOTA_INFO_REQUESTED] [griduser] [172.22.9.113] [-] [-] [-] [-] [-] 2018/03/01 17:03:02 [26] [-] [QUOTA_INFO_REQUESTED] [griduser] [172.22.9.113] [-] [-] [-] [-] [-] 2018/03/01 17:03:02 [27] [-] [QUOTA_INFO_REQUESTED] [griduser] [172.22.9.113] [-] [-] [-] [-] [-] 2018/03/01 17:03:03 [28] [-] [QUOTA_INFO_REQUESTED] [griduser] [172.22.9.113] [-] [-] [-] [-] [-] 2018/03/01 19:19:55 [29] [-] [QUOTA_INFO_REQUESTED] [griduser] [172.22.9.113] [-] [-] [-] [-] [-] 2018/03/01 23:36:47 [30] [-] [QUOTA_INFO_REQUESTED] [griduser] [172.22.9.113] [-] [-] [-] [-] [-]
I am using cmd to start docker run -d --name ggr -v /etc/grid-router/:/etc/grid-router:ro --net host aerokube/ggr:latest-release
docker ps shows:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7cd6139ab9f5 aerokube/ggr:latest-release "/usr/bin/ggr -liste…" 7 hours ago Up 7 hours ggr
@liulirun I see that according to your logs authentication is working correctly when you do requests to /quota
API.
2018/03/01 23:36:47 [30] [-] [QUOTA_INFO_REQUESTED] [griduser] [172.22.9.113] [-] [-] [-] [-] [-]
However there are no requests for new sessions. Please check that your password for /quota
API is the same that in tests.
I think I know where the problem is :
the screenshot I took is from other computers, with browser. So http://griduser:password@your-ggr-host.example.com:4444/quota looks good -- that's not count.
If I tried from ggr server itself, I can not vnc to it, thought it is ubuntu 16.3 LTS. So I could not open browser on ggr server itself.
if I run curl http://172.24.23.231:4444/quota
, I will get 401 Unauthorized
as a result.
My real password contains some special character like , ! etc, say password is "blah!" when I run curl http://griduser:blah*!@172.24.23.231:4444/quota
, I will get -bash: !@172.24.23.231: event not found
as a result.
If I try: curl http://griduser:<blah*!>@172.24.23.231:4444/quota
I will get -bash: !@172.24.23.231: event not found
as a result.
I think somehow this how bash treat special characters, trying to find if I could fix it. But your suggestion would also be very welcomed.
ok, using character skipping works here. So I change the command to
http://griduser:blah\*\!@172.24.23.231:4444/quota
from ggr linux server, I got correct quota:
[{"Name":"chrome","DefaultVersion":"64.0","Versions":[{"Number":"64.0","Regions":[{"Name":"1","Hosts":[{"Name":"172.24.23.232","Port":4444,"Count":8,"Username":"griduser","Password":"blah*!","VNC":"","Scheme":""},{"Name":"172.24.23.235","Port":4444,"Count":6,"Username":"","Password":"","VNC":"","Scheme":""}]}]}]}]
@liulirun does it then works for tests with the same password?
It works as expected. perfect, thank you so much for the help! I will close this issue
Glad to hear!
I am facing the exact same issue as https://github.com/aerokube/ggr/issues/176, but it could not be resolved using the same fix.
I get a 401 Unauthorized, when running the test:
"http://test:testpassword@
if I enter http://test:testpassword@10.222.26.74:4444/quota on the browser , it still prompts me for a username and password. If I enter the same credentials, it still gives me a '401 Unauthorized"
there are no messages in the ggr container log. All I have is: 2019/11/20 12:37:56 [-] [-] [INIT] [-] [-] [-] [-] [-] [-] [Users file is "/etc/grid-router/users.htpasswd"] 2019/11/20 12:37:56 [-] [-] [INIT] [-] [-] [-] [-] [-] [-] [Loading configuration files from "/etc/grid-router/quota"]
My quota file is /etc/grid-router/quota/test.xml
The UI URL at port 8080 correctly shows this ggr linked to all the selenoid hosts, and the total quota count.
When I run selenium tests against ggr. I got
To compare, if I run the case against selenoid server( .232, .235 box) itself, success. So I am pretty convinced the problem goes with the configuration of ggr box in my box.
=========================================== some conf: IP: 172.24.23.231, ggr server. ggr is latest version. Ubuntu 16.3 LTS . This is also act like a Jenkins slave node. But I do not think that would be the matter.
user: griduser in
/etc/grid-router/
, I haveusers.htpasswd
, it looks like below, havegriduser
configedgriduser:$apr1$9qdedDks$I1ADq.aQ.f3a7sEMlfiZn2
in
/etc/grid-router/quota
, I havegriduser.xml
,hitting
http://172.24.23.231:4444/quota
returns[{"Name":"chrome","DefaultVersion":"64.0","Versions":[{"Number":"64.0","Regions":[{"Name":"1","Hosts":[{"Name":"172.24.23.232","Port":4444,"Count":8,"Username":"griduser","Password":"blah","VNC":"","Scheme":""},{"Name":"172.24.23.235","Port":4444,"Count":6,"Username":"","Password":"","VNC":"","Scheme":""}]}]}]}]
I have a another Linux ( 16.3 LTS ) as selenoid docker server IP: 172.24.23.232, selenoid container server. latest version. Ubuntu 16.3 LTS. user: griduser
the browsers.conf looks like:
and it is started, so hitting http://172.24.23.232:4444/status returns
{"total":10,"used":0,"queued":0,"pending":0,"browsers":{"chrome":{"64.0":{}}}}
though hitting http://172.24.23.232:4444 or http://172.24.23.232:4444/wd/hub always get 404 page not found.-- which should be fine
======================
another Linux ( 16.3 LTS ) as selenoid docker server IP: 172.24.23.235 settings are more or less the same
======================
Sadly I did not find any similiar error in the old bug, also I am pretty sure must be somewhere in my configuration cause the problem, but need some directions how to dive deeper. Thank you!