Git Product home page Git Product logo

Comments (21)

vania-pooh avatar vania-pooh commented on July 16, 2024 1

After discussing this stuff with guys I can state that "permission denied" is distribution specific Docker issue. In order to be as simple as possible and distribution-agnostic cm should not contain such specific hacks. Closing for the moment. But this can be reopened if more facts come into play.

from cm.

aandryashin avatar aandryashin commented on July 16, 2024

from cm.

rekby avatar rekby commented on July 16, 2024
[root@localhost ~]# DOCKER_API_VERSION=1.24 ./cm_1.2.1 selenoid cleanup
2017/07/19 09:08:46 Using Docker...
2017/07/19 09:08:46 registry.ping url=https://registry.hub.docker.com/v2/
2017/07/19 09:08:48 Selenoid is not running
2017/07/19 09:08:48 Successfully removed configuration directory


[root@localhost ~]# DOCKER_API_VERSION=1.24 ./cm_1.2.1 selenoid cleanup
2017/07/19 09:08:46 Using Docker...
2017/07/19 09:08:46 registry.ping url=https://registry.hub.docker.com/v2/
2017/07/19 09:08:48 Selenoid is not running
2017/07/19 09:08:48 Successfully removed configuration directory
[root@localhost ~]# DOCKER_API_VERSION=1.24 ./cm_1.2.1 selenoid start
2017/07/19 09:09:18 Using Docker...
2017/07/19 09:09:18 registry.ping url=https://registry.hub.docker.com/v2/
2017/07/19 09:09:20 Downloading Selenoid...
2017/07/19 09:09:20 Fetching tags for image "aerokube/selenoid"...
2017/07/19 09:09:20 registry.tags url=https://registry.hub.docker.com/v2/aerokube/selenoid/tags/list repository=aerokube/selenoid
2017/07/19 09:09:22 Trying to pull repository docker.io/aerokube/selenoid ... :
2017/07/19 09:09:24 Pulling from docker.io/aerokube/selenoid: latest-release
2017/07/19 09:09:24 Digest: sha256:32f6fb08178398a18f3b19e98b40cd8fb8e49941c527bf74045714f6df10cd66: latest-release
2017/07/19 09:09:24 Configuring Selenoid...
2017/07/19 09:09:24 Processing browser "firefox"...
2017/07/19 09:09:24 Fetching tags for image "selenoid/firefox"...
2017/07/19 09:09:24 registry.tags url=https://registry.hub.docker.com/v2/selenoid/firefox/tags/list repository=selenoid/firefox
2017/07/19 09:09:25 Pulling image "selenoid/firefox:54.0"...
2017/07/19 09:09:25 Trying to pull repository docker.io/selenoid/firefox ... :
2017/07/19 09:09:27 Pulling from docker.io/selenoid/firefox: 54.0
2017/07/19 09:09:27 Digest: sha256:a02a7558748da61720276d23edc8360ca18c2921f1593bcc992678b02e21402c: 54.0
2017/07/19 09:09:27 Pulling image "selenoid/firefox:53.0"...
2017/07/19 09:09:27 Trying to pull repository docker.io/selenoid/firefox ... :
2017/07/19 09:09:29 Pulling from docker.io/selenoid/firefox: 53.0
2017/07/19 09:09:29 Digest: sha256:5a4e4a6dfa423cddee9cb3f85d08ac93660284f69fb09a0a30f9953e676089e4: 53.0
2017/07/19 09:09:29 Processing browser "chrome"...
2017/07/19 09:09:29 Fetching tags for image "selenoid/chrome"...
2017/07/19 09:09:29 registry.tags url=https://registry.hub.docker.com/v2/selenoid/chrome/tags/list repository=selenoid/chrome
2017/07/19 09:09:30 Pulling image "selenoid/chrome:59.0"...
2017/07/19 09:09:30 Trying to pull repository docker.io/selenoid/chrome ... :
2017/07/19 09:09:32 Pulling from docker.io/selenoid/chrome: 59.0
2017/07/19 09:09:32 Digest: sha256:e08cbe17e5c50317056819f6e1a6487772caa01dc6309899f661e1a27fdb6b8e: 59.0
2017/07/19 09:09:32 Pulling image "selenoid/chrome:58.0"...
2017/07/19 09:09:32 Trying to pull repository docker.io/selenoid/chrome ... :
2017/07/19 09:09:34 Pulling from docker.io/selenoid/chrome: 58.0
2017/07/19 09:09:34 Digest: sha256:e624734a79f694b53cd06ae0160312a96c0790b7f09aed862b0b556a03b2755e: 58.0
2017/07/19 09:09:34 Processing browser "opera"...
2017/07/19 09:09:34 Fetching tags for image "selenoid/opera"...
2017/07/19 09:09:34 registry.tags url=https://registry.hub.docker.com/v2/selenoid/opera/tags/list repository=selenoid/opera
2017/07/19 09:09:35 Pulling image "selenoid/opera:46.0"...
2017/07/19 09:09:35 Trying to pull repository docker.io/selenoid/opera ... :
2017/07/19 09:09:37 Pulling from docker.io/selenoid/opera: 46.0
2017/07/19 09:09:37 Digest: sha256:32e01029a915222b83eb2fc51a820b131ede5c5dba2f60deff753318f3c869cf: 46.0
2017/07/19 09:09:37 Pulling image "selenoid/opera:45.0"...
2017/07/19 09:09:37 Trying to pull repository docker.io/selenoid/opera ... :
2017/07/19 09:09:39 Pulling from docker.io/selenoid/opera: 45.0
2017/07/19 09:09:39 Digest: sha256:54ad7dd12f378c8661af0b572b34affcb1d33bc018d9add759118840338eb4df: 45.0
2017/07/19 09:09:39 Successfully saved configuration to /root/.aerokube/selenoid/browsers.json
2017/07/19 09:09:39 Starting Selenoid...
2017/07/19 09:09:39 Failed to start: Selenoid image is not downloaded: this is probably a bug

I tried complete remove .aerokube and all docker images

[root@localhost ~]# rm -rf .aerokube/
[root@localhost ~]# for i in `docker images -q`; do docker rmi $i; done

then start
DOCKER_API_VERSION=1.24 ./cm_1.2.1 selenoid start

It fails with same result

from cm.

rekby avatar rekby commented on July 16, 2024

docker images now:

REPOSITORY                    TAG                 IMAGE ID            CREATED             SIZE
docker.io/selenoid/opera      46.0                57ef879acaca        3 weeks ago         659.4 MB
docker.io/aerokube/selenoid   latest-release      93ee78105aa5        4 weeks ago         12.88 MB
docker.io/selenoid/firefox    54.0                16c76a9611e6        4 weeks ago         596.8 MB
docker.io/selenoid/chrome     59.0                69f2765a857b        5 weeks ago         715.1 MB
docker.io/selenoid/opera      45.0                8d0081974280        9 weeks ago         620.4 MB
docker.io/selenoid/firefox    53.0                603932e78430        10 weeks ago        712 MB
docker.io/selenoid/chrome     58.0                366d993edd78        3 months ago        649.8 MB

from cm.

vania-pooh avatar vania-pooh commented on July 16, 2024

Hmm... Very interesting. It should not download latest-release, only an exact version. Seems to be a bug.

from cm.

vania-pooh avatar vania-pooh commented on July 16, 2024

@rekby could you also please copy the output of:

# docker inspect aerokube/selenoid:latest-release

from cm.

rekby avatar rekby commented on July 16, 2024
[root@localhost ~]# docker inspect aerokube/selenoid:latest-release
[
    {
        "Id": "sha256:93868437854477ab0b6c14dc3cfc930fad89a8367663caab9198cde9980c9480",
        "RepoTags": [
            "docker.io/aerokube/selenoid:latest-release"
        ],
        "RepoDigests": [
            "docker.io/aerokube/selenoid@sha256:cfd14f1142111d106d0598d5298677445c172427f5ed75a937b6ad81c6b4b150"
        ],
        "Parent": "",
        "Comment": "",
        "Created": "2017-07-19T13:07:19.41012841Z",
        "Container": "27d423aac40a926f64535fe7ec51932eee638c404b2e3056d6e6842d1d5c0d13",
        "ContainerConfig": {
            "Hostname": "3009dd4da609",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "4444/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Cmd": [
                "/bin/sh",
                "-c",
                "#(nop) ",
                "ENTRYPOINT [\"/usr/bin/selenoid\" \"-listen\" \":4444\" \"-conf\" \"/etc/selenoid/browsers.json\"]"
            ],
            "ArgsEscaped": true,
            "Image": "sha256:7ddd18a1b1265ee0a5f9eea5a4dc23faadec95300a4b12bd5a36aba36a1913d2",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": [
                "/usr/bin/selenoid",
                "-listen",
                ":4444",
                "-conf",
                "/etc/selenoid/browsers.json"
            ],
            "OnBuild": [],
            "Labels": {}
        },
        "DockerVersion": "17.03.1-ce",
        "Author": "",
        "Config": {
            "Hostname": "3009dd4da609",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "4444/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Cmd": null,
            "ArgsEscaped": true,
            "Image": "sha256:7ddd18a1b1265ee0a5f9eea5a4dc23faadec95300a4b12bd5a36aba36a1913d2",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": [
                "/usr/bin/selenoid",
                "-listen",
                ":4444",
                "-conf",
                "/etc/selenoid/browsers.json"
            ],
            "OnBuild": [],
            "Labels": {}
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 13036124,
        "VirtualSize": 13036124,
        "GraphDriver": {
            "Name": "devicemapper",
            "Data": {
                "DeviceId": "97",
                "DeviceName": "docker-253:0-153142-18f13fabe40866d09838d0d01dc34440847b7b247e81aaceeeafd2816fd8a2e3",
                "DeviceSize": "10737418240"
            }
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:040fd7841192c4f283485d5c7817f4508a774a8fabef8fc265c87f4d2a2ae635",
                "sha256:efdc8457ea9bdef3010102cdb0b18ab8060b034f73a7ce5dcd722759fbe127a1",
                "sha256:27ad58802f65c8849230eac6e4f43da6be52475e059a2de435b49b60b1a4ac55"
            ]
        }
    }
]

from cm.

vania-pooh avatar vania-pooh commented on July 16, 2024

@rekby: ok, I fixed the issue with downloading latest-release but still don't get why you get Selenoid image is not downloaded: this is probably a bug error. I would like to build a development version of cm so you could test it. Are you using Mac or Linux to run cm?

from cm.

rekby avatar rekby commented on July 16, 2024

I use linux, clean centos 7 + docker

from cm.

vania-pooh avatar vania-pooh commented on July 16, 2024

Please try again with this binary (zipped because otherwise Github is refusing to upload the file).
cm_linux_amd64.zip With this version it should at least download an exact version (should be 1.3.3 for the moment). Not sure whether this will resolve the second issue.

from cm.

rekby avatar rekby commented on July 16, 2024

same error

[root@localhost ~]# ./cm_linux_amd64 version
Git Revision: HEAD
UTC Build Time: unknown
[root@localhost ~]# ./cm_linux_amd64 selenoid start
2017/07/20 09:59:04 Using Docker...
2017/07/20 09:59:04 registry.ping url=https://registry.hub.docker.com/v2/
2017/07/20 09:59:06 Downloading Selenoid...
2017/07/20 09:59:06 Fetching tags for image "aerokube/selenoid"...
2017/07/20 09:59:06 registry.tags url=https://registry.hub.docker.com/v2/aerokube/selenoid/tags/list repository=aerokube/selenoid
2017/07/20 09:59:07 Trying to pull repository docker.io/aerokube/selenoid ... :
2017/07/20 09:59:09 Pulling from docker.io/aerokube/selenoid: 1.3.3
2017/07/20 09:59:09 Digest: sha256:cfd14f1142111d106d0598d5298677445c172427f5ed75a937b6ad81c6b4b150: 1.3.3
2017/07/20 09:59:09 Selenoid is already configured
2017/07/20 09:59:09 Starting Selenoid...
2017/07/20 09:59:09 Failed to start: Selenoid image is not downloaded: this is probably a bug

from cm.

vania-pooh avatar vania-pooh commented on July 16, 2024

Ok. Let me try to reproduce myself. At least the issue with latest-release is fixed.

from cm.

vania-pooh avatar vania-pooh commented on July 16, 2024

Can not reproduce. Tried with the same binary as you and the following environment.

[root@9218d654fe40 /]# docker ps -a
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS              PORTS                    NAMES
555f200a940f        aerokube/selenoid:1.3.3   "/usr/bin/selenoid..."   7 seconds ago       Up 3 seconds        0.0.0.0:4444->4444/tcp   selenoid
[root@9218d654fe40 /]# docker version
Client:
 Version:      17.06.0-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:20:36 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.06.0-ce
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:21:56 2017
 OS/Arch:      linux/amd64
 Experimental: false
[root@9218d654fe40 /]# uname -a
Linux 9218d654fe40 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:42 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@9218d654fe40 /]# rpm --query centos-release
centos-release-7-3.1611.el7.centos.x86_64
[root@9218d654fe40 /]# docker logs selenoid
2017/07/20 12:53:03 Loading configuration files...
2017/07/20 12:53:03 Loaded configuration from [/etc/selenoid/browsers.json]
2017/07/20 12:53:03 Using default containers log configuration because of: read error: open config/container-logs.json: no such file or directory
2017/07/20 12:53:03 Timezone: UTC
2017/07/20 12:53:03 Listening on :4444

I just started centos:7 in privileged Docker container, then installed Docker inside according to instructions: https://docs.docker.com/engine/installation/linux/docker-ce/centos/#install-using-the-repository, then typed: ./cm selenoid start. Please type # docker version and check that your API version corresponds to what you are specifying to cm.

from cm.

vania-pooh avatar vania-pooh commented on July 16, 2024

@rekby any updates?

from cm.

rekby avatar rekby commented on July 16, 2024

from cm.

rekby avatar rekby commented on July 16, 2024

I have error in my centos7 environments (without docker).
At home I try it in virtualbox.

For debug purpose I have created public VDS Centos 7, I have sended credentials for access to VDS by email.

It is test VDS - I doesn't need anything into it - you can do anything what you want to debug selenoid.

The VDS will be remove after your work.

from cm.

vania-pooh avatar vania-pooh commented on July 16, 2024

I can confirm that this is reproducing on your VM. Investigating it.

from cm.

vania-pooh avatar vania-pooh commented on July 16, 2024

Here is the new cm binary: cm.zip Just by running cm selenoid start with this binary you are getting Selenoid container started but failing to load browsers.json because of permission denied for /etc/selenoid/browsers.json. The latter issue is a SELinux one (https://stackoverflow.com/questions/24288616/permission-denied-on-accessing-host-directory-in-docker) and I just typed su -c "setenforce 0" and it started. So now your VM contains running and working Selenoid. Please test again but I think the issue is fixed.

from cm.

rekby avatar rekby commented on July 16, 2024

Yes, it is work with disabled selinux.

And after initialization with setenforce 0 it will start after enable selinux and reboot.
I think selinux deny somethink on initialization only?

Can you try to run docker with :z or :Z mount option option (man docker-run, search by :z) for work containers with enabled selinux?

from cm.

vania-pooh avatar vania-pooh commented on July 16, 2024

I think instead of trying to add some hacks to cm code you just need to remove --selinux-enabled flag from Docker startup command globally.

from cm.

rekby avatar rekby commented on July 16, 2024

I think it is addition, but not hack.
with :z you allow to use external files by containers, it is normal flag for docker mount.

exec 'setenforce 0' from cm - is hack, add mount option I think - good.

In my scenario it isn't important - I can compete disable selinux or use debian or something else - the VDS may be dedicated for selenoid.
But I think it will good for other users who will start selenoid in centos.

from cm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.