0

我正在尝试在 jenkins 中发布一个项目并获得未找到主机的异常。

Caused by: java.lang.RuntimeException: java.net.UnknownHostException: XXXXXXXXXXXXXXX: nodename nor servname provided, or not known
    at org.apache.maven.scm.provider.perforce.PerforceScmProvider.generateDefaultClientspecName(PerforceScmProvider.java:420)
    at org.apache.maven.scm.provider.perforce.PerforceScmProvider.getClientspecName(PerforceScmProvider.java:395)
    at org.apache.maven.scm.provider.perforce.command.checkout.PerforceCheckOutCommand.executeCheckOutCommand(PerforceCheckOutCommand.java:75)
    at org.apache.maven.scm.command.checkout.AbstractCheckOutCommand.executeCommand(AbstractCheckOutCommand.java:82)
    at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59)

阅读源代码,它看起来像是在这一行引发了异常:

InetAddress.getLocalHost().getHostName();

由于除了更改代码之外我不控制发布插件的来源,有什么办法可以解决这个问题吗?

4

1 回答 1

0

我发现了周围的工作。在命令行上运行命令

hostname <your-ip or actual-hostname>
于 2013-05-22T23:50:47.283 回答