记录一次kafka的报错

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了记录一次kafka的报错相关的知识,希望对你有一定的参考价值。

参考技术A 第一个问题java日志中报错连接不上kafka

查看了一下防火墙 selinux都已经关闭,telnet kafka的端口也是通的
去看kafka的日志

org.apache.kafka.common.network.InvalidReceiveException: Invalid receive (size = 369296128 larger than 104857600)

这是因为发送的消息超过了kafka默认的大小 默认是100m
在配置文件server.properties中修改socket.request.max.bytes的值,修改之后不再报错

第二个问题 kafka报错oom

java.lang.OutOfMemoryError: Java heap space很明显的oom内存溢出的报错
找到kafka的启动脚本kafka-server-start.sh 将启动命令中-Xmx1G -Xms1G改成合适的值(默认1G)

关于tensorboard --logdir=logs的报错解决办法记录

我在运行tensorboard --logdir=logs时,产生了如下的报错,找遍全网后,解决办法如下

先卸载

pip uninstall tensorboard

再安装

pip install tensorboard

最后出现如下报错

Traceback (most recent call last):
File “d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\tensorboard\\compat_init_.py”, line 42, in tf
from tensorboard.compat import notf # noqa: F401
ImportError: cannot import name ‘notf’ from ‘tensorboard.compat’ (d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\tensorboard\\compat_init_.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “d:\\newanaconda\\envs\\imooc_aiai\\lib\\runpy.py”, line 194, in run_module_as_main
return run_code(code, main_globals, None,
File “d:\\newanaconda\\envs\\imooc_aiai\\lib\\runpy.py”, line 87, in run_code
exec(code, run_globals)
File "D:\\newanaconda\\envs\\imooc_aiai\\Scripts\\tensorboard.exe_main
.py", line 7, in
File “d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\tensorboard\\main.py”, line 39, in run_main
main_lib.global_init()
File “d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\tensorboard\\main_lib.py”, line 40, in global_init
if getattr(tf, “version”, “stub”) == “stub”:
File “d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\tensorboard\\lazy.py”, line 65, in getattr
return getattr(load_once(self), attr_name)
File “d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\tensorboard\\lazy.py”, line 97, in wrapper
cache[arg] = f(arg)
File “d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\tensorboard\\lazy.py”, line 50, in load_once
module = load_fn()
File "d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\tensorboard\\compat_init
.py", line 45, in tf
import tensorflow
File "d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\tensorflow_init
.py", line 41, in
from tensorflow.python.tools import module_util as module_util
File "d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\tensorflow\\python_init
.py", line 40, in
from tensorflow.python.eager import context
File “d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\tensorflow\\python\\eager\\context.py”, line 32, in
from tensorflow.core.framework import function_pb2
File “d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\tensorflow\\core\\framework\\function_pb2.py”, line 16, in
from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
File “d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\tensorflow\\core\\framework\\attr_value_pb2.py”, line 16, in
from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
File “d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\tensorflow\\core\\framework\\tensor_pb2.py”, line 16, in
from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2
File “d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\tensorflow\\core\\framework\\resource_handle_pb2.py”, line 16, in
from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
File “d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\tensorflow\\core\\framework\\tensor_shape_pb2.py”, line 36, in
_descriptor.FieldDescriptor(
File “d:\\newanaconda\\envs\\imooc_aiai\\lib\\site-packages\\google\\protobuf\\descriptor.py”, line 560, in new
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.
  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

解决办法

 pip install protobuf==3.19.0 -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn


最后成功

以上是关于记录一次kafka的报错的主要内容,如果未能解决你的问题,请参考以下文章

Slave_SQL_Running: No 报错一次解决

一次mysql 用户不存在的报错

脚本调试:一次换行符导致的报错

yum 记一次安装时的报错

记录一次mount问题

记一次修改sga大小之后出现的一系列报错