-
Notifications
You must be signed in to change notification settings - Fork 14
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
Docker events fails on windows #56
Comments
@Sureiya strangely enough it fails on macOS :/ So you have tested with above change and it worked? The reason I ask is that above error can also appear when older version of Docker is installed (the one that doesn't support events). |
Yes I have, I'm running the latest version of docker-desktop in windows.
I'm guessing we may need some more platform independent method to run the
command, or It may be that an upstream bug needs to be filed with docker on
windows? I'm leaning more towards the former.
…On Tue., Jul. 30, 2019, 9:31 p.m. Simon Tsvilik, ***@***.***> wrote:
@Sureiya <https://github.com/Sureiya> strangely enough it fails on macOS
:/ So you have tested with above change and it worked? The reason I ask is
that above error can also appear when older version of Docker is installed
(the one that doesn't support events).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#56>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAB26AZ42UIA2SXKTTPDAUTQCDTQJANCNFSM4IH62PSA>
.
|
@Sureiya sorry for long delay - I'm in the middle of a house move, is there a way you could put together a PR for this fix? |
Is there any workaround for this? |
@Sureiya just to be sure, do you have Win 10 Pro? I need to know how to test this on a Windows VM |
@serbanghita I am using Windows 10 Pro build 1903 |
I'm seeing the same issue running on Ubuntu 16.04.4. I had another installation that was working fine before on the same server but appears to not be working anymore. Docker version 18.06.0-ce, build 0ffa825 However, the fix of adding the quotes did not fix the problem for me. |
I'm embarrassed to say that I made a little mistake and didn't have privileges to run docker. I must have been testing with running the docker image standalone before. Still having some issues but I did resolve that one at least. |
@webOS101 you almost made me think that Docker has fixed that inconsistency - guess not :) |
i see this on mac (10.13.6) running docker 2.1.0.4 (39773). engine 19.03.4. using: wdio-docker-service 2.1.5-rc.0
|
That's with version 2.1.5.rc.0?
…________________________________
From: calltojohn <[email protected]>
Sent: Wednesday, December 4, 2019 8:34:30 AM
To: stsvilik/wdio-docker-service <[email protected]>
Cc: Simon Tsvilik <[email protected]>; Comment <[email protected]>
Subject: Re: [stsvilik/wdio-docker-service] Docker events fails on windows (#56)
i see this on mac (10.13.6) running docker 2.1.0.4 (39773). engine 19.03.4.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#56>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AABC3UEFOQ6FT64RZWPDFYLQW6WWNANCNFSM4IH62PSA>.
|
yeah. 2.1.5-rc.0 |
Would it be too much to ask for any of you to test my PR locally #64. I added a code to handle docker events command based on OS, but looks like it doesn't work. I'm not really setup now to test on Windows :( |
@calltojohn and @webOS101 I have tested latest RC 2.1.5-rc.1 on my Windows machine and it works fine - do you mind giving it another shot? |
I don't use Windows and my problem was unrelated, it was a configuration error on my part. |
closing this issue for now |
Hello! I just tested the latest RC 2.1.5-rc.1 on Windows, and I got the error :( |
@nvega-ms do you mind sharing the error log? I'm testing on Windows 10 Pro 64 bit |
Hi, @stsvilik , I just ran into this issue as well, here is log: Can You, please suggest ho could it be fixed? |
@WeresForce the issue with |
@stsvilik yes, You are absolutely right, my bad, I missed that Docker has stopped on my machine. Thank You for help |
@stsvilik i am still getting this issue.. below is the error log for your reference 2020-01-29T21:16:40.765Z INFO @wdio/cli:launcher: Run onPrepare hook in package.josn i have got this as dependency I am running it on windows.. Can you please advise what's going wrong.. |
@stsvilik below is the config in wdio.conf.js for service as docker.. services: ['docker'], |
Do you mind sharing windows version? Also make sure Docker service is running.
…________________________________
From: kumaramit-bhabra <[email protected]>
Sent: Wednesday, January 29, 2020 4:21:17 PM
To: stsvilik/wdio-docker-service <[email protected]>
Cc: Simon Tsvilik <[email protected]>; Mention <[email protected]>
Subject: Re: [stsvilik/wdio-docker-service] Docker events fails on windows (#56)
@stsvilik<https://github.com/stsvilik> below is the config in wdio.conf.js for service as docker..
services: ['docker'],
dockerLogs: './',
dockerOptions: {
image: 'selenium/standalone-chrome',
healthCheck: 'http://localhost:4444',
options: {
p: ['4444:4444'],
shmSize: '2g'
}
},
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#56>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AABC3UGKC4W5RYJWLFQPZE3RAHXM3ANCNFSM4IH62PSA>.
|
@stsvilik Thanks for the prompt reply. I am using Windows 10 Pro.. Just to be clear, Below are the steps which i am doing FROM node . Used the below command to run it in a container That's when i am getting the issue as mentioned above.. Also, how i can check whether the docker service is running or not? Do i need to install docker within the container to make it work? I am new to docker so just trying to understand.. |
@kumaramit-bhabra Docker service is installed on your machine and runs in the background. On Windows you should see a Docker icon in the toolbar. Dockerfile when its built and runs creates a VM with its own OS. Each running container can map ports of its internally running application on to the host machine. When you expose a port it becomes accessible on your |
@stsvilik thanks a lot for your inputs. I deleted my Docker desktop and re-installed it again but still i am not able to run my test cases in the container.. After re-installing i am still getting the same issue .. Docker services are also up and running. Once you have some time can you please look into this.. |
For reference the image is currently at docker hub amitbhabra/wdio_asos |
@kumaramit-bhabra do you mind going to |
@stsvilik Below is the value printed on console When i checked the computer properties, it say it's 64 bit. I have tried by exposing the port 4444 but no luck.. |
@stsvilik Below is the error log for your reference.. hope this might be useful 2020-01-31T13:46:00.326Z INFO @wdio/local-runner: Start worker 0-0 with arg: |
Help me understand what are you trying to test. Is your image running your application or selenium?
If your image runs your own application, then you need to run selenium in addition to your app (example is provided in wiki). If your image contains selenium, then your app must be hosted elsewhere on the web or locally.
Port 4444 belongs to selenium which actually automates all the tests.
…________________________________
From: kumaramit-bhabra <[email protected]>
Sent: Friday, January 31, 2020 8:50:23 AM
To: stsvilik/wdio-docker-service <[email protected]>
Cc: Simon Tsvilik <[email protected]>; Mention <[email protected]>
Subject: Re: [stsvilik/wdio-docker-service] Docker events fails on windows (#56)
@stsvilik<https://github.com/stsvilik> Below is the error log for your reference.. hope this might be useful
2020-01-31T13:46:00.326Z INFO @wdio/local-runner: Start worker 0-0 with arg:
2020-01-31T13:46:00.434Z ERROR wdio-docker-service: Error: Error executing sub-child: docker events --format {{json\ .}} --filter image=selenium/standalone-chrome
at DockerEventsListener._onMessage (/usr/app/node_modules/wdio-docker-service/lib/utils/dockerEventsListener.js:67:21)
at ChildProcess.emit (events.js:321:20)
at ChildProcess.EventEmitter.emit (domain.js:485:12)
at emit (internal/child_process.js:881:12)
at processTicksAndRejections (internal/process/task_queues.js:85:21)
2020-01-31T13:46:00.444Z WARN wdio-docker-service: Disconnecting dockerEventsListener: 44
[0-0] 2020-01-31T13:46:01.619Z INFO @wdio/local-runner: Run worker command: run
[0-0] RUNNING in chrome - /tests/landingPageTest.js
[0-0] 2020-01-31T13:46:02.111Z INFO webdriverio: Initiate new session using the webdriver protocol
[0-0] 2020-01-31T13:46:02.129Z INFO webdriver: [POST] http://127.0.0.1:4444/wd/hub/session
[0-0] 2020-01-31T13:46:02.130Z INFO webdriver: DATA {
capabilities: { alwaysMatch: { browserName: 'chrome' }, firstMatch: [ {} ] },
desiredCapabilities: { browserName: 'chrome' }
}
[0-0] 2020-01-31T13:46:02.224Z WARN webdriver: Request failed due to connect ECONNREFUSED 127.0.0.1:4444
[0-0] 2020-01-31T13:46:02.224Z INFO webdriver: Retrying 1/3
2020-01-31T13:46:02.225Z INFO webdriver: [POST] http://127.0.0.1:4444/wd/hub/session
2020-01-31T13:46:02.225Z INFO webdriver: DATA {
capabilities: { alwaysMatch: { browserName: 'chrome' }, firstMatch: [ {} ] },
desiredCapabilities: { browserName: 'chrome' }
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#56>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AABC3UFD5XDSWTRDRML6VZDRAQUB7ANCNFSM4IH62PSA>.
|
Thanks @stsvilik. I know we are talking about Windows here. On my personal MAC everything works fine but I am getting same error:
|
Upsetting part is that everything works on my Windows 10 at home :(. Would you be able to echo value of `process.plarform` in Node running on your CI?
…________________________________
From: prathameshnyt <[email protected]>
Sent: Tuesday, February 4, 2020 9:47:39 AM
To: stsvilik/wdio-docker-service <[email protected]>
Cc: Simon Tsvilik <[email protected]>; Mention <[email protected]>
Subject: Re: [stsvilik/wdio-docker-service] Docker events fails on windows (#56)
Thanks @stsvilik<https://github.com/stsvilik>. I know we are talking about Windows here. On my personal MAC everything works fine but I am getting same error:
2020-02-04T14:38:11.092Z ERROR wdio-docker-service: Error: Error executing sub-child: docker events --format {{json\ .}} --filter image=<image> with latest release while running the same tests as part of CI/CD pipeline. We are using https://drone.io/ and deployed using drone-terraform. Can you please suggest?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#56>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AABC3UETUEMUWCBHLG7HBYDRBF5YXANCNFSM4IH62PSA>.
|
Hi @stsvilik , in case of my local MAC it's |
@prathameshnyt thank you for that! As I don't have all possible environments to test on this sort of information is really important. I believe that core of this issue is in that difference between how Docker on different OS's works. I did not know that linux was also a subject to this issue as the CI this package tests run on is also a Linux OS. I will look into running more tests under various systems. |
Thank you so much @stsvilik for looking into it. Thanks, |
@prathameshnyt apparently my refactoring of options serialization code few PR's ago also eliminated the need to format that docker events JSON option differently for different OS's (who knew). With that said please give a shot to my latest version |
#63, Still its not working for me. |
Thanks @stsvilik. Getting same error with Thanks, |
I guess it's something else. Anyway for you to get a printout of the log file generated by service?
…________________________________
From: prathameshnyt <[email protected]>
Sent: Wednesday, February 5, 2020 9:15:07 AM
To: stsvilik/wdio-docker-service <[email protected]>
Cc: Simon Tsvilik <[email protected]>; Mention <[email protected]>
Subject: Re: [stsvilik/wdio-docker-service] Docker events fails on windows (#56)
Thanks @stsvilik<https://github.com/stsvilik>. Getting same error with 2.3.0 version.
Thanks,
Prathamesh
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#56>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AABC3UGGF35CWZOYYP77OWDRBLCWXANCNFSM4IH62PSA>.
|
I will check. Thanks. |
I see the same error #63 (comment) Thanks, Prathamesh |
Maybe, it's not waiting for Docker to come up as per the healthCheck:
I killed docker application and started again on my local machine MAC, but before it starts completely, If I run the test, I am seeing above error. Thanks, |
This is likely the issue, since starting docker doesn't guarantee the start of the app.
…________________________________
From: prathameshnyt <[email protected]>
Sent: Wednesday, February 5, 2020 2:55:19 PM
To: stsvilik/wdio-docker-service <[email protected]>
Cc: Simon Tsvilik <[email protected]>; Mention <[email protected]>
Subject: Re: [stsvilik/wdio-docker-service] Docker events fails on windows (#56)
May, it's not waiting for Docker to come up and not retrying as well though we have
healthCheck: {
url: 'http://localhost:4444',
maxRetries: 3,
inspectInterval: 2000,
startDelay: 5000
},
I killed docker application and started again on my local machine MAC, but before it starts completely, If I run the test, I am seeing above error.
Thanks,
Prathamesh
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#56>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AABC3UAXLMTJGTPDJD65OGTRBMKSPANCNFSM4IH62PSA>.
|
@stsvilik , can you please check if startDelay setting works for you? Thanks. |
@prathameshnyt Yes it does. Here is how I set that healthCheck: {
url: 'http://localhost:4444',
startDelay: 15000
}, |
@prathameshnyt One thing to note that service will try to use native docker healthcheck event to start testing earlier. What this means is if Dockerfile has |
Ok, thanks. Not sure, why it's not waiting in my case. I have tried now with Thanks, |
I see health-check adding-a-healthcheck-to-the-grid added to Base image Dockerfile |
Currently this does not work with docker on windows.
The following change to dockerEvents.js fixes it.
The text was updated successfully, but these errors were encountered: