apache / gravitino-playground

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

gravitino container failed to initialize with Podman on Windows10 #12

Closed shaofengshi closed 10 months ago

shaofengshi commented 10 months ago

I'm using Windows 10 with Podman 4.8.3. When I use "podman compose up", it looks all good when downloading the docker images, start them. But finally it reports such error:

playground-gravitino | Start to download the jar package of JDBC playground-gravitino | --2024-01-07 03:35:07-- https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.27/mysql-connector-java-8.0.27.jar playground-gravitino | Resolving repo1.maven.org (repo1.maven.org)... 198.18.0.34 playground-gravitino | Connecting to repo1.maven.org (repo1.maven.org)|198.18.0.34|:443... connected. playground-gravitino | HTTP request sent, awaiting response... 200 OK playground-gravitino | Length: 2475087 (2.4M) [application/java-archive] playground-gravitino | Saving to: ‘/root/gravitino/catalogs/jdbc-mysql/libs/mysql-connector-java-8.0.27.jar\r’ playground-gravitino | playground-gravitino | 0K .......... .......... .......... .......... .......... 2% 309K 8s playground-gravitino | 50K .......... .......... .......... .......... .......... 4% 847K 5s playground-gravitino | 100K .......... .......... .......... .......... .......... 6% 441K 5s playground-gravitino | 150K .......... .......... .......... .......... .......... 8% 5.22M 4s playground-gravitino | 200K .......... .......... .......... .......... .......... 10% 1.97M 3s playground-gravitino | 250K .......... .......... .......... .......... .......... 12% 727K 3s playground-gravitino | 300K .......... .......... .......... .......... .......... 14% 2.29M 3s playground-gravitino | 350K .......... .......... .......... .......... .......... 16% 3.09M 2s playground-gravitino | 400K .......... .......... .......... .......... .......... 18% 2.01M 2s playground-gravitino | 450K .......... .......... .......... .......... .......... 20% 2.82M 2s playground-gravitino | 500K .......... .......... .......... .......... .......... 22% 3.28M 2s playground-gravitino | 550K .......... .......... .......... .......... .......... 24% 3.70M 2s playground-gravitino | 600K .......... .......... .......... .......... .......... 26% 1018K 2s playground-gravitino | 650K .......... .......... .......... .......... .......... 28% 3.76M 1s playground-gravitino | 700K .......... .......... .......... .......... .......... 31% 3.44M 1s playground-gravitino | 750K .......... .......... .......... .......... .......... 33% 2.84M 1s playground-gravitino | 800K .......... .......... .......... .......... .......... 35% 5.45M 1s playground-gravitino | 850K .......... .......... .......... .......... .......... 37% 6.66M 1s playground-gravitino | 900K .......... .......... .......... .......... .......... 39% 2.73M 1s playground-gravitino | 950K .......... .......... .......... .......... .......... 41% 5.13M 1s playground-gravitino | 1000K .......... .......... .......... .......... .......... 43% 3.35M 1s playground-gravitino | 1050K .......... .......... .......... .......... .......... 45% 2.96M 1s playground-gravitino | 1100K .......... .......... .......... .......... .......... 47% 3.93M 1s playground-gravitino | 1150K .......... .......... .......... .......... .......... 49% 4.39M 1s playground-gravitino | 1200K .......... .......... .......... .......... .......... 51% 11.4M 1s playground-gravitino | 1250K .......... .......... .......... .......... .......... 53% 4.61M 1s playground-gravitino | 1300K .......... .......... .......... .......... .......... 55% 2.45M 1s playground-gravitino | 1350K .......... .......... .......... .......... .......... 57% 5.44M 1s playground-gravitino | 1400K .......... .......... .......... .......... .......... 59% 4.19M 1s playground-gravitino | 1450K .......... .......... .......... .......... .......... 62% 2.50M 0s playground-gravitino | 1500K .......... .......... .......... .......... .......... 64% 2.73M 0s playground-gravitino | 1550K .......... .......... .......... .......... .......... 66% 3.40M 0s playground-gravitino | 1600K .......... .......... .......... .......... .......... 68% 6.11M 0s playground-gravitino | 1650K .......... .......... .......... .......... .......... 70% 1.47M 0s playground-gravitino | 1700K .......... .......... .......... .......... .......... 72% 1.15M 0s playground-gravitino | 1750K .......... .......... .......... .......... .......... 74% 2.20M 0s playground-gravitino | 1800K .......... .......... .......... .......... .......... 76% 8.90M 0s playground-gravitino | 1850K .......... .......... .......... .......... .......... 78% 1.81M 0s playground-gravitino | 1900K .......... .......... .......... .......... .......... 80% 5.51M 0s playground-gravitino | 1950K .......... .......... .......... .......... .......... 82% 3.06M 0s playground-gravitino | 2000K .......... .......... .......... .......... .......... 84% 1.33M 0s playground-gravitino | 2050K .......... .......... .......... .......... .......... 86% 3.46M 0s playground-gravitino | 2100K .......... .......... .......... .......... .......... 88% 2.42M 0s playground-gravitino | 2150K .......... .......... .......... .......... .......... 91% 2.85M 0s playground-gravitino | 2200K .......... .......... .......... .......... .......... 93% 5.04M 0s playground-gravitino | 2250K .......... .......... .......... .......... .......... 95% 4.02M 0s playground-gravitino | 2300K .......... .......... .......... .......... .......... 97% 3.57M 0s playground-gravitino | 2350K .......... .......... .......... .......... .......... 99% 11.3M 0s playground-gravitino | 2400K .......... ....... 100% 42.1M=1.1s playground-gravitino | playground-gravitino | 2024-01-07 03:35:09 (2.08 MB/s) - ‘/root/gravitino/catalogs/jdbc-mysql/libs/mysql-connector-java-8.0.27.jar\r’ saved [2475087/2475087] playground-gravitino | playground-gravitino | --2024-01-07 03:35:09-- https://jdbc.postgresql.org/download/postgresql-42.7.0.jar playground-gravitino | Resolving jdbc.postgresql.org (jdbc.postgresql.org)... 198.18.0.35 playground-gravitino | Connecting to jdbc.postgresql.org (jdbc.postgresql.org)|198.18.0.35|:443... connected. playground-gravitino | HTTP request sent, awaiting response... 200 OK playground-gravitino | Length: 1077325 (1.0M) [application/java-archive] playground-gravitino | Saving to: ‘/root/gravitino/catalogs/jdbc-postgresql/libs/postgresql-42.7.0.jar\r’ playground-gravitino | playground-gravitino | 0K .......... .......... .......... .......... .......... 4% 221K 5s playground-gravitino | 50K .......... .......... .......... .......... .......... 9% 331K 4s playground-gravitino | 100K .......... .......... .......... .......... .......... 14% 1.65M 2s playground-gravitino | 150K .......... .......... .......... .......... .......... 19% 349K 2s playground-gravitino | 200K .......... .......... .......... .......... .......... 23% 2.87M 2s playground-gravitino | 250K .......... .......... .......... .......... .......... 28% 2.86M 1s playground-gravitino | 300K .......... .......... .......... .......... .......... 33% 2.15M 1s playground-gravitino | 350K .......... .......... .......... .......... .......... 38% 387K 1s playground-gravitino | 400K .......... .......... .......... .......... .......... 42% 12.0M 1s playground-gravitino | 500K .......... .......... .......... .......... .......... 52% 1.47M 1s playground-gravitino | 550K .......... .......... .......... .......... .......... 57% 2.29M 1s playground-gravitino | 600K .......... .......... .......... .......... .......... 61% 8.21M 1s playground-gravitino | 650K .......... .......... .......... .......... .......... 66% 2.99M 0s playground-gravitino | 700K .......... .......... .......... .......... .......... 71% 2.10M 0s playground-gravitino | 750K .......... .......... .......... .......... .......... 76% 808K 0s playground-gravitino | 800K .......... .......... .......... .......... .......... 80% 2.51M 0s playground-gravitino | 850K .......... .......... .......... .......... .......... 85% 7.96M 0s playground-gravitino | 900K .......... .......... .......... .......... .......... 90% 1.26M 0s playground-gravitino | 950K .......... .......... .......... .......... .......... 95% 1.24M 0s playground-gravitino | 1000K .......... .......... .......... .......... .......... 99% 3.71M 0s playground-gravitino | 1050K .. 100% 3958G=1.1s playground-gravitino | playground-gravitino | 2024-01-07 03:35:12 (992 KB/s) - ‘/root/gravitino/catalogs/jdbc-postgresql/libs/postgresql-42.7.0.jar\r’ saved [1077325/1077325] playground-gravitino | playground-gravitino | cp: cannot stat '/root/gravitino/catalogs/jdbc-postgresql/libs/postgresql-42.7.0.jar': No such file or directory playground-gravitino | cp: cannot stat '/root/gravitino/catalogs/jdbc-mysql/libs/mysql-connector-java-8.0.27.jar': No such file or directory playground-gravitino | Finish downloading playground-gravitino | Start the Gravitino Server playground-gravitino | playground-gravitino | Usage: bin/gravitino.sh [--config ] playground-gravitino | {start|stop|restart|status} Gracefully stopping... (press Ctrl+C again to force) dependency failed to start: container playground-gravitino is unhealthy Error: executing C:\Users\pan\AppData\Local\Microsoft\WindowsApps\docker-compose.exe up: exit status 1

Then I use "podman exec -it playground-gravitino bash" to login into the container to see what happens. I can see the file is there, but when use "ls -l ", it said the file not exists:

root@f9bb5eb28902:~/gravitino# ls /root/gravitino/catalogs/jdbc-postgresql/libs/postgresql-42.7.0.jar ls: cannot access '/root/gravitino/catalogs/jdbc-postgresql/libs/postgresql-42.7.0.jar': No such file or directory

root@f9bb5eb28902:~/gravitino# ls -la /root/gravitino/catalogs/jdbc-postgresql/libs/ |grep post -rw-r--r-- 1 root root 20119 Dec 12 15:09 gravitino-catalog-jdbc-postgresql-0.3.0.jar -rw-r--r-- 1 root root 1077325 Nov 20 18:10 postgresql-42.7.0.jar

This is very interesting. Then I tried to use "TAB" to let the bash auto-completion, I can see the file name has a "^M" as the ending: root@f9bb5eb28902:~/gravitino# whoami root root@f9bb5eb28902:~/gravitino# ls /root/gravitino/catalogs/jdbc-postgresql/libs/postgresql-42.7.0.jar^M

shaofengshi commented 10 months ago

Manually rename them, then the server started:

root@f9bb5eb28902:~/gravitino# mv /root/gravitino/catalogs/jdbc-postgresql/libs/postgresql-42.7.0.jar^M /root/gravitino/catalogs/jdbc-postgresql/libs/postgresql-42.7.0.jar root@f9bb5eb28902:~/gravitino# mv /root/gravitino/catalogs/jdbc-mysql/libs/mysql-connector-java-8.0.27.jar^M /root/gravitino/catalogs/jdbc-mysql/libs/mysql-connector-java-8.0.27.jar root@f9bb5eb28902:~/gravitino# cp /root/gravitino/catalogs/jdbc-postgresql/libs/postgresql-42.7.0.jar /root/gravitino/catalogs/lakehouse-iceberg/libs root@f9bb5eb28902:~/gravitino# cp /root/gravitino/catalogs/jdbc-mysql/libs/mysql-connector-java-8.0.27.jar /root/gravitino/catalogs/lakehouse-iceberg/libs root@f9bb5eb28902:~/gravitino# /bin/bash /root/gravitino/bin/gravitino.sh start

Log dir doesn't exist, create /root/gravitino/logs Gravitino Server start success! Gravitino Server is running[PID:1102]

qqqttt123 commented 10 months ago

We haven't verified these scripts in the Windows environment. We only verified them in the mac and Linux environment. It will be great if you want to help us.

shaofengshi commented 10 months ago

I was able to successfully run the playground on Windows 10 with Podman, after "did the conversion with Notepad++ very easily from: Edit -> EOL Conversion -> Unix(LF)" for the two "init.sh" files, by refering to https://stackoverflow.com/questions/9886268/shell-script-syntax-error-unexpected-end-of-file

The only thing is, the "trino" container wasn't started successfully at once; It was stopped; I manually start it up after checking the gravitino server is running. After that, everything is OK.

So this is not an coding issue, but Windows platform encodings issue. I will close this issue.

The demo is cool! Thank you guys!

JunpingDu commented 10 months ago

Thank you, @shaofengshi ! We love your contribution and look forward to more. :)