Kafka Server Start Command is Not Working - windows

I am New to Apache Kafka, I am trying to run .\bin\windows\kafka-server-start.bat .\config\server.properties command from a windows machine to start Kafka server but I am not Getting any kind of response to the Command-Prompt screen, neither any Error message nor any success message, it just threw me to a new command line. Although I am able to run Zookeeper Server successfully. I have updated server.properties and zookeeper.properties file properly. Also, I have set Java Path correctly.
Could you please tell me what am I doing wrong.

The issue has resolved for me after I added a line in User Variable Path in Environment Variable.
%SystemRoot%\System32\Wbem;%SystemRoot%\System32\;SystemRoot%

Related

How to keep logstash service running when I logout from remote server

I configure logstash service following the instructions in the link https://www.elastic.co/guide/en/logstash/current/running-logstash-windows.html (logstash as a service using nssm) but I noted that the service does actually not running when I am disconnected from the remote server I installed it.
Is there a way to fix this problem?
thanks,
g
The same thing happens also running logstash manually (I mean , running the appropriate bat file in command prompt).

filenotfoundException when using startNode.bat command

I am trying to restart my node by running StartNode.bat in cmd. But it is giving me the following error,
ADMU0111E: Program exiting with error: java.io.FileNotFoundException: C:\Users{userid}\workspaces\was_profiles{profilename}\config\cells\localcell\nodes\localnode\servers\nodeagent\server.xml (The system cannot find the path specified.) When I checked the above path, server.xml is present in the path C:\Users{userid}\workspaces\was_profiles{profilename}\config\cells\localcell\nodes\localnode\servers\server1\server.xml. I am not sure how to restart my node. Also, I am restarting the node, since I get ORA error invalid username/password issue while trying to test my datasource connection in IBM websphere.
Most of the posts suggest me to restart websphere server and nodeagent as well. Eventually, when I start the nodeagent, I get the above error. I tried to use syncNode command, but could not find the deployment manager host name, port details for my application.
It looks like you have single server version installed, not network deployment. In that case you dont have node and deployment manager, but just single server.
You should use commands like:
startServer.bat server1 - to start the server
stopServer.bat server1 - to stop server

Kafka 1.0 stops with FATAL SHUTDOWN error. Logs directory failed

I have just upgraded to Kafka 1.0 and zookeeper 3.4.10.At first, it all started fine. Stand - alone producer and consumer worked as expected. After I've ran my code for about 10 minutes, Kafka fails with this error:
[2017-11-07 16:48:01,304] INFO Stopping serving logs in dir C:\Kafka\kafka_2.12-1.0.0\kafka-logs (kafka.log.LogManager)
[2017-11-07 16:48:01,320] FATAL Shutdown broker because all log dirs in C:\Kafka\kafka_2.12-1.0.0\kafka-logs have failed (kafka.log.LogManager)
I have reinstalled and reconfigured Kafka 1.0 again, the same thing happened. If I try to restart, the same error occurs.
Deleting log files helps to start Kafka, but it fails again after the short run.
I have been running 0.10.2 version for a long while, and never encountered anything like this, it was very stable over the long periods of time.
I have tried to find a solution and followed instructions in the documentation.
This is not yet a production environment, it is fairly simple setup, one producer, one consumer reading from one topic.
I am not sure if this could have anything to do with zookeeper.
**Update: ** the issue has been posted at Apache JIRA board
The consensus so far seems to be that it is a Windows issue.
Ran into this issue as well, and only clearing the kafka-logs did not work. You'll also have to clear zookeeper.
Steps to resolve:
Make sure to stop zookeeper.
Take a look at your server.properties file and locate the logs directory under the following entry.
Example:
log.dirs=/tmp/kafka-logs/
Delete the log directory and its contents. Kafka will recreate the directory once it's started again.
Take a look at the zookeeper.properties file and locate the data directory under the following entry.
Example:
dataDir=/tmp/zookeeper
Delete the data directory and its contents. Zookeeper will recreate the directory once it's started again.
Start zookeeper.
<KAFKA_HOME>bin/zookeeper-server-start.sh -daemon <KAFKA_HOME>config/zookeeper.properties
Start the kakfa broker.
<KAFKA_HOME>bin/kafka-server-start.sh -daemon <KAFKA_HOME>config/server.properties
Verify the broker has started with no issues by looking at the logs/kafkaServer.out log file.
I've tried all the solutions like
Clearing Kafka Logs and Zookeeper Data (issue reoccurred after creating new topic)
Changing log.dirs path from forward slash "/" to backward slash "\" (like log.dirs=C:\kafka_2.12-2.1.1\data\kafka ) folder named C:\kafka_2.12-2.1.1\kafka_2.12-2.1.1datakafka was created and the issue did stop and the issue was resolved.
Finally I found this link, you'll get it if you google kafka log.dirs windows
Just clean the logs in C:\Kafka\kafka_2.12-1.0.0\kafka-logs and restart kafka
If at all, you are trying to execute in Windows machine, try changing path in windows way for parameter log.dirs (like log.dirs=C:\some_path\some_path_kafLogs) in server.properties in /config folder.
By default, this path will be in unix way (like /unix/path/).
This worked for me in Windows machine.
So this seems to be a windows issue.
https://issues.apache.org/jira/browse/KAFKA-6188
The JIRA is resolved, and there is an unmerged patch attached to it.
https://github.com/apache/kafka/pull/6403
so your options are:
get it running on windows and build it with the patch
run it in a unix style filesystem (linux or mac)
perhaps running it on docker in windows is worth a shot
The problem is in a concurrent working with log files of kafka. The task is a delaying of external log files changing between all Kafka threads and
Topic configuration can help:
Map<String, String> config = new HashMap<>();
config.put(CLEANUP_POLICY_CONFIG, CLEANUP_POLICY_COMPACT);
config.put(FILE_DELETE_DELAY_MS_CONFIG, "3600000");
config.put(DELETE_RETENTION_MS_CONFIG, "864000000");
config.put(RETENTION_MS_CONFIG, "86400000");
What worked for me was deleting both kafka and zookeeper log directories then configuring my log directories path in both kafka and zookeeper server.properties files (can be found in kafka/conf/server.properties) from the usual slash '/' to a backslash '\'
on windows changing to path separators '' resolved the issue, each required a double backslash ' C:\\path\\logs
Simply delete all the logs from :
C:\tmp\kafka-logs
and restart zookeeper and kafka server.

Kafka server start is not working on command line

If i try to run below command in order to start kafka server on CMD (Command Propmt)
C:\kafka_2.12-0.11.0.0\bin\windows\kafka-server-start.bat ..\..\config\server.properties
I get error as below
Question:
I just started to learn kafka so if i try to run above command i can not start kafka server.Where i miss exactly ? I still get error despite i delete log files.How can i start kafka server ?
Any help will be appreciated.
Thanks.
See if the log.dirs configuration is wrong
I had the same problem. I restarted my machine thinking the file in contention will be cleared after restart. That didn't help. So, I cleared out the entire tmp\kafka-logs directory and restarted the kafka server and it worked fine.

Error configuring wildfly as a windows service

I am using wildfly 10.1 in standalone mode and need to use it as a service.
I copied the service files to the bin folder and then installed the service from the command prompt.
This works well, except that it is impossible to stop the service without killing the process using taskkill.
As a fix, I tried replacing
set DESCRIPTION="WildFly Application Server"
with
set DESCRIPTION=WildFly Application Server
in the service.bat file as mentioned here. But this is causing the service not to start. The system log says:
The Wildfly service terminated with the following service-specific
error: Incorrect function.
How can I fix this issue and get the service starting and stoppping normally?
Add System variable JAVA_HOME to System variable and try to start the service. It worked for me.

Resources