apache / gravitino-playground

A playground to experience Gravitino
Apache License 2.0
31 stars 31 forks source link

[Improvement] Add port checks for MySQL and Postgres #22

Closed justinmclean closed 2 weeks ago

justinmclean commented 10 months ago

Add scripts to check if ports are in use and that means the user is likely running MySQl or Posgres locally. I assume for this scripts to run new MySQL and Postgres docker images will need to be made. I tested the scripts manually and they detected if the port was in use.

qqqttt123 commented 10 months ago

Think twice. The shell shouldn't take effect. The shell of init.sh should be executed in the Docker image container. The ports are available all the time.

justinmclean commented 10 months ago

Ah, yes, you are right. This doesn't fix the issue; I'll pull the script out and place them in the launch script.

qqqttt123 commented 10 months ago

Is the scrip ok for both mac and linux?

justinmclean commented 10 months ago

Is the script ok for both Mac and Linux?

Yep see https://manpages.ubuntu.com/manpages/bionic/en/man8/lsof.8.html

shaofengshi commented 3 months ago

This is something similar as https://github.com/apache/gravitino-playground/issues/60, I propose to solve that by chaning to an less possible conflict port in local, which is common used in docker deployments.

shaofengshi commented 2 months ago

Hi Justin, I have changed the playground to use non-default ports to avoid such conflicts, see: https://github.com/apache/gravitino-playground/commit/fd68dd2c59617451cf065f8e2e1d5397928464b3

So I think this PR is not needed; If user still got conflict (the possibility is very low), he can modify the yaml.