You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by he...@apache.org on 2022/05/07 14:46:37 UTC
[incubator-inlong] branch master updated: [INLONG-4114][TubeMQ] Fix all images of tubemq that can not start (#4116)
This is an automated email from the ASF dual-hosted git repository.
healchow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git
The following commit(s) were added to refs/heads/master by this push:
new f47f1a564 [INLONG-4114][TubeMQ] Fix all images of tubemq that can not start (#4116)
f47f1a564 is described below
commit f47f1a56430760120f807d6b87dc243c9a192785
Author: dockerzhang <do...@apache.org>
AuthorDate: Sat May 7 22:46:31 2022 +0800
[INLONG-4114][TubeMQ] Fix all images of tubemq that can not start (#4116)
---
.../inlong/tubemq/corerpc/netty/NettyClientFactory.java | 2 +-
.../inlong/tubemq/corerpc/netty/NettyRpcServer.java | 2 +-
inlong-tubemq/tubemq-docker/tubemq-all/README.md | 2 +-
inlong-tubemq/tubemq-docker/tubemq-all/tubemq-docker.sh | 17 ++++++++++++++---
4 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corerpc/netty/NettyClientFactory.java b/inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corerpc/netty/NettyClientFactory.java
index 198405733..eaa72721b 100644
--- a/inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corerpc/netty/NettyClientFactory.java
+++ b/inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corerpc/netty/NettyClientFactory.java
@@ -239,7 +239,7 @@ public class NettyClientFactory implements ClientFactory {
int nettyWriteLowMark =
conf.getInt(RpcConstants.NETTY_WRITE_LOW_MARK, 32 * 1024);
clientBootstrap.option(ChannelOption.WRITE_BUFFER_WATER_MARK,
- new WriteBufferWaterMark(nettyWriteHighMark, nettyWriteLowMark));
+ new WriteBufferWaterMark(nettyWriteLowMark, nettyWriteHighMark));
clientBootstrap.handler(new ChannelInitializer<SocketChannel>() {
@Override
public void initChannel(SocketChannel socketChannel) throws Exception {
diff --git a/inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corerpc/netty/NettyRpcServer.java b/inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corerpc/netty/NettyRpcServer.java
index eef57b30b..f21e3ea62 100644
--- a/inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corerpc/netty/NettyRpcServer.java
+++ b/inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corerpc/netty/NettyRpcServer.java
@@ -141,7 +141,7 @@ public class NettyRpcServer implements ServiceRpcServer {
int nettyWriteLowMark =
conf.getInt(RpcConstants.NETTY_WRITE_LOW_MARK, 32 * 1024);
bootstrap.option(ChannelOption.WRITE_BUFFER_WATER_MARK,
- new WriteBufferWaterMark(nettyWriteHighMark, nettyWriteLowMark));
+ new WriteBufferWaterMark(nettyWriteLowMark, nettyWriteHighMark));
int nettySendBuf = conf.getInt(RpcConstants.NETTY_TCP_SENDBUF, -1);
if (nettySendBuf > 0) {
bootstrap.childOption(ChannelOption.SO_SNDBUF, nettySendBuf);
diff --git a/inlong-tubemq/tubemq-docker/tubemq-all/README.md b/inlong-tubemq/tubemq-docker/tubemq-all/README.md
index 4aa7e9f81..9d5e45911 100644
--- a/inlong-tubemq/tubemq-docker/tubemq-all/README.md
+++ b/inlong-tubemq/tubemq-docker/tubemq-all/README.md
@@ -12,4 +12,4 @@ docker run -p 8080:8080 -p 8715:8715 -p 8123:8123 -p 2181:2181 --name tubemq -d
```
this command will start zookeeper/master/broker service in one container.
#### Add Topic
-If the container is running, you can access http://127.0.0.1:8080 to see the web GUI, and you can reference to the **Add Topic** part of [user guide](https://tubemq.apache.org/en-us/docs/tubemq_user_guide.html)
\ No newline at end of file
+If the container is running, you can access http://127.0.0.1:8080 to see the web GUI, and you can reference to the **Add Topic** part of [user guide](https://inlong.apache.org/docs/next/modules/tubemq/quick_start#2-quick-start)
\ No newline at end of file
diff --git a/inlong-tubemq/tubemq-docker/tubemq-all/tubemq-docker.sh b/inlong-tubemq/tubemq-docker/tubemq-all/tubemq-docker.sh
index 466154c53..d1696711e 100644
--- a/inlong-tubemq/tubemq-docker/tubemq-all/tubemq-docker.sh
+++ b/inlong-tubemq/tubemq-docker/tubemq-all/tubemq-docker.sh
@@ -15,6 +15,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+# wait the service to start
+wait_port_to_listen() {
+ service_name=$1
+ service_port=$2
+ result=$(netstat -anp | grep ${service_port})
+ while [[ -z "$result" ]]; do
+ echo "waiting $service_name to start, sleep 3s ..."
+ sleep 3
+ result=$(netstat -anp | grep ${service_port})
+ done
+}
+
cd /opt/tubemq-server/bin/
# configure useWebProxy
if [[ $USE_WEB_PROXY ]]; then
@@ -26,11 +38,10 @@ fi
if [[ $TARGET == "standalone" ]]; then
# zookeeper start
/docker-entrypoint.sh zkServer.sh start
- sleep 5
+ wait_port_to_listen zookeeper 2181
# master start
-
./tubemq.sh master start
- sleep 5
+ wait_port_to_listen master 8080
# add broker
curl -d "type=op_modify&method=admin_add_broker_configure&brokerId=1\
&brokerIp=127.0.0.1&brokerPort=8123&deletePolicy=delete,168h&numPartitions=3\