ERROR : Exiting Kafka due to fatal exception (kafka.Kafk a$) - java

I'm running first time Kafka on my windows 7 and getting error starting the Kafka-Service
I downloaded kafka_2.12-2.0.0 and unzipped on C:\kafka_2.12-2.0.0
In C:\kafka_2.12-2.0.0\config\zookeeper.properties changed
dataDir
to
dataDir=C:/kafka_2.12-2.0.0/data/zookeeper
(folder dataDir=C:/kafka_2.12-2.0.0/data/zookeeper created)
In C:\kafka_2.12-2.0.0\config\server.properties changed
log.dirs
to
log.dirs=C:/kafka_2.12-2.0.0/data/kafka
(folder C:/kafka_2.12-2.0.0/data/kafka created)
Run from cmd with admin permission zookeeper server
\bin\windowszookeeper-server-start.bat
C:\kafka_2.12-2.0.0\config\zookeeper.properties
it's running on port 2181 (getting INFO binding to port
0.0.0./0.0.0.0:2181)
Run from another cmd with admin permission kafka server
\bin\windows\kafka-server-start.bat
C:\kafka_2.12- 2.0.0\config\server.properties
I'm getting error : ERROR Exiting Kafka due to fatal exception (kafka.Kafk
a$)
java.io.FileNotFoundException: C:\kafka_2.12- (The system cannot find the file specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)

You need to give the configuration file location when you start kafka:
bin/kafka-server-start.sh config/server.properties
Also check the getting started page of kafka to check the basic steps to follow in order to validate the installation:
Get started with kafka

Related

Elastic APM Agent Configuration Options are not working

Elasticsearch,kibana and apm-server are installed in a ec2 server
I have installed automatic java agent attach to another server to track jenkins app
Agent is getting attached to the process but dynamic configuration options are not working
Apmagent directory: (command ls)
apm-agent-attach-standalone.jar elasticapm.properties
elasticapm.properties file
service_name="jenkins-dev"
server_url="http://x.x.x.x:8200"
recording=true
enabled=true
log_level="DEBUG"
log_file=_AGENT_HOME_/logs/elastic-apm.log
Attach Command:
sudo java -jar apm-agent-attach-standalone.jar --include '.jenkins.'
->This doesn't pick configuration file but attached the agent
so i used below command to update
sudo java -jar apm-agent-attach-standalone.jar --include '.*jenkins.*' --config recording=false,enabled=false
sudo java -jar apm-agent-attach-standalone.jar --include '.*jenkins.*' --config
config_file=elasticapm.properties log_file=/etc/apmagents/apm.log
Log:
2021-04-12 10:47:20,338 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Error trying to connect to APM Server. Some details about SSL configurations corresponding the current connection are logged at INFO level.
2021-04-12 10:47:20,339 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Failed to handle event of type JSON_WRITER with this error: Connection refused (Connection refused)
2021-04-12 10:47:20,339 [elastic-apm-server-reporter] INFO co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Backing off for 36 seconds (+/-10%)
2021-04-12 10:47:24,345 [elastic-apm-remote-config-poller] ERROR co.elastic.apm.agent.configuration.ApmServerConfigurationSource - Connection refused (Connection refused)
Query:
1.Which is the right way to use the configuration options in command line?
2.Do we need to create a log file or it will create if log_file is used..now its polluting the application log
Try to specify the config_file using the following notation:
-Delastic.apm.config_file=elasticapm.properties
The attacher can create the log file depending on the settings configured during startup. See the [1] current code for a better understanding.
[1] https://github.com/elastic/apm-agent-java/blob/0465d479430172c3e745afd2ef5b62a3da6b60aa/apm-agent-attach-cli/src/main/java/co/elastic/apm/attach/AgentAttacher.java#L79

Intellij debugger giving error for groovy tests while running using gradle test runner but works while using java test runner [duplicate]

I am trying to debug a simple Java application on my machine using Eclipse as an IDE. When I try to debug the application by entering the Debug Perspective, I set a breakpoint and start debug. Within a few seconds, the following pop-up window:
Launching unicodeRead has encountered a problem. Cannot connect to VM.
The message dumped on the console is as follows:
ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:708]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
How do I correct this? Why does this happen?
I just had the same problem.
Yesterday everything worked fine, now nothing - same error as you gave. I found out that network admins made some changes in the meantime. Some firewall stuff. Problem is that Eclipse tries to establish connection to JVM at "localhost" (and some random port). When I tried pinging localhost (or 127.0.0.1) I got following:
C:\Windows\system32>ping 127.0.0.1
Pinging 127.0.0.1 with 32 bytes of data:
PING: transmit failed. General failure.
PING: transmit failed. General failure.
PING: transmit failed. General failure.
PING: transmit failed. General failure.
and
C:\Windows\system32>ping localhost
Ping request could not find host localhost. Please check the name and try again.
It seams that in some cases DNS is expected to resolve this, and if firewall prevents localhost requests to DNS - stuff breaks. I had to alter hosts file and remove comments in following lines, so I would not rely on DNS for this anymore:
# 127.0.0.1 localhost
# ::1 localhost
Although it is written that hosts file changes take effect immediately, I think that some processes locked this and restart was necessary in my case. After that, everything worked again.
Had same problem, but the solution was to run the application with -server=y option and not with -server=n.
Before:
java -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:5005
After:
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:5005
Looks like the same problem as here. A reboot of the pc fixed the problem there. I haven't found any other solutions.
I was seeing an error while using the -X format:
java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=n myapp
The error went away when I switched to the newer format:
java -agentlib:jdwp=transport=dt_socket,server=y,address=4000,suspend=n myapp
Its Very Simple,Just do the Following Changes in eclipse.ini file.
-vm
binary\com.sun.java.jdk.win32.x86_1.6.0.u43\jre\bin\javaw.exe
I changed
-agentlib:jdwp=transport=dt_socket,address=9009,server=n,suspend=y
to
-agentlib:jdwp=transport=dt_socket,address=9009,server=y,suspend=n
and that did the trick!
My case is I have a bunch of domains refer to 127.0.0.1 in hosts file, like this:
127.0.0.1 localhost domian1.local domain2.local domain3.local
one day I added another new domain to refer to 127.0.0.1. By mistake, I put the domain in front of "localhost", like this:
127.0.0.1 domain4.local localhost domian1.local domain2.local domainx.local
After this, I always got an alert window in eclipse while debugging:
Cannot connect to VM
com.sun.jdi.connect.TransportTimeoutException
In console:
ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP: Failed to initialize transport via localhost:50470, trying localhost via 127.0.0.1:50470
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
The solution is keep "localhost" at the first position all the time.
127.0.0.1 localhost domian1.local domain2.local domainx.local domain4.local
What solved for me was deleting the entire domain1 folder inside the domains folder on glassfish main folder.
Eclipse will ask you to recreate a domain and then everything works again.
In eclipse select Run tab -> Debug configuration -> Junit -> select your test name ->
Environment tab -> add variable server=y .
I was getting the same error on my ubuntu machine because of a mishap with the /etc/hosts file. I had commented out the mapping of localhost to 127.0.0.1, and to complicate matters further there was a swap file hanging around.
This was the first line of my /etc/hosts:
127.0.0.1 #localhost
Deleting the # fixed the problem, whereas rebooting understandably had not.
My cause & solution were completely different.
I think in my case it was due to the installation of JProfiler. I fixed it by uninstalling JProfiler and launching eclipse with the -clean option. I suspect that JProfiler was inserting itself in the debugger. The -clean option forces Eclipse to re-assess its plugins, so that alone might have been sufficient.
Continuing #gonadarian's answer, it seems Eclipse uses port 127.0.0.1 for debug purposes. This port is also called localhost. The way this error can be removed is by ensuring that there are no processes or services running on the above ports. The way to do this, on Linux is:
As root, enter the command:
netstat -tulpn | grep 127.0.0.1
If there are processes running on the above port, it will show up in the format:
process_id/process name.
Kill the above processes like so: kill -KILL process_id
Restart the computer for these changes to take effect. The error should no longer occur.

552 5.3.4 Error: message file too big

I have created a .bat file i.e. launchMonthlyreport.bat to launch monthly report (2 excel files) email sending using JavaMail in my application.
launchMonthlyreport.bat
java -Xms128m -Xmx256m -Dlog4j.configuration="..\\conf\\log4j_batch_sendmailmonthlyreport.xml" -jar "X.jar" BATCH_REPORT_FR
NOTE: Its working properly by manually running the launchMonthlyreport.bat file on the server.
i.e No JavaMail error (message file too big)
But I need to run the bat file periodically i.e monthly.
So I'm using JENKINS to run the launchMonthlyreport.bat periodically using the cron job
But I'm getting the following error while trying to build the job
ERROR:
D:\PROJ\TEST_FOLDER\test>java -Xms128m -Xmx256m -Dlog4j.configuration="..\\conf\\log4j_batch_sendmailmonthlyreport.xml" -jar "X.jar" BATCH_REPORT_FR
INFO - Start for batch type = BATCH_REPORT_FR
INFO - [MONTHLY_BATCH_REPORT_FR]-[EXECUTE_REPORTS] Report for A attached
INFO - [MONTHLY_BATCH_REPORT_FR]-[EXECUTE_REPORTS] Report for B attached
INFO - [MAIL] - [SENDER] Sender email address: XYZ#gmail.com
INFO - [MAIL] - [RECIPIENT] Recipient email address: xyz#gmail.com
ERROR - sentMail Error
com.sun.mail.smtp.SMTPSendFailedException: 552 5.3.4 Error: message file too big
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2057)
at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1862)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1100)
at javax.mail.Transport.send0(Transport.java:195)
at javax.mail.Transport.send(Transport.java:124)
at com.lib.service.tool.impl.MailServiceImpl.sentMail(MailServiceImpl.java:39)
at com.batch.general.BatchReportFR.executeReports(BatchReportFR.java:107)
at com.batch.general.BatchReportFR.run(BatchReportFR.java:57)
at com.batch.general.Launcher.main(Launcher.java:16)
It's giving problem only through running through jenkins.
I think that server is telling that the message is too big. If yes, what configuration I need to add to increase the size limit ?
Any suggestions are most welcome.

Wrong registration url in slave nodes of SymmetricDS

I've recently deployed SymmetricDS tutorial example to my Tomcat 8. I have three .war files created from corresponding .properties files: corp-000.war, store-001.war and store-002.war. The sync.url in corp-000.properties file is:
sync.url=http://localhost:8080/corp-000/sync
and in my store-XXX.properties files I have this:
registration.url=http://localhost:8080/corp-000/sync
For some reason, when started all three of them on Tomcat, the log says:
[store-002] - PullService - Failed to connect to the transport: http://localhost:31415/sync/corp-000
[store-002] - PullService - Could not communicate with corp:000:000 at http://localhost:31415/sync/corp-000 because: Connection refused: connect
[store-002] - DefaultOfflineClientListener - Failed to connect to the transport: http://localhost:31415/sync/corp-000
But that is the url that was in files by default, and I've changed it to what I've written above!
When I run corp-000 node on Tomcat and start store-XXX node using the command `bin\sym' (this runs embedded jetty server) everything connects and works. What am I doing wrong?

Unable to deploy in Netbeans 6.7.1 and Glassfish v2.1.1

I am trying to deploy a simple WebService in Netbeans 6.7.1 and Glassfish v2.1.1 and am getting the following error. I am using GlassfishESBv2.2 and windows 7 machine. I have tried googling and implemented things as shown in
http://forums.netbeans.org/topic10055-0-asc-0.html . Still unable to deploy. Though the message says that application server is not started, from the Server tab , I am able to see a message which indicates Glassfish has started.Also , doing a netstat after trying to deploy returns this, which means that Glassfish is running.
C:>netstat -an | findstr "4848"
TCP 0.0.0.0:4848 0.0.0.0:0 LISTENING
I have been trying real hard to get this resolved. Any help is highly appreciated.
Error Message :
The Sun Java System Application Server could not start.
More information about the cause is in the Server log file.
Possible reasons include:
- IDE timeout: refresh the server node to see if it's running now.
- Port conflicts. (use netstat -a to detect possible port numbers already used by the operating system.)
- Incorrect server configuration (domain.xml to be corrected manually)
- Corrupted Deployed Applications preventing the server to start.(This can be seen in the server.log file. In this case, domain.xml needs to be modified).
- Invalid installation location.
C:\Users\xyz\Documents\NetBeansProjects\HWebService\nbproject\build-impl.xml:564: Deployment error:
The Sun Java System Application Server could not start.
More information about the cause is in the Server log file.
Possible reasons include:
- IDE timeout: refresh the server node to see if it's running now.
- Port conflicts. (use netstat -a to detect possible port numbers already used by the operating system.)
- Incorrect server configuration (domain.xml to be corrected manually)
- Corrupted Deployed Applications preventing the server to start.(This can be seen in the server.log file. In this case, domain.xml needs to be modified).
- Invalid installation location.
See the server log for details.
BUILD FAILED (total time: 29 seconds)
I've described the solution please visit here...
http://forums.netbeans.org/post-65058.html

Categories