2017-11-11 155 views
0

我試圖使用本手冊的JMeter連接到Kibana之間的整合:下載elasticsearch-5.6.4.zip https://blogs.sap.com/2016/04/06/load-testing-with-jmeter-test-results-visualization-using-kibana-dashboards/comment-page-1/#comment-398399錯誤,而試圖JMeter的和Kibana

  • 我使用JMeter的3.2和。

  • 我解壓zip,並把該文件夾elasticsearch-5.6.4在C:\的JMeter \ Apache的JMeter的-3.2 \ lib中

  • 我下載了罐子JMeter_ElasticsearchListener.jar並把它放在C:\ JMeter的\ Apache的JMeter的-3.2 \ lib中\分機

  • 我重新啓動JMeter的和按添加 - >監聽器 - >後臺監聽器,並得到這些錯誤:

017-11-11 09:39:12,429 ERROR o.a.j.g.GuiPackage: Problem retrieving gui for org.apache.jmeter.visualizers.backend.BackendListenerGui java.lang.NoClassDefFoundError: org/elasticsearch/client/RestClientBuilder$HttpClientConfigCallback at java.lang.Class.forName0(Native Method) ~[?:1.8.0_141] at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_141] at org.apache.jmeter.visualizers.backend.BackendListenerGui.actionPerformed(BackendListenerGui.java:166) ~[ApacheJMeter_components.jar:3.2 r1790748] at javax.swing.JComboBox.fireActionEvent(Unknown Source) ~[?:1.8.0_141] at javax.swing.JComboBox.setSelectedItem(Unknown Source) ~[?:1.8.0_141] at javax.swing.JComboBox.setSelectedIndex(Unknown Source) ~[?:1.8.0_141] at org.apache.jmeter.visualizers.backend.BackendListenerGui.clearGui(BackendListenerGui.java:281) ~[ApacheJMeter_components.jar:3.2 r1790748] at org.apache.jmeter.gui.GuiPackage.createTestElement(GuiPackage.java:348) ~[ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.gui.action.AddToTree.doAction(AddToTree.java:68) ~[ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:74) ~[ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:59) ~[ApacheJMeter_core.jar:3.2 r1790748] at java.awt.event.InvocationEvent.dispatch(Unknown Source) [?:1.8.0_141] at java.awt.EventQueue.dispatchEventImpl(Unknown Source) [?:1.8.0_141] at java.awt.EventQueue.access$500(Unknown Source) [?:1.8.0_141] at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_141] at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_141] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_141] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) [?:1.8.0_141] at java.awt.EventQueue.dispatchEvent(Unknown Source) [?:1.8.0_141] at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [?:1.8.0_141] at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [?:1.8.0_141] at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [?:1.8.0_141] at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_141] at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_141] at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_141] Caused by: java.lang.ClassNotFoundException: org.elasticsearch.client.RestClientBuilder$HttpClientConfigCallback at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_141] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_141] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_141] ... 25 more 2017-11-11 09:39:40,782 ERROR o.a.j.g.a.AddToTree: Exception while adding a component to tree. java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/elasticsearch/client/RestClientBuilder$HttpClientConfigCallback at org.apache.jmeter.gui.GuiPackage.createTestElement(GuiPackage.java:359) ~[ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.gui.action.AddToTree.doAction(AddToTree.java:68) ~[ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:74) ~[ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:59) ~[ApacheJMeter_core.jar:3.2 r1790748] at java.awt.event.InvocationEvent.dispatch(Unknown Source) [?:1.8.0_141] at java.awt.EventQueue.dispatchEventImpl(Unknown Source) [?:1.8.0_141] at java.awt.EventQueue.access$500(Unknown Source) [?:1.8.0_141] at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_141] at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_141] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_141] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) [?:1.8.0_141] at java.awt.EventQueue.dispatchEvent(Unknown Source) [?:1.8.0_141] at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [?:1.8.0_141] at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [?:1.8.0_141] at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [?:1.8.0_141] at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_141] at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_141] at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_141] Caused by: java.lang.NoClassDefFoundError: org/elasticsearch/client/RestClientBuilder$HttpClientConfigCallback at java.lang.Class.forName0(Native Method) ~[?:1.8.0_141] at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_141] at org.apache.jmeter.visualizers.backend.BackendListenerGui.actionPerformed(BackendListenerGui.java:166) ~[ApacheJMeter_components.jar:3.2 r1790748] at javax.swing.JComboBox.fireActionEvent(Unknown Source) ~[?:1.8.0_141] at javax.swing.JComboBox.setSelectedItem(Unknown Source) ~[?:1.8.0_141] at javax.swing.JComboBox.setSelectedIndex(Unknown Source) ~[?:1.8.0_141] at org.apache.jmeter.visualizers.backend.BackendListenerGui.clearGui(BackendListenerGui.java:281) ~[ApacheJMeter_components.jar:3.2 r1790748] at org.apache.jmeter.gui.GuiPackage.createTestElement(GuiPackage.java:348) ~[ApacheJMeter_core.jar:3.2 r1790748] ... 17 more Caused by: java.lang.ClassNotFoundException: org.elasticsearch.client.RestClientBuilder$HttpClientConfigCallback at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_141] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_141] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_141] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_141] at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_141] at org.apache.jmeter.visualizers.backend.BackendListenerGui.actionPerformed(BackendListenerGui.java:166) ~[ApacheJMeter_components.jar:3.2 r1790748] at javax.swing.JComboBox.fireActionEvent(Unknown Source) ~[?:1.8.0_141] at javax.swing.JComboBox.setSelectedItem(Unknown Source) ~[?:1.8.0_141] at javax.swing.JComboBox.setSelectedIndex(Unknown Source) ~[?:1.8.0_141] at org.apache.jmeter.visualizers.backend.BackendListenerGui.clearGui(BackendListenerGui.java:281) ~[ApacheJMeter_components.jar:3.2 r1790748] at org.apache.jmeter.gui.GuiPackage.createTestElement(GuiPackage.java:348) ~[ApacheJMeter_core.jar:3.2 r1790748] ... 17 more

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

回答

1

你缺少一個罐子,這是REST客戶端jar,只需添加以下jar到您的lib文件夾(C:\ Jmeter \ apache-jmeter-3.2 \ lib)

elasticsearch-rest-client-5.6.4.jar 
1

我不認爲JMeter的遞歸搜索任何文件夾中的「LIB」文件夾中尋找它可以添加到其類路徑中的任何.jar文件,所以我會建議無論是從elasticsearch-5.6.4文件夾移動所有.jar文件到JMeter的「 lib「文件夾。

另外,您可以在下一行添加到user.properties文件

user.classpath=C:\Jmeter\apache-jmeter-3.2\lib\elasticsearch-5.6.4` 

在這兩種情況下,JMeter的重啓將被要求挑選庫了(在你安裝Jmeter的「bin」文件夾的生活) 。

的更多信息: