Resharper Teamcity Visual Studio Plugin "Failed to Connect - Failed in all authentication modules"

Completed

Hello,


Last Friday I updated our Teamcity server to use 64bit java because we migrated to using Git and the fetch process was failing because of OutOfMemery errors. That Git fetch error has been resolved, however ever since we have not been able to login using the Visual Studio TeamCity plugin. The error message returned is:

Failed to connect to the server http://<TeamCityServer>/: Login failed in all authentication modules with messages:

There are no messages printed in the error window.

Any help would be greatly appreciated.

Cheers,

Tim

3 comments
Comment actions Permalink

I have been doing some more investigation and have found this in the teamcity-auth.log:

[2020-01-14 17:02:59,916]   WARN [", no auth; http-nio-80-exec-1] - Login for user "internal\tim79330" failed for module "Microsoft Windows domain" (jetbrains.buildServer.serverSide.impl.auth.NTDomainLoginModule), took 1ms. Details: javax.security.auth.login.LoginException: java.lang.IllegalStateException: Shaj did not initialize correctly.
	at com.cenqua.shaj.Authenticator.getDefault(Authenticator.java:22)
	at com.cenqua.shaj.Shaj.checkPassword(Shaj.java:81)
	at jetbrains.buildServer.serverSide.impl.auth.shaj.ShajBasedAuthenticator.authenticate(ShajBasedAuthenticator.java:52)
	at jetbrains.buildServer.serverSide.impl.auth.NTDomainLoginModule.login(NTDomainLoginModule.java:75)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at javax.security.auth.login.LoginContext.invoke(LoginContext.java:755)
	at javax.security.auth.login.LoginContext.access$000(LoginContext.java:195)
	at javax.security.auth.login.LoginContext$4.run(LoginContext.java:682)
	at javax.security.auth.login.LoginContext$4.run(LoginContext.java:680)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
	at javax.security.auth.login.LoginContext.login(LoginContext.java:587)
	at jetbrains.buildServer.serverSide.impl.auth.ServerLoginModelImpl.lambda$null$1(ServerLoginModelImpl.java:50)
	at jetbrains.buildServer.plugins.PluginSupportUtil.switchClassLoader(PluginSupportUtil.java:19)
	at jetbrains.buildServer.serverSide.impl.auth.ServerLoginModelImpl.lambda$doTryToLogin$2(ServerLoginModelImpl.java:123)
	at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledCheck(BaseAccessChecker.java:44)
	at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.runSafeNetworkOperation(SecondaryNodeSecurityManager.java:28)
	at jetbrains.buildServer.serverSide.ReadOnlyRestrictor.doReadOnlyNetworkOperation(ReadOnlyRestrictor.java:7)
	at jetbrains.buildServer.serverSide.impl.auth.ServerLoginModelImpl.doTryToLogin(ServerLoginModelImpl.java:2)
	at jetbrains.buildServer.serverSide.impl.auth.ServerLoginModelImpl.lambda$tryToLogin$0(ServerLoginModelImpl.java:130)
	at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadNameFuncThrow(NamedThreadFactory.java:107)
	at jetbrains.buildServer.serverSide.impl.auth.ServerLoginModelImpl.tryToLogin(ServerLoginModelImpl.java:103)
	at jetbrains.buildServer.serverSide.impl.auth.ServerLoginModelImpl.doCheckCredentials(ServerLoginModelImpl.java:34)
	at jetbrains.buildServer.serverSide.impl.auth.ServerLoginModelImpl.login(ServerLoginModelImpl.java:80)
	at jetbrains.buildServer.serverSide.impl.auth.XmlRpcAuthenticationServer.authenticate(XmlRpcAuthenticationServer.java:9)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at jetbrains.buildServer.serverSide.impl.ExceptionCollectorWrapper.execute(ExceptionCollectorWrapper.java:54)
	at jetbrains.buildServer.controllers.XmlRpcHandlerManagerImpl$1.execute(XmlRpcHandlerManagerImpl.java:1)
	at org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:84)
	at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:146)
	at org.apache.xmlrpc.TCXmlRpcServer$TCXmlRpcWorker.execute(TCXmlRpcServer.java:50)
	at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:139)
	at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:114)
	at jetbrains.buildServer.controllers.XmlRpcController$1.call(XmlRpcController.java:3)
	at jetbrains.buildServer.controllers.XmlRpcController$1.call(XmlRpcController.java:2)
	at jetbrains.buildServer.serverSide.impl.XmlRpcSessionManager.executeRequest(XmlRpcSessionManager.java:34)
	at jetbrains.buildServer.controllers.XmlRpcController.lambda$handleRequestInternal$0(XmlRpcController.java:20)
	at jetbrains.buildServer.controllers.XmlRpcController.handleRequestInternal(XmlRpcController.java:29)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:174)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
	at jetbrains.buildServer.maintenance.TeamCityDispatcherServlet.processedByMainServlet(TeamCityDispatcherServlet.java:34)
	at jetbrains.buildServer.maintenance.TeamCityDispatcherServlet.service(TeamCityDispatcherServlet.java:15)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at jetbrains.buildServer.web.jsp.JspPrecompilerFilter.doFilter(JspPrecompilerFilter.java:92)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at jetbrains.buildServer.web.DisableSessionIdFromUrlFilter.doFilter(DisableSessionIdFromUrlFilter.java:6)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at jetbrains.buildServer.web.UserIdProviderFilter.doFilter(UserIdProviderFilter.java:8)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at jetbrains.buildServer.web.NodeInfoHeaderFilter.doFilter(NodeInfoHeaderFilter.java:8)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:107)
	at jetbrains.buildServer.diagnostic.web.DiagnosticFilter.doFilter(DiagnosticFilter.java:60)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:112)
	at jetbrains.buildServer.web.DependencyParametersCalculationContextFilter.doFilter(DependencyParametersCalculationContextFilter.java:3)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:112)
	at jetbrains.buildServer.web.HttpSecurityHeadersFilter.doFilter(HttpSecurityHeadersFilter.java:58)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:112)
	at jetbrains.buildServer.web.CSRFFilter.doFilter(CSRFFilter.java:112)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:112)
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:73)
	at jetbrains.buildServer.web.DelegatingFilter.doFilter(DelegatingFilter.java:61)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at jetbrains.buildServer.web.ResponseFragmentFilter.doFilter(ResponseFragmentFilter.java:12)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)

Is it possible that some component doesn't support 64bit Java?

0
Comment actions Permalink

I had a response through youtrack and they pointed me to this fix: https://youtrack.jetbrains.com/issue/TW-30234?_ga=2.200889002.587786727.1578885557-250081018.1568180641

The resolution is to remove the ntlm.compatibilityMode=true from "C:\ProgramData\Jetbrains\TeamCity\config\ntlm-config.properties".

After this the plugin started working, didn't require any restart of service or server.

Tim

0
Comment actions Permalink

The cause of this problem is using legacy Windows domain authentication mode. Please check if your ntlm-config.properties file contains an obsolete option "ntlm.compatibilityMode=true" and remove it.
View the appropriate comment in an issue https://youtrack.jetbrains.com/issue/TW-30234.

0

Please sign in to leave a comment.