原因:权限执行不够,改为root用户即可 :sudo su
日志报错如下:
test:
[jmeter] Executing test plan: /home/ec2-user/jmeterProgram/apache-jmeter-5.1.1/testcase/freshAIF3.jmx ==> /home/ec2-user/jmeterProgram/apache-jmeter-5.1.1/testcase/report/jtl/TestReport_201908020151.jtl
[jmeter] 2019-08-02 01:51:34,734 main ERROR FileManager (jmeter.log) java.io.FileNotFoundException: jmeter.log (ȨО²»¹») java.io.FileNotFoundException: jmeter.log (ȨО²»¹»)
[jmeter] at java.io.FileOutputStream.open0(Native Method)
[jmeter] at java.io.FileOutputStream.open(FileOutputStream.java:270)
[jmeter] at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
[jmeter] at org.apache.logging.log4j.core.appender.FileManager$FileManagerFactory.createManager(FileManager.java:422)
[jmeter] at org.apache.logging.log4j.core.appender.FileManager$FileManagerFactory.createManager(FileManager.java:406)
[jmeter] at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:113)
[jmeter] at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:114)
[jmeter] at org.apache.logging.log4j.core.appender.FileManager.getFileManager(FileManager.java:180)
[jmeter] at org.apache.logging.log4j.core.appender.FileAppender$Builder.build(FileAppender.java:95)
[jmeter] at org.apache.logging.log4j.core.appender.FileAppender$Builder.build(FileAppender.java:51)
[jmeter] at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:123)
[jmeter] at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:959)
[jmeter] at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:899)
[jmeter] at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:891)
[jmeter] at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514)
[jmeter] at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238)
[jmeter] at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250)
[jmeter] at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:547)
[jmeter] at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:619)
[jmeter] at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:636)
[jmeter] at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:231)
[jmeter] at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
[jmeter] at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
[jmeter] at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
[jmeter] at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:121)
[jmeter] at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43)
[jmeter] at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46)
[jmeter] at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
[jmeter] at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
[jmeter] at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
[jmeter] at org.apache.jmeter.JMeter.<clinit>(JMeter.java:124)
[jmeter] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[jmeter] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[jmeter] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[jmeter] at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[jmeter] at org.apache.jmeter.NewDriver.main(NewDriver.java:251)
[jmeter]
[jmeter] 2019-08-02 01:51:34,755 main ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.FileAppender for element File: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.FileManager$FileManagerFactory@159f197] unable to create manager for [jmeter.log] with data [org.apache.logging.log4j.core.appender.FileManager$FactoryData@78aab498] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.FileManager$FileManagerFactory@159f197] unable to create manager for [jmeter.log] with data [org.apache.logging.log4j.core.appender.FileManager$FactoryData@78aab498]
☀️☀️☀️☀️☀️☀️ 我心,我向,我路,我步
☀️☀️☀️☀️☀️☀️
用心分享,做一个测试路上不断成长的人
QQ总结和分享群:537188253
☀️☀️☀️☀️☀️☀️
随笔总结不当之处欢迎评论区留言交流,博主24小时在线回复
博客地址:https://www.cnblogs.com/yoyoblogs/
☀️☀️☀️☀️☀️☀️