Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the error report when kafka starts

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains how to solve the kafka startup error report. Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "kafka startup error report how to solve" it!

Java HotSpot (TM) 64-Bit Server VM warning: INFO: os::commit_memory (0x00000000c0130000, 986513408, 0) failed; error='Cannot allocate memory' (errno=12)

It is said that there is not enough memory, so there is no way to do it. After consulting the students, you can learn that the default memory of kafka is 1g, and then the vim is 100m directly. Specifically:

Under {$KAFKA_HOME} / bin, directly

Vim kafka-server-start.sh

Then change the export KAFKA_HEAP_OPTS= "- Xmx1G-Xms1G" in it

For export KAFKA_HEAP_OPTS= "- Xmx100m-Xms100m"

Look at the picture:

#! / bin/bash# Licensed to the Apache Software Foundation (ASF) under one or more# contributor license agreements. See the NOTICE file distributed with# this work for additional information regarding copyright ownership.# The ASF licenses this file to You under the Apache License, Version 2. (the "License"); you may not use this file except in compliance with# the License. You may obtain a copy of the License at## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "ASIS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License.if [$#-lt 1] Then echo "USAGE: $0 [- daemon] server.properties" exit 1fibaseballs dirt $(dirname $0) export KAFKA_LOG4J_OPTS= "- Dlog4j.configuration=file:$base_dir/../config/log4j.properties" export KAFKA_HEAP_OPTS= "- Xmx100m-Xms100m" EXTRA_ARGS= "- name kafkaServer-loggc" COMMAND=$1case $COMMAND in-daemon) EXTRA_ARGS= "- daemon" $EXTRA_ARGS shift; *) Esacexec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka $@ so far, I believe you have a deeper understanding of "how to solve the kafka startup error". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report