java - Jgroup port selection control externally
问题描述
We have a Jgroup cluster with tcpgossip protocol as discovery service. Currently each node of the cluster member get assigned with a random TCP port by jgroup GMS: address=XXX, cluster=cluster, physical address=1.100.102.34:50970
Is there any way we can specify the port range to choose externally without changing the Jgroup configuration. That is using any linux command like iptables rules , can we specify a port range , so that Jgroup will pick ports only from that range
解决方案
根据文档,您可以bind_port
为您配置的 jgroup 传输协议栈指定。
bind_port:传输绑定的端口。默认值 0 绑定到任何(临时)端口
示例代码片段:
<config>
<TCP
singleton_name="tcp"
bind_port=12345
...
/>
</config>
推荐阅读
- loops - 如何解析 CF 结构
- python - Python代码问题-尝试创建一个脚本来定位文件,对其进行编辑并将其另存为新文件
- ruby-on-rails - 如何从 Rails 5 API only 应用程序提供本地图像 url
- ios - 适用于 iOS 的 Google 地图叠加层可访问性问题
- python - 如何使用 multible 变量正确使用 scipy 中的最小化?
- ios - UITextField 的自动填充已损坏
- python - 使用 Python 对 Excel 电子表格进行排序
- python - 如何修复提交按钮未提交(Tkinter)
- django - 在第一个请求完成后发出第二个请求,csrf Django 问题
- javascript - 反应错误 - 渲染方法后的预期分号?