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

Newbie help again #133

Closed
roblhibbard opened this issue Jan 21, 2019 · 23 comments
Closed

Newbie help again #133

roblhibbard opened this issue Jan 21, 2019 · 23 comments
Labels
question General questions are welcome

Comments

@roblhibbard
Copy link

I decided to start from scratch on a testbox and all was going well until I decided to remove all volumes, containers and such.

I removed the tutor directory also.

Started with the quick start and get an error stating:

Host '172.18.0.1' is not allowed to connect to this MySQL.

any suggestions.

thank you,

Robert H

@regisb
Copy link
Contributor

regisb commented Jan 21, 2019

Hi @roblhibbard! Did you make sure all containers were stopped (with docker stop) prior to restarting the platform?

@roblhibbard
Copy link
Author

roblhibbard commented Jan 21, 2019 via email

@roblhibbard
Copy link
Author

i started with a completely new install of ubuntu server 18.04 and with make all command I am getting the same mysql error.
Host '172.18.0.8' is not allowed to connect to this MySQL server

not sure if something has changed.

thank you,

Robert

@regisb
Copy link
Contributor

regisb commented Jan 22, 2019

Can you try the following commands:

make stop
docker ps  
make all

Please paste the complete output of these commands here.

@regisb regisb added the help wanted Easy issues that can be tackled by newcomers label Jan 22, 2019
@roblhibbard
Copy link
Author

roblhibbard commented Jan 22, 2019 via email

@regisb
Copy link
Contributor

regisb commented Jan 22, 2019

This is really strange. Let's start from a blank slate:

make stop
sudo rm -rf ../../data/mysql
make configure
make all

@isabyr
Copy link

isabyr commented Jan 22, 2019

Same problem here, workaround is to connect to mysql and grant access explicitly:

docker exec -it local_mysql_1 /bin/sh
mysql
use mysql;
GRANT ALL PRIVILEGES ON *.* TO root@that_ip IDENTIFIED BY 'pass in mysql/auth.env' WITH GRANT OPTION;

then just re-run the last command

@regisb
Copy link
Contributor

regisb commented Jan 22, 2019

@isabyr did you try my proposed fix #133 (comment) ?

@roblhibbard
Copy link
Author

roblhibbard commented Jan 22, 2019 via email

@regisb
Copy link
Contributor

regisb commented Jan 22, 2019

You should have pretty much the same configuration:

$ docker network inspect local_default
[
    {
        "Name": "local_default",
        "Id": "105ad87e65d9c477f473281d9c143346a1a59660655d94a16e7cf58ca33f41e9",
        "Created": "2018-12-03T19:15:13.499013114+01:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.22.0.0/16",
                    "Gateway": "172.22.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": true,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "17686b9e293aa21c4a060989861513cd1fc65653dd824ce6dd6024af4a6157b3": {
                "Name": "local_mongodb_1",
                "EndpointID": "d9b2b90618a8fe40bff1e9636c72bd96169078cd3210b308b0fedd32bc66bc36",
                "MacAddress": "02:42:ac:16:00:04",
                "IPv4Address": "172.22.0.4/16",
                "IPv6Address": ""
            },
            "19444f38c005bfffc488c8f0b52886b9294f109c16a9a9065e565cfa06b6634e": {
                "Name": "local_elasticsearch_1",
                "EndpointID": "7a1d8c7b51a8f81a9cd62a09fb694d62586ade8164fc11ac756c09ab235578fc",
                "MacAddress": "02:42:ac:16:00:07",
                "IPv4Address": "172.22.0.7/16",
                "IPv6Address": ""
            },
            "4b02afe08ff25a5fb9278c9cba39d23a21d331496793d83bcf2b3e0658e0ef61": {
                "Name": "local_mysql_1",
                "EndpointID": "30ffefd52d6e9b132d324f1e44bedfcdd74cdfa8bd1565e47217ee814b9b30a6",
                "MacAddress": "02:42:ac:16:00:05",
                "IPv4Address": "172.22.0.5/16",
                "IPv6Address": ""
            },
            "52d9198bddae2abdb5f8e564454a274e365b7cb6632f85c2eac13e142e629c6f": {
                "Name": "local_memcached_1",
                "EndpointID": "2cccba4cff1cfe5589b7b04cb23cb09d4e401f0c51581d8dec991fbdb2c22521",
                "MacAddress": "02:42:ac:16:00:02",
                "IPv4Address": "172.22.0.2/16",
                "IPv6Address": ""
            },
            "5d0a443053a8efb4777dfe7455182245ab593cef34c934989d1f57274703168d": {
                "Name": "local_lms_1",
                "EndpointID": "bf40c0282a973323502d685bed2d8f9c5860380de760ce0b5e67ed7bdceeae4c",
                "MacAddress": "02:42:ac:16:00:0c",
                "IPv4Address": "172.22.0.12/16",
                "IPv6Address": ""
            },
            "7c8f66a5bc08f4fa095ccaaa563eef1e84eb0879e58a3507f819f84aee5061e5": {
                "Name": "local_rabbitmq_1",
                "EndpointID": "e2c2a04759a07b201b02373fe3a7f3279622a4223bc8ba796c00a336607d51d7",
                "MacAddress": "02:42:ac:16:00:08",
                "IPv4Address": "172.22.0.8/16",
                "IPv6Address": ""
            },
            "ac3bb0ba8e59c79a03aab3cfe0285bce73f1f647666b22739d6689c4c0f5cd33": {
                "Name": "local_nginx_1",
                "EndpointID": "3399efbd202cb0984a0b4e5104f7084c2c733a41d87fb7dc1161e2ef45d94583",
                "MacAddress": "02:42:ac:16:00:0d",
                "IPv4Address": "172.22.0.13/16",
                "IPv6Address": ""
            },
            "cd4e6ac49e9dbd14f5ca06d6559bb555d4675f467ed4cd81126b5594d72d112d": {
                "Name": "local_smtp_1",
                "EndpointID": "c48d9d25daa2552401697a96ea08d5fd16232c64122b4489b859e90170dd487f",
                "MacAddress": "02:42:ac:16:00:06",
                "IPv4Address": "172.22.0.6/16",
                "IPv6Address": ""
            },
            "da1eeefd3803405ecd8f12cb715777dbe290417e84f804f94b193caf9bc102b9": {
                "Name": "local_lms_worker_1",
                "EndpointID": "e51083777fda5a62fe7c118f87bf7ff9f5977002655a62b7541a9292f53acdc6",
                "MacAddress": "02:42:ac:16:00:0e",
                "IPv4Address": "172.22.0.14/16",
                "IPv6Address": ""
            },
            "de86874ca807aefa9491250d7cd4055b34a210fcb6acccb0fbbb461a00b14c74": {
                "Name": "local_cms_1",
                "EndpointID": "e24d5969720617eaeb00ea32e52b8ad39181d5d955655f6438dd4e54e04ed22e",
                "MacAddress": "02:42:ac:16:00:09",
                "IPv4Address": "172.22.0.9/16",
                "IPv6Address": ""
            },
            "e305a68d7b3c41644cc4d09017de23b24cce123675909e4bc1b711eb4a6de24f": {
                "Name": "local_cms_worker_1",
                "EndpointID": "828063aa8f6cbf57278c687c35e2ab74ca0bedb854216a0e3fc54c93ff602ce5",
                "MacAddress": "02:42:ac:16:00:0a",
                "IPv4Address": "172.22.0.10/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {
            "com.docker.compose.network": "default",
            "com.docker.compose.project": "local",
            "com.docker.compose.version": "1.21.2"
        }
    }
]

@regisb
Copy link
Contributor

regisb commented Jan 22, 2019

You should have pretty much the same configuration:

$ docker network inspect local_default
[
    {
        "Name": "local_default",
        "Id": "105ad87e65d9c477f473281d9c143346a1a59660655d94a16e7cf58ca33f41e9",
        "Created": "2018-12-03T19:15:13.499013114+01:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.22.0.0/16",
                    "Gateway": "172.22.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": true,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "17686b9e293aa21c4a060989861513cd1fc65653dd824ce6dd6024af4a6157b3": {
                "Name": "local_mongodb_1",
                "EndpointID": "d9b2b90618a8fe40bff1e9636c72bd96169078cd3210b308b0fedd32bc66bc36",
                "MacAddress": "02:42:ac:16:00:04",
                "IPv4Address": "172.22.0.4/16",
                "IPv6Address": ""
            },
            "19444f38c005bfffc488c8f0b52886b9294f109c16a9a9065e565cfa06b6634e": {
                "Name": "local_elasticsearch_1",
                "EndpointID": "7a1d8c7b51a8f81a9cd62a09fb694d62586ade8164fc11ac756c09ab235578fc",
                "MacAddress": "02:42:ac:16:00:07",
                "IPv4Address": "172.22.0.7/16",
                "IPv6Address": ""
            },
            "4b02afe08ff25a5fb9278c9cba39d23a21d331496793d83bcf2b3e0658e0ef61": {
                "Name": "local_mysql_1",
                "EndpointID": "30ffefd52d6e9b132d324f1e44bedfcdd74cdfa8bd1565e47217ee814b9b30a6",
                "MacAddress": "02:42:ac:16:00:05",
                "IPv4Address": "172.22.0.5/16",
                "IPv6Address": ""
            },
            "52d9198bddae2abdb5f8e564454a274e365b7cb6632f85c2eac13e142e629c6f": {
                "Name": "local_memcached_1",
                "EndpointID": "2cccba4cff1cfe5589b7b04cb23cb09d4e401f0c51581d8dec991fbdb2c22521",
                "MacAddress": "02:42:ac:16:00:02",
                "IPv4Address": "172.22.0.2/16",
                "IPv6Address": ""
            },
            "5d0a443053a8efb4777dfe7455182245ab593cef34c934989d1f57274703168d": {
                "Name": "local_lms_1",
                "EndpointID": "bf40c0282a973323502d685bed2d8f9c5860380de760ce0b5e67ed7bdceeae4c",
                "MacAddress": "02:42:ac:16:00:0c",
                "IPv4Address": "172.22.0.12/16",
                "IPv6Address": ""
            },
            "7c8f66a5bc08f4fa095ccaaa563eef1e84eb0879e58a3507f819f84aee5061e5": {
                "Name": "local_rabbitmq_1",
                "EndpointID": "e2c2a04759a07b201b02373fe3a7f3279622a4223bc8ba796c00a336607d51d7",
                "MacAddress": "02:42:ac:16:00:08",
                "IPv4Address": "172.22.0.8/16",
                "IPv6Address": ""
            },
            "ac3bb0ba8e59c79a03aab3cfe0285bce73f1f647666b22739d6689c4c0f5cd33": {
                "Name": "local_nginx_1",
                "EndpointID": "3399efbd202cb0984a0b4e5104f7084c2c733a41d87fb7dc1161e2ef45d94583",
                "MacAddress": "02:42:ac:16:00:0d",
                "IPv4Address": "172.22.0.13/16",
                "IPv6Address": ""
            },
            "cd4e6ac49e9dbd14f5ca06d6559bb555d4675f467ed4cd81126b5594d72d112d": {
                "Name": "local_smtp_1",
                "EndpointID": "c48d9d25daa2552401697a96ea08d5fd16232c64122b4489b859e90170dd487f",
                "MacAddress": "02:42:ac:16:00:06",
                "IPv4Address": "172.22.0.6/16",
                "IPv6Address": ""
            },
            "da1eeefd3803405ecd8f12cb715777dbe290417e84f804f94b193caf9bc102b9": {
                "Name": "local_lms_worker_1",
                "EndpointID": "e51083777fda5a62fe7c118f87bf7ff9f5977002655a62b7541a9292f53acdc6",
                "MacAddress": "02:42:ac:16:00:0e",
                "IPv4Address": "172.22.0.14/16",
                "IPv6Address": ""
            },
            "de86874ca807aefa9491250d7cd4055b34a210fcb6acccb0fbbb461a00b14c74": {
                "Name": "local_cms_1",
                "EndpointID": "e24d5969720617eaeb00ea32e52b8ad39181d5d955655f6438dd4e54e04ed22e",
                "MacAddress": "02:42:ac:16:00:09",
                "IPv4Address": "172.22.0.9/16",
                "IPv6Address": ""
            },
            "e305a68d7b3c41644cc4d09017de23b24cce123675909e4bc1b711eb4a6de24f": {
                "Name": "local_cms_worker_1",
                "EndpointID": "828063aa8f6cbf57278c687c35e2ab74ca0bedb854216a0e3fc54c93ff602ce5",
                "MacAddress": "02:42:ac:16:00:0a",
                "IPv4Address": "172.22.0.10/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {
            "com.docker.compose.network": "default",
            "com.docker.compose.project": "local",
            "com.docker.compose.version": "1.21.2"
        }
    }
]

@roblhibbard can you please also paste the result of the make info command?

@roblhibbard
Copy link
Author

roblhibbard commented Jan 22, 2019 via email

@roblhibbard
Copy link
Author

roblhibbard commented Jan 23, 2019 via email

@regisb
Copy link
Contributor

regisb commented Jan 23, 2019

@roblhibbard the lms and the cms do not appear in your local_default network. Is that because they did not launch?
What makes you say that your local_default network is "out of the ordinary"?

regisb added a commit that referenced this issue Jan 23, 2019
There may be a race condition, where the mysql container is initialized
without creating the root user. To address this, we wait until the right
message from the mysql logs. In practice, we should do even better by
running the provision.sh scripts directly inside the mysql container.

This is for issues #132 and #133
@regisb
Copy link
Contributor

regisb commented Jan 23, 2019

@roblhibbard I think I found a solution. This might be due to a change I introduced recently that tried to make sure mysql is initialized properly prior to creating the databases. Apparently, it's not working that well... Please try the following:

make stop
sudo rm -rf ../../data/mysql
git pull
make all

@roblhibbard
Copy link
Author

roblhibbard commented Jan 23, 2019 via email

@roblhibbard
Copy link
Author

roblhibbard commented Jan 23, 2019 via email

@roblhibbard
Copy link
Author

roblhibbard commented Jan 23, 2019 via email

@regisb
Copy link
Contributor

regisb commented Jan 23, 2019

Awesome! Pfiuh, that was hard.

@regisb regisb closed this as completed Jan 23, 2019
@roblhibbard
Copy link
Author

roblhibbard commented Jan 24, 2019 via email

@regisb
Copy link
Contributor

regisb commented Jan 24, 2019

That's great news! FYI, you don't have to modify the Dockerfile. You just need to add your dependencies to your private requirements.

private.txt:

IPython==5.0 
ipykernel==4.10
git+https://github.com/ibleducation/jupyter-edx-grader-xblock.git

@roblhibbard
Copy link
Author

roblhibbard commented Jan 26, 2019 via email

@regisb
Copy link
Contributor

regisb commented Jan 28, 2019

Indeed, this is not related to tutor at all. But I suspect the xblock requires docker, which is not available from inside the container... You would need to add print cmd to line 158 of /usr/local/lib/python2.7/dist-packages/xblock_jupyter_graded/container_manager.py to debug this.

When I quickly checked the documentation of xblock_jupyter_graded, I didn't realize that the xblock was itself running docker containers. It's possible to launch containers inside containers, but it's tricky.

@regisb regisb added question General questions are welcome and removed help wanted Easy issues that can be tackled by newcomers labels Mar 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question General questions are welcome
Projects
None yet
Development

No branches or pull requests

3 participants