前言
1、jmeter启动报错
1.1页面太小,无法完成操作
![在这里插入图片描述](https://img-blog.csdnimg.cn/b10103ab495841f18af556ab1ac0e983.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_20,color_FFFFFF,t_70,g_se,x_16) 原因:服务器的内存太小 解决方法:![在这里插入图片描述](https://img-blog.csdnimg.cn/61e5d6a1b31f4726817125f519e7ecb7.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_8,color_FFFFFF,t_70,g_se,x_16) ![在这里插入图片描述](https://img-blog.csdnimg.cn/b7fe0523425b4b99bbd6e08f10622be1.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_20,color_FFFFFF,t_70,g_se,x_16) ![在这里插入图片描述](https://img-blog.csdnimg.cn/010751cb781c409d8614f1fd9206154f.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_17,color_FFFFFF,t_70,g_se,x_16) ![在这里插入图片描述](https://img-blog.csdnimg.cn/cce6a6fbd20c4cb58e6aa29402a280cf.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_16,color_FFFFFF,t_70,g_se,x_16) ![在这里插入图片描述](https://img-blog.csdnimg.cn/98855e15e2294d048be32554f9dd508c.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_15,color_FFFFFF,t_70,g_se,x_16)
1.2 jmeter.log (拒绝访问。)
解决:以管理员身份运行
2022-01-10 13:58:29,628 main ERROR FileManager (jmeter.log) java.io.FileNotFoundException: jmeter.log (拒绝访问。) java.io.FileNotFoundException: jmeter.log (拒绝访问。) at java.io.FileOutputStream.open0(Native Method) at java.io.FileOutputStream.open(Unknown Source) at java.io.FileOutputStream.(Unknown Source) at org.apache.logging.log4j.core.appender.FileManager
F
i
l
e
M
a
n
a
g
e
r
F
a
c
t
o
r
y
.
c
r
e
a
t
e
M
a
n
a
g
e
r
(
F
i
l
e
M
a
n
a
g
e
r
.
j
a
v
a
:
422
)
a
t
o
r
g
.
a
p
a
c
h
e
.
l
o
g
g
i
n
g
.
l
o
g
4
j
.
c
o
r
e
.
a
p
p
e
n
d
e
r
.
F
i
l
e
M
a
n
a
g
e
r
FileManagerFactory.createManager(FileManager.java:422) at org.apache.logging.log4j.core.appender.FileManager
FileManagerFactory.createManager(FileManager.java:422)atorg.apache.logging.log4j.core.appender.FileManagerFileManagerFactory.createManager(FileManager.java:406) at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:113) at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:114) at org.apache.logging.log4j.core.appender.FileManager.getFileManager(FileManager.java:180) at org.apache.logging.log4j.core.appender.FileAppender
B
u
i
l
d
e
r
.
b
u
i
l
d
(
F
i
l
e
A
p
p
e
n
d
e
r
.
j
a
v
a
:
95
)
a
t
o
r
g
.
a
p
a
c
h
e
.
l
o
g
g
i
n
g
.
l
o
g
4
j
.
c
o
r
e
.
a
p
p
e
n
d
e
r
.
F
i
l
e
A
p
p
e
n
d
e
r
Builder.build(FileAppender.java:95) at org.apache.logging.log4j.core.appender.FileAppender
Builder.build(FileAppender.java:95)atorg.apache.logging.log4j.core.appender.FileAppenderBuilder.build(FileAppender.java:51) at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:123) at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:959) at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:899) at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:891) at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514) at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238) at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250) at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:547) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:619) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:636) at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:231) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45) at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194) at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:121) at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43) at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46) at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383) at org.apache.jmeter.JMeter.(JMeter.java:124) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.apache.jmeter.NewDriver.main(NewDriver.java:251)
2022-01-10 13:58:29,643 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
F
i
l
e
M
a
n
a
g
e
r
F
a
c
t
o
r
y
@
60
d
8
c
9
b
7
]
u
n
a
b
l
e
t
o
c
r
e
a
t
e
m
a
n
a
g
e
r
f
o
r
[
j
m
e
t
e
r
.
l
o
g
]
w
i
t
h
d
a
t
a
[
o
r
g
.
a
p
a
c
h
e
.
l
o
g
g
i
n
g
.
l
o
g
4
j
.
c
o
r
e
.
a
p
p
e
n
d
e
r
.
F
i
l
e
M
a
n
a
g
e
r
FileManagerFactory@60d8c9b7] unable to create manager for [jmeter.log] with data [org.apache.logging.log4j.core.appender.FileManager
FileManagerFactory@60d8c9b7]unabletocreatemanagerfor[jmeter.log]withdata[org.apache.logging.log4j.core.appender.FileManagerFactoryData@48aaecc3] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.FileManager
F
i
l
e
M
a
n
a
g
e
r
F
a
c
t
o
r
y
@
60
d
8
c
9
b
7
]
u
n
a
b
l
e
t
o
c
r
e
a
t
e
m
a
n
a
g
e
r
f
o
r
[
j
m
e
t
e
r
.
l
o
g
]
w
i
t
h
d
a
t
a
[
o
r
g
.
a
p
a
c
h
e
.
l
o
g
g
i
n
g
.
l
o
g
4
j
.
c
o
r
e
.
a
p
p
e
n
d
e
r
.
F
i
l
e
M
a
n
a
g
e
r
FileManagerFactory@60d8c9b7] unable to create manager for [jmeter.log] with data [org.apache.logging.log4j.core.appender.FileManager
FileManagerFactory@60d8c9b7]unabletocreatemanagerfor[jmeter.log]withdata[org.apache.logging.log4j.core.appender.FileManagerFactoryData@48aaecc3] at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:115) at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:114) at org.apache.logging.log4j.core.appender.FileManager.getFileManager(FileManager.java:180) at org.apache.logging.log4j.core.appender.FileAppender
B
u
i
l
d
e
r
.
b
u
i
l
d
(
F
i
l
e
A
p
p
e
n
d
e
r
.
j
a
v
a
:
95
)
a
t
o
r
g
.
a
p
a
c
h
e
.
l
o
g
g
i
n
g
.
l
o
g
4
j
.
c
o
r
e
.
a
p
p
e
n
d
e
r
.
F
i
l
e
A
p
p
e
n
d
e
r
Builder.build(FileAppender.java:95) at org.apache.logging.log4j.core.appender.FileAppender
Builder.build(FileAppender.java:95)atorg.apache.logging.log4j.core.appender.FileAppenderBuilder.build(FileAppender.java:51) at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:123) at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:959) at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:899) at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:891) at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514) at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238) at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250) at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:547) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:619) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:636) at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:231) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45) at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194) at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:121) at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43) at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46) at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383) at org.apache.jmeter.JMeter.(JMeter.java:124) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.apache.jmeter.NewDriver.main(NewDriver.java:251)
2022-01-10 13:58:29,645 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.FileAppender for element File: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.FileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.FileAppender at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:235) at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:135) at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:959) at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:899) at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:891) at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514) at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238) at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250) at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:547) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:619) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:636) at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:231) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45) at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194) at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:121) at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43) at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46) at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383) at org.apache.jmeter.JMeter.(JMeter.java:124) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.apache.jmeter.NewDriver.main(NewDriver.java:251) ![jmeter启动报错](https://img-blog.csdnimg.cn/4f8a787f209146218ff80f5ec94ea306.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_20,color_FFFFFF,t_70,g_se,x_16) ![在这里插入图片描述](https://img-blog.csdnimg.cn/98bd225747d946e4943da38000a9aebd.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_20,color_FFFFFF,t_70,g_se,x_16) ![在这里插入图片描述](https://img-blog.csdnimg.cn/83693c604ce04a52872eeb9f5ee5815b.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_20,color_FFFFFF,t_70,g_se,x_16) 参考: https://www.cnblogs.com/xiaoxin-test/p/10371100.html
Address already in use: connect
2、Address already in use: connect
![在这里插入图片描述](https://img-blog.csdnimg.cn/41035157ac9d4ed49ef0e57f5d0b9019.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_20,color_FFFFFF,t_70,g_se,x_16) 解决:
方法一:不勾选 User KeepAlive ![在这里插入图片描述](https://img-blog.csdnimg.cn/b8db6807deb84eca9e4361a80d907722.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_20,color_FFFFFF,t_70,g_se,x_16) 方法二:
①win+R输入regedit打开注册表
②修改注册表
计算机\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters MaxUserPort改为65535
③重启电脑 ![在这里插入图片描述](https://img-blog.csdnimg.cn/ab45d8e5cde14aa99463d7e5deb09f19.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_20,color_FFFFFF,t_70,g_se,x_16) ![在这里插入图片描述](https://img-blog.csdnimg.cn/7f7e7036d5e54e3f8021a4a8ad3e55a7.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_20,color_FFFFFF,t_70,g_se,x_16) ![在这里插入图片描述](https://img-blog.csdnimg.cn/f5ccf671428a41ce982424d46ecdf9e3.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_20,color_FFFFFF,t_70,g_se,x_16) 参考: https://blog.csdn.net/MenofGod/article/details/84589751?spm=1001.2101.3001.6650.8&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8.no_search_link&utm_relevant_index=13
https://blog.51cto.com/u_11959825/2448892
https://blog.csdn.net/weixin_43125048/article/details/103379118
3、Socket operation on nonsocket: connect
原因:通过代理访问外网,测试时未设置代理 ![在这里插入图片描述](https://img-blog.csdnimg.cn/7e5651c6196749a1b4fc3be05997e3cd.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_20,color_FFFFFF,t_70,g_se,x_16) 解决:填写代理 ![在这里插入图片描述](https://img-blog.csdnimg.cn/9f738ec2c5964804a43d0f6200e5837b.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_20,color_FFFFFF,t_70,g_se,x_16)
4、jmeter非GUI模式模式报错
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(…) returned error code 5. ![在这里插入图片描述](https://img-blog.csdnimg.cn/afe27a2709034050bc978f3af798d4f0.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_20,color_FFFFFF,t_70,g_se,x_16) ①win+R输入regedit打开注册表
②计算机\HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft,编辑–权限 ![在这里插入图片描述](https://img-blog.csdnimg.cn/010885748b1a44f5b1f50fe210d61868.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_20,color_FFFFFF,t_70,g_se,x_16) 修改后 ![在这里插入图片描述](https://img-blog.csdnimg.cn/e5ee810f44314fa9ab5702e0caa53a85.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAd3dhbmdsaW1laWk=,size_20,color_FFFFFF,t_70,g_se,x_16) 参考:https://www.tqwba.com/x_d/jishu/167516.html
总结
二、使用步骤
1.引入库
2.读入数据
|