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

Reduce the possibility of port conflicts and simplify deployment steps #110

Closed
daikon12 opened this issue Sep 8, 2021 · 2 comments
Closed

Comments

@daikon12
Copy link

daikon12 commented Sep 8, 2021

starrocks version: StarRocks-1.18.2
today I deployed a starrocks cluster according to documents.
It failed when I started Be, then I checked the log (log/be.out ):
W0908 16:38:03.955521 11189 task_worker_pool.cpp:1060] Fail to report task to :0, err=-1
E0908 16:38:03.959837 10949 doris_main.cpp:236] Doris Be http service did not start correctly, exiting

I noticed a problem with Be http service,but I still don't know why.
After some efforts, I know that some port in the configuration file conflicted.

I believe this has also troubled many friends. Let's share it here。
I came up with two solutions to make it easier for everyone to use:
1.Before start the script(start_be.sh or start_fe.sh), we first check whether the configured ports have conflicts
We can add the following logic to the startup script:
confdir=cd "$curdir"; pwd/../conf/be.conf
port_detected() {
serviceandport=grep -v ^# $confdir | grep "_port" | sed 's/ //g'
serviceandportarray=(${serviceandport// / })
for pair in ${serviceandportarray[@]}
do
service=echo $pair | awk -F '=' '{print $1}'
port=echo $pair | awk -F '=' '{print $2}'
res=netstat -anp | grep $port
if [ ! -z "$res" ]; then
echo "port $port already in use ! "
echo "Please check the configuration $service in $confdir"
exit 1
fi
done
}

2.Generate more log information in the doris_main.cpp

@Astralidea
Copy link
Contributor

Hi @daikon12 Thanks for your report。
We already add more log information to slove this problem in this PR #26
For 2. It will affect in next release.

@daikon12
Copy link
Author

daikon12 commented Sep 9, 2021

@Astralidea Thanks for the quick reply, this pr is very valuable #26。In addition,I also suggest to check whether the deployment dependencies are satisfied before deployment。

@sduzh sduzh closed this as completed Oct 15, 2021
caneGuy pushed a commit to caneGuy/starrocks that referenced this issue Mar 28, 2023
fix primary key's distributed column name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants