首页 > 解决方案 > 在 JMeter 的 SMTP 采样器中获取错误 500

问题描述

在 JMeter 中运行 SMTP 采样器时出现此错误:
响应代码:500
响应消息:发送消息时出现 IOException

我在日志中得到以下信息:

javax.mail.MessagingException:在 org.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1167) ~[mail-1.5.0-b01.jar:1.5.0-b01] 处发送消息时出现 IOException。 org.apache.jmeter.protocol.smtp.sampler.SmtpSampler.executeMessage(SmtpSampler. java:169) [ApacheJMeter_mail.jar:3.2 r1790748] 在 org.apache.jmeter.protocol.smtp.sampler.SmtpSampler.sample(SmtpSampler.java:146) [ApacheJMeter_mail.jar:3.2 r1790748] 在 org.apache.jmeter。 threads.JMeterThread.executeSamplePackage(JMeterThread.java:491) [ApacheJMeter_core.jar:3.2 r1790748] 在 org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:425) [ApacheJMeter_core.jar:3.2 r1790748] 在 org. apache.jmeter。thread.JMeterThread.run(JMeterThread.java:254) [ApacheJMeter_core.jar:3.2 r1790748] at java.lang.Thread.run(Unknown Source) [?:1.8.0_201] 原因:java.io.FileNotFoundException: V: \001 Automation\Automation Scripts\Test Plan\Cloud\Final\Priority 6 - java.io.FileInputStream.open0(Native Method) 处的进程(拒绝访问)~[?:1.8.0_201]

问题的原因可能是什么以及如何解决?

标签: jmetersmtp

解决方案


根据错误消息 JMeter 无法访问以下文件:

V:\001 Automation\Automation Scripts\Test Plan\Cloud\Final\Priority 6 - Process

确保修改文件的权限,并确保运行 JMeter 的用户帐户有权访问给定文件。

另请注意,根据 JMeter 最佳实践,您应该始终使用最新版本的 JMeter,因此请考虑尽快升级到JMeter 5.1 (或JMeter 下载页面 上提供的最新稳定版本)。


推荐阅读