kamu-data / kamu-cli

Next-generation decentralized data lakehouse and a multi-party stream processing network
https://kamu.dev
Other
303 stars 13 forks source link

`Thrift Server did not start: TimeoutError` error when launching SQL shell #62

Closed ihainan closed 2 years ago

ihainan commented 3 years ago

And the error changed when I re-executed the same command:

(base) ➜  my-repo kamu sql
⠂ Starting Spark SQL shell
thread 'main' panicked at 'Thrift Server did not start: TimeoutError { duration: 60s, backtrace: <disabled> }', kamu-core/src/infra/explore/sql_shell_impl.rs:143:14
(base) ➜  my-repo kamu sql
⠚ Starting Spark SQL shell
thread 'main' panicked at 'Thrift server start script returned non-zero code: ExitStatusError(ExitStatusError(256))', kamu-core/src/infra/explore/sql_shell_impl.rs:130:18

Is there a way to restart the Thrift server and check the detailed log message?

sergiimk commented 3 years ago

Hi @ihainan, thank you for reporting this issue!

I cannot reproduce this error, so we'll need to troubleshoot a little.

First: can you tell me which operating system you're using?

Second: please run kamu sql again so it errors, and then include the content of log files created in .kamu/run directory

If logs do not show an obvious reason for a failure you can try to execute commands that kamu is using to run the Thrift server in the foreground yourself and see if anything points out the issue (assuming you're using docker):

In the first shell run:

docker run --rm --user=root --name kamu-spark --entrypoint=bash docker.io/kamudata/engine-spark:0.12.0-spark_3.1.2 -c "sleep 999999"

Then in the second shell:

docker exec --workdir=/opt/bitnami/spark kamu-spark bash -c sbin/start-thriftserver.sh ; echo $?

The above should reveal more about the cause of the error.

To stop the container:

docker kill kamu-spark
sergiimk commented 3 years ago

Oh, also make sure that docker is not running any containers from the previous time that perhaps got stuck:

docker ps -a
# kill if there is one
docker kill kamu-spark
sergiimk commented 2 years ago

The project have advanced significantly since this issue was open, so I'll close it.

If you want to try out the tool - you can use our online demo without needing to install anything. And if you still experiencing this issue when installing locally - please reopen this ticket and we'll investigate!

Cheers