Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while starting kafka monitor #1

Open
symehmoo opened this issue Oct 6, 2017 · 1 comment
Open

Error while starting kafka monitor #1

symehmoo opened this issue Oct 6, 2017 · 1 comment

Comments

@symehmoo
Copy link

symehmoo commented Oct 6, 2017

This is my config yaml file for Kafka monitors

 #This will create this metric in all the tiers, under this path
metricPrefix: Custom Metrics|Kafka

#This will create it in specific Tier/Component. Make sure to replace <COMPONENT_ID> with the appropriate one from your environment.
#To find the <COMPONENT_ID> in your environment, please follow the screenshot https://docs.appdynamics.com/display/PRO42/Build+a+Monitoring+Extension+Using+Java
metricPrefix: Server|Component:2087|Custom Metrics|Kafka

# List of Kafka Instances
instances:
  - host: "localhost"
    port: 8165
    username:
    password:
    #encryptedPassword:
    #encryptionKey:
    displayName: "LocalKafkaServer"  #displayName is a REQUIRED field for level metrics.


# number of concurrent tasks.
# This doesn't need to be changed unless many instances are configured
numberOfThreads: 10


# The configuration of different metrics from various mbeans of Kafka server
# For most cases, the mbean configuration does not need to be changed.
mbeans:

#All MBeans which have attributes Count and MeanRate
  - mbeanFullPath: ["kafka.server:type=BrokerTopicMetrics,*",
                    "kafka.server:type=DelayedFetchMetrics,*",
                    "kafka.server:type=KafkaRequestHandlerPool,*",
                    "kafka.server:type=ReplicaManager,name=IsrExpandsPerSec",
                    "kafka.server:type=ReplicaManager,name=IsrShrinksPerSec",
                    "kafka.server:type=SessionExpireListener,*",
                    "kafka.network:type=RequestMetrics,*",
                    "kafka.controller:type=ControllerStats,*"
                  ]
    metrics:
       include:
          - Count: "Count"
          - MeanRate: "MeanRate"

#All MBeans which have attributes Value
  - mbeanFullPath: ["kafka.server:type=DelayedOperationPurgatory,*",
                    "kafka.server:type=KafkaServer,name=BrokerState",
                    "kafka.server:type=ReplicaFetcherManager,*",
                    "kafka.server:type=ReplicaManager,name=LeaderCount",
                    "kafka.server:type=ReplicaManager,name=PartitionCount",
                    "kafka.server:type=ReplicaManager,name=UnderReplicatedPartitions",
                    "kafka.network:type=Processor,*",
                    "kafka.network:type=RequestChannel,*",
                    "kafka.network:type=SocketServer,*"
                   ]
    metrics:
       include:
          - Value: "Value"

When i start the agent it gives me the below error

	... 17 more
[Agent-Monitor-Scheduler-2] 06 Oct 2017 17:34:07,332  INFO KafkaMonitor - Using Monitor Version [Kafka Monitor v1.0.1 Build Date 2017-01-12 18:06:24]
[Agent-Monitor-Scheduler-2] 06 Oct 2017 17:34:07,332  INFO KafkaMonitor - Kafka monitor run completed successfully.
[Monitor-Task-Thread7] 06 Oct 2017 17:34:07,335 ERROR KafkaMonitorTask - Error in Kafka Monitor thread for server {}
java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: 
	java.net.SocketException: Connection reset]
	at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:369)
	at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270)
	at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:229)
	at com.appdynamics.extensions.kafka.JMXConnectionAdapter.open(JMXConnectionAdapter.java:60)
	at com.appdynamics.extensions.kafka.KafkaMonitorTask.extractAndReportMetrics(KafkaMonitorTask.java:71)
	at com.appdynamics.extensions.kafka.KafkaMonitorTask.run(KafkaMonitorTask.java:54)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: 
	java.net.SocketException: Connection reset]
	at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:136)
	at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:205)
	at javax.naming.InitialContext.lookup(InitialContext.java:417)
	at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1955)
	at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1922)
	at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:287)
	... 8 more
Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: 
	java.net.SocketException: Connection reset
	at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:304)
	at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
	at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
	at sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:112)
	at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:132)
	... 13 more
Caused by: java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(SocketInputStream.java:210)
	at java.net.SocketInputStream.read(SocketInputStream.java:141)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
	at java.io.DataInputStream.readByte(DataInputStream.java:265)
	at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:246)
	... 17 more

@kunalgupApDx
Copy link
Contributor

Are you able to connect through jconsole? Please note that jconsole ships with the JDK.

Also, make sure that Kafka has jmx enabled. Please check the below link

https://stackoverflow.com/questions/13741211/jconsole-error-during-jrmp-connection-establishment-nested-exception-is-java-i

For further questions, please open a ticket at [email protected]

ghost pushed a commit that referenced this issue May 1, 2020
…E-953-NFE-for-Infinity to master

* commit 'c20845f883d0889609f9cda2068f128bfff7cb64': (22 commits)
  fixing tc dependencies
  ACE-980 Add readme and nightly build schedule
  ACE-980 Fixed dashboard integration test
  ACE-980 Clean up integration test - keep only extension specific integration test
  ACE-980 Fix integration test for metric char replacer and multiplier
  ACE-980 Fix integration test/config.yml
  ACE-980 Fix integration test/config.yml
  ACE-980 Fix failing integration tests
  ACE-980 updating to commons 2.2.3
  rename workbench dockerfile, update machine agent service name
  rename workbench dockerfile, update encryption command
  Updating encryptionKey to clear text
  add machine_ssl to Makefile
  SSL for BTD - have keys in MA start-up command
  ACE-953 adding truststore for testing
  ACE-953 adding truststore for testing
  ACE-953 revamping to latest BtD standard
  Changing UUID after project rename to fix TC error
  ACE-953 correct uuid
  ACE-953 correct typos
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants