在Java Web应用程序中启用NTLM后出现错误-Ubuntu 18.04

时间:2019-02-04 05:35:58

标签: java web-applications ntlm

我创建了一个Java Web应用程序并托管在Ubuntu 18.04中的tomcat 9.0上,我想在我的Java Web应用程序中启用NTLM,因为我已经使用NTLM Http过滤器编辑了web.xml文件。当我浏览网页时,它要求我输入用户名和密码,在输入用户名和密码并单击“确定”后,将导致出现以下错误,HTTP状态为500

Web.xml NTLM过滤器

<filter>
  <filter-name>NtlmHttpFilter</filter-name>
  <filter-class>jcifs.http.NtlmHttpFilter</filter-class>

   <init-param>
  <param-name>jcifs.http.domainController</param-name>
  <param-value>192.168.1.100</param-value>
  </init-param>
  </filter>
  <filter-mapping>
<filter-name>NtlmHttpFilter</filter-name>
<servlet-name>ViewerServlet</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>NtlmHttpFilter</filter-name>
<servlet-name>EngineServlet</servlet-name>

  </filter-mapping>

<init-param>
<param-name>jcifs.smb.client.username</param-name>
<param-value>Admin</param-value>
</init-param>
<init-param>
<param-name>jcifs.smb.client.password</param-name>
<param-value>Admin</param-value>
</init-param>

错误:

jcifs.smb.SmbException: 
jcifs.util.transport.TransportException
java.net.ConnectException: Connection refused (Connection refused)
    at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:400)
    at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:243)
    at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:225)
    at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:402)
    at java.base/java.net.Socket.connect(Socket.java:591)
    at java.base/java.net.Socket.connect(Socket.java:540)
    at java.base/java.net.Socket.<init>(Socket.java:436)
    at java.base/java.net.Socket.<init>(Socket.java:213)
    at jcifs.smb.SmbTransport.ssn139(SmbTransport.java:178)
    at jcifs.smb.SmbTransport.negotiate(SmbTransport.java:236)
    at jcifs.smb.SmbTransport.doConnect(SmbTransport.java:301)
    at jcifs.util.transport.Transport.run(Transport.java:223)
    at java.base/java.lang.Thread.run(Thread.java:844)

    at jcifs.util.transport.Transport.run(Transport.java:239)
    at java.base/java.lang.Thread.run(Thread.java:844)
    jcifs.smb.SmbTransport.connect(SmbTransport.java:288)
    jcifs.smb.SmbSession.getChallenge(SmbSession.java:138)
    jcifs.smb.SmbSession.getChallenge(SmbSession.java:132)
    jcifs.http.NtlmHttpFilter.negotiate(NtlmHttpFilter.java:157)
    jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:114)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

0 个答案:

没有答案