Not a host:port pair: �

本文介绍了因HBase服务端与客户端版本不一致导致的Notahost:portpair异常问题,详细展示了错误堆栈信息,并提供了修改为一致版本的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题:Not a host:port pair: �

java.lang.IllegalArgumentException: Not a host:port pair: �24572@liaozhongmin3liaozhongmin3,60020,1430896319612
	at org.apache.hadoop.hbase.HServerAddress.<init>(HServerAddress.java:60)
	at org.apache.hadoop.hbase.zookeeper.RootRegionTracker.dataToHServerAddress(RootRegionTracker.java:82)
	at org.apache.hadoop.hbase.zookeeper.RootRegionTracker.waitRootRegionLocation(RootRegionTracker.java:73)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:578)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:558)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:687)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:589)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:558)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:687)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:593)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:558)
	at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:171)
	at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:145)
	at com.lixue.storm.graduate.hbase.dao.impl.HBaseDAOImpl.save(HBaseDAOImpl.java:45)
	at com.lixue.storm.graduate.hbase.dao.impl.HBaseDAOImpl.main(HBaseDAOImpl.java:212)

原因:

HBase服务端版本和客户端使用的版本不一致!


解决:

修改为一致版本即可!

/home/shz/Project/appHDQt6/udptask.cpp:1353: error: no match for ‘operator<’ (operand types are ‘const QHostAddress’ and ‘const QHostAddress’) In file included from /usr/include/c++/9/utility:70, from ../../Qt6/6.7.3/gcc_64/include/QtCore/qglobal.h:15, from ../../Qt6/6.7.3/gcc_64/include/QtCore/QtCore:4, from ../appHDQt6/paramdef.h:4, from ../appHDQt6/deviceparameterstorage.h:4, from ../appHDQt6/udptask.h:4, from ../appHDQt6/udptask.cpp:15: /usr/include/c++/9/bits/stl_pair.h: In instantiation of ‘constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&) [with _T1 = QHostAddress; _T2 = short unsigned int]’: /usr/include/c++/9/bits/stl_function.h:386:20: required from ‘constexpr bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = std::pair<QHostAddress, short unsigned int>]’ /usr/include/c++/9/bits/stl_tree.h:2564:8: required from ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::find(const _Key&) [with _Key = std::pair<QHostAddress, short unsigned int>; _Val = std::pair<const std::pair<QHostAddress, short unsigned int>, long long unsigned int>; _KeyOfValue = std::_Select1st<std::pair<const std::pair<QHostAddress, short unsigned int>, long long unsigned int> >; _Compare = std::less<std::pair<QHostAddress, short unsigned int> >; _Alloc = std::allocator<std::pair<const std::pair<QHostAddress, short unsigned int>, long long unsigned int> >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const std::pair<QHostAddress, short unsigned int>, long long unsigned int> >]’ /usr/include/c++/9/bits/stl_map.h:1169:29: required from ‘std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::find(const key_type&) [with _Key = std::pair<QHostAddress, short unsigned int>; _Tp = long long unsigned int; _Compare = std::less<std::pair<QHostAddress, short unsigned int> >; _Alloc = std::allocator<std::pair<const std::pair<QHostAddress, short unsigned int>, long long unsigned int> >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const std::pair<QHostAddress, short unsigned int>, long long unsigned int> >; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::pair<QHostAddress, short unsigned int>]’ ../../Qt6/6.7.3/gcc_64/include/QtCore/qmap.h:370:14: required from ‘T& QMap<Key, T>::operator[](const Key&) [with Key = std::pair<QHostAddress, short unsigned int>; T = long long unsigned int]’ ../appHDQt6/udptask.cpp:1353:32: required from here /usr/include/c++/9/bits/stl_pair.h:455:24: error: no match for ‘operator<’ (operand types are ‘const QHostAddress’ and ‘const QHostAddress’) 455 | { return __x.first < __y.first | ~~~~~~~~~~^~~~~~~~~~~ /usr/include/c++/9/bits/stl_pair.h:454:5: note: candidate: ‘template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)’ 454 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/9/bits/stl_pair.h:454:5: note: template argument deduction/substitution failed: /usr/include/c++/9/bits/stl_pair.h:455:24: note: ‘const QHostAddressis not derived from ‘const std::pair<_T1, _T2>’ 455 | { return __x.first < __y.first | ~~~~~~~~~~^~~~~~~~~~~ 是什么问题?
最新发布
07-17
Android Debug Bridge version 1.0.39 Revision 3db08f2c6889-android Installed as D:\adb\adb.exe global options: -a listen on all network interfaces, not just localhost -d use USB device (error if multiple devices connected) -e use TCP/IP device (error if multiple TCP/IP devices available) -s SERIAL use device with given serial number (overrides $ANDROID_SERIAL) -p PRODUCT name or path ('angler'/'out/target/product/angler'); default $ANDROID_PRODUCT_OUT -H name of adb server host [default=localhost] -P port of adb server [default=5037] -L SOCKET listen on given socket for adb server [default=tcp:localhost:5037] general commands: devices [-l] list connected devices (-l for long output) help show this help message version show version num networking: connect HOST[:PORT] connect to a device via TCP/IP [default port=5555] disconnect [HOST[:PORT]] disconnect from given TCP/IP device [default port=5555], or all forward --list list all forward socket connections forward [--no-rebind] LOCAL REMOTE forward socket connection using: tcp:<port> (<local> may be "tcp:0" to pick any open port) localabstract:<unix domain socket name> localreserved:<unix domain socket name> localfilesystem:<unix domain socket name> dev:<character device name> jdwp:<process pid> (remote only) forward --remove LOCAL remove specific forward socket connection forward --remove-all remove all forward socket connections ppp TTY [PARAMETER...] run PPP over USB reverse --list list all reverse socket connections from device reverse [--no-rebind] REMOTE LOCAL reverse socket connection using: tcp:<port> (<remote> may be "tcp:0" to pick any open port) localabstract:<unix domain socket name> localreserved:<unix domain socket name> localfilesystem:<unix domain socket name> r
07-04
Last login: Wed May 28 22:57:11 on ttys000 /Users/wangxuguang/.zshrc:3: no such file or directory: /usr/local/bin/brew /Users/wangxuguang/.zshrc:export:3: not valid in this context: wangxuguang@MacBookPro ~ % pipx install enex2notion zsh: command not found: pipx wangxuguang@MacBookPro ~ % pip Usage: pip <command> [options] Commands: install Install packages. lock Generate a lock file. download Download packages. uninstall Uninstall packages. freeze Output installed packages in requirements format. inspect Inspect the python environment. list List installed packages. show Show information about installed packages. check Verify installed packages have compatible dependencies. config Manage local and global configuration. search Search PyPI for packages. cache Inspect and manage pip's wheel cache. index Inspect information available from package indexes. wheel Build wheels from your requirements. hash Compute hashes of package archives. completion A helper command used for command completion. debug Show information useful for debugging. help Show help for commands. General Options: -h, --help Show help. --debug Let unhandled exceptions propagate outside the main subroutine, instead of logging them to stderr. --isolated Run pip in an isolated mode, ignoring environment variables and user configuration. --require-virtualenv Allow pip to only run in a virtual environment; exit with an error otherwise. --python <python> Run pip with the specified Python interpreter. -v, --verbose Give more output. Option is additive, and can be used up to 3 times. -V, --version Show version and exit. -q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels). --log <path> Path to a verbose appending log. --no-input Disable prompting for input. --keyring-provider <keyring_provider> Enable the credential lookup via the keyring library if user input is allowed. Specify which mechanism to use [auto, disabled, import, subprocess]. (default: auto) --proxy <proxy> Specify a proxy in the form scheme://[user:passwd@]proxy.server:port. --retries <retries> Maximum attempts to establish a new HTTP connection. (default: 5) --timeout <sec> Set the socket timeout (default 15 seconds). --exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort. --trusted-host <hostname> Mark this host or host:port pair as trusted, even though it does not have valid or any HTTPS. --cert <path> Path to PEM-encoded CA certificate bundle. If provided, overrides the default. See 'SSL Certificate Verification' in pip documentation for more information. --client-cert <path> Path to SSL client certificate, a single file containing the private key and the certificate in PEM format. --cache-dir <dir> Store the cache data in <dir>. --no-cache-dir Disable the cache. --disable-pip-version-check Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index. --no-color Suppress colored output. --use-feature <feature> Enable new functionality, that may be backward incompatible. --use-deprecated <feature> Enable deprecated functionality, that will be removed in the future. --resume-retries <resume_retries> Maximum attempts to resume or restart an incomplete download. (default: 0) wangxuguang@MacBookPro ~ % pip3 install enex2notion error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try brew install xyz, where xyz is the package you are trying to install. If you wish to install a Python library that isn't in Homebrew, use a virtual environment: python3 -m venv path/to/venv source path/to/venv/bin/activate python3 -m pip install xyz If you wish to install a Python application that isn't in Homebrew, it may be easiest to use 'pipx install xyz', which will manage a virtual environment for you. You can install pipx with brew install pipx You may restore the old behavior of pip by passing the '--break-system-packages' flag to pip, or by adding 'break-system-packages = true' to your pip.conf file. The latter will permanently disable this error. If you disable this error, we STRONGLY recommend that you additionally pass the '--user' flag to pip, or set 'user = true' in your pip.conf file. Failure to do this can result in a broken Homebrew installation. Read more about this behavior here: <https://peps.python.org/pep-0668/> note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. wangxuguang@MacBookPro ~ %
05-29
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值