I have created a jhipster
gateway and micro-service project along with a UAA server. It is working fine in my local environment. However, when I try to deploy it to a server and run it, I get an error similar to the below when I try to log in from the server-deployed gateway project:
Not a valid Domain name
Error :
2018-01-25 12:02:42.242 DEBUG 10852 --- [ XNIO-2 task-6] w.i.s.o.OAuth2TokenEndpointClientAdapter : contacting OAuth2 token endpoint to login user: admin
2018-01-25 12:02:42.419 ERROR 10852 --- [ XNIO-2 task-6] c.w.i.s.o.OAuth2AuthenticationService : failed to get OAuth2 tokens from UAA
java.lang.IllegalArgumentException: Not a valid domain name: '192.168.0.202'
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:210)
at com.google.common.net.InternetDomainName.<init>(InternetDomainName.java:155)
at com.google.common.net.InternetDomainName.from(InternetDomainName.java:216)
at com.wdsi.iloads.security.oauth2.OAuth2CookieHelper.getCookieDomain(OAuth2CookieHelper.java:296)
at com.wdsi.iloads.security.oauth2.OAuth2CookieHelper.createCookies(OAuth2CookieHelper.java:109)
at com.wdsi.iloads.security.oauth2.OAuth2AuthenticationService.authenticate(OAuth2AuthenticationService.java:70)
at com.wdsi.iloads.web.rest.AuthResource.authenticate(AuthResource.java:51)
at com.wdsi.iloads.web.rest.AuthResource$$FastClassBySpringCGLIB$$fdfdf7ca.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
at com.wdsi.iloads.aop.logging.LoggingAspect.logAround(LoggingAspect.java:85)
Any help is appreciated.