前言
1、jmeter启动报错
1.1页面太小,无法完成操作
原因:服务器的内存太小 解决方法:
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) 参考: https://www.cnblogs.com/xiaoxin-test/p/10371100.html
Address already in use: connect
2、Address already in use: connect
解决:
方法一:不勾选 User KeepAlive 方法二:
①win+R输入regedit打开注册表
②修改注册表
计算机\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters MaxUserPort改为65535
③重启电脑 参考: 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
原因:通过代理访问外网,测试时未设置代理 解决:填写代理
4、jmeter非GUI模式模式报错
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(…) returned error code 5. ①win+R输入regedit打开注册表
②计算机\HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft,编辑–权限 修改后 参考:https://www.tqwba.com/x_d/jishu/167516.html
总结
二、使用步骤
1.引入库
2.读入数据
|