-
Notifications
You must be signed in to change notification settings - Fork 53
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
php_network_getaddresses Name or service not know #21
Comments
@chinleung what versions of gitlab, docker and gitlab-runner are you using? |
@chilio In the GitLab admin, it says the runner is on version 10.4.0 but when I execute
I see the following in the logs during both the build and the test stage:
I'm not too familiar with Docker. Do you have any idea how to fix this? |
@chinleung Your problem is in this line: There could be several problems, but for sure you need to check your docker installation (sometimes it can be something as silly as low space, mem, etc.) First I would try to run mysql manually and make sure it works... Some more info here... |
@chilio Yeah that's what I thought too. Thanks I'll have a look on why it's not starting properly. I'll post back here once I find the solution for anyone with the same issue. |
@chinleung did you succeeded with this issue? |
@chilio No I am still working on it. I've tried multiple things like these guides:
I've also tried to enable the
|
@chinleung My advice is you should not dig dipper, with gitlab.... I believe this is a problem with your underlying infrastructure (probably docker). I have experienced this error only once, and it was when my test system was overloaded... So please make sure you can run docker mysql instance without any issues.... |
@chilio I think that's the issue, I'm not able to run mysql properly with docker but I can't figure out why... Any ideas? |
@chinleung I would try to reinstall docker on your system, have you tried that? |
@chilio Oh wait, I can't have MySQL on my host machine? |
@chinleung I've never tried it, but I have seen that others had some problems with that... |
@chinleung By using So everything is a docker container and you don't have to manage your mysql VM/container or even the service on your host by yourself. By using
The database is already created with the credentials and @chilio made a little script to make your life easier by using
Your laravel env will be setup and your database will be created and seeded (Idon't know if this word exist) You can have a look here to see what this command is really doing. I hope it will help you to debug or at least to have a better understanding of the workflow. |
@chinleung any updates on this? |
Oh sorry I didn't see @Raccoon5031 's message. So basically it won't work if I have MySQL on my main host. The thing is, I'm using the main host to serve websites, therefore I need the MySQL service running. @chilio It's not really a fix to the issue, but I realized, I don't even need to install MySQL in my docker because I don't use it all during the tests. |
@chinleung if so you can modify .gitlab-ci.yml to use alias for example:
and then in variables section:
This should work without a problem. |
I simply removed the mysql from the services completely and it's working. 👍 |
@chinleung I know, but could you check this solution? |
@chilio Okay sure, I'll test it and get back to you in like ±3 hours. I don't have access to my laptop right now. Do you want me to add the alias to both stages? |
@chinleung yes please do, everywhere where you reference mysql in |
@chilio Yes adding an alias seems to be working! |
@chinleung I'm glad to hear that... |
@chilio received same error today on the shared runner. Maybe |
@scofield-ua thanks for the tip. |
I've taken the files from the example and it keeps giving me this:
Here's the .gitlab-ci
And my .env.example:
The text was updated successfully, but these errors were encountered: