By: Max Anderson Account Admin 27 Oct 2017 at 2:48 p.m. CDT

15 Responses
Max Anderson gravatar
I just spun up a brand new Ubuntu 16.04 instance on GCP to try out the new version 3.1.1. After following the instructions, as well as I've set up several of these in the past on prior version I'm getting an error on initial view of the web page. ``` 2017-10-26 18:23:28,820 WARN [main] [org.jboss.resteasy.spi.metadata.ResourceBuilder$ResourceMethodBuilder] (ResourceBuilder.java:581) - RESTEASY002141: MediaType text/plain on requestAuthorizationPost() lacks charset. Consider setting charset or turning on context parameter resteasy.add.charset 2017-10-26 18:23:28,873 WARN [main] [org.jboss.resteasy.spi.metadata.ResourceBuilder$ResourceMethodBuilder] (ResourceBuilder.java:581) - RESTEASY002141: MediaType application/xml on get() lacks charset. Consider setting charset or turning on context parameter resteasy.add.charset 2017-10-26 18:23:28,874 WARN [main] [org.jboss.resteasy.spi.metadata.ResourceBuilder$ResourceMethodBuilder] (ResourceBuilder.java:581) - RESTEASY002141: MediaType application/xml on get() lacks charset. Consider setting charset or turning on context parameter resteasy.add.charset 2017-10-26 18:23:28,986 WARN [main] [org.jboss.resteasy.spi.metadata.ResourceBuilder$ResourceMethodBuilder] (ResourceBuilder.java:581) - RESTEASY002141: MediaType text/plain on requestEndSession() lacks charset. Consider setting charset or turning on context parameter resteasy.add.charset 2017-10-26 18:23:28,993 WARN [main] [org.jboss.resteasy.spi.metadata.ResourceBuilder$ResourceMethodBuilder] (ResourceBuilder.java:581) - RESTEASY002141: MediaType text/plain on requestEndSession() lacks charset. Consider setting charset or turning on context parameter resteasy.add.charset 2017-10-26 18:23:28.997:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@3abbfa04{/oxauth,[file:///opt/jetty-9.3/temp/jetty-localhost-8081-oxauth.war-_oxauth-any-3147706454938818242.dir/webapp/, jar:file:///opt/jetty-9.3/temp/jetty-localhost-8081-oxauth.war-_oxauth-any-3147706454938818242.dir/webapp/WEB-INF/lib/jsf-impl-2.2.14.jar!/META-INF/resources, jar:file:///opt/jetty-9.3/temp/jetty-localhost-8081-oxauth.war-_oxauth-any-3147706454938818242.dir/webapp/WEB-INF/lib/oxauth-static-3.1.1.Final.jar!/META-INF/resources],AVAILABLE}{/oxauth.war} 2017-10-26 18:23:29.015:INFO:oejsh.ContextHandler:main: Started o.e.j.s.h.ContextHandler@24f6375b{/oxauth/ext/resources,null,AVAILABLE} 2017-10-26 18:23:29.038:INFO:oejs.AbstractConnector:main: Started ServerConnector@71dfa128{HTTP/1.1,[http/1.1]}{localhost:8081} 2017-10-26 18:23:29.038:INFO:oejs.Server:main: Started @21068ms Oct 26, 2017 6:24:37 PM org.ocpsoft.rewrite.param.DefaultParameterValueStore INFO: Loaded [1] org.ocpsoft.rewrite.spi.GlobalParameterProvider [org.ocpsoft.rewrite.instance.WildcardParameterProvider<0>] 2017-10-26 18:24:37,969 INFO [qtp2008017533-14] [org.xdi.oxauth.service.ApplicationFactory] (ApplicationFactory.java:59) - Cache configuration: CacheConfiguration{cacheProviderType=IN_MEMORY, memcachedConfiguration=MemcachedConfiguration{servers='localhost:11211', maxOperationQueueLength=100000, bufferSize=32768, defaultPutExpiration=60, connectionFactoryType=DEFAULT}, redisConfiguration=RedisConfiguration{servers='localhost:6379', defaultPutExpiration=60, redisProviderType=STANDALONE}, inMemoryConfiguration=InMemoryConfiguration{defaultPutExpiration=60}} 2017-10-26 18:24:38,321 ERROR [qtp2008017533-11] [org.xdi.oxauth.exception.UncaughtException] (UncaughtException.java:41) - Jersey error. java.lang.NullPointerException: null at org.xdi.net.InetAddressUtility.getMACAddressOrNullImpl(InetAddressUtility.java:57) ~[oxcore-util-3.1.1.Final.jar:?] at org.xdi.net.InetAddressUtility.getMACAddressOrNull(InetAddressUtility.java:45) ~[oxcore-util-3.1.1.Final.jar:?] at org.xdi.oxauth.model.audit.OAuth2AuditLog.<init>(OAuth2AuditLog.java:28) ~[classes/:?] at org.xdi.oxauth.authorize.ws.rs.AuthorizeRestWebServiceImpl.requestAuthorization(AuthorizeRestWebServiceImpl.java:153) ~[classes/:?] at org.xdi.oxauth.authorize.ws.rs.AuthorizeRestWebServiceImpl.requestAuthorizationGet(AuthorizeRestWebServiceImpl.java:124) ~[classes/:?] at org.xdi.oxauth.authorize.ws.rs.AuthorizeRestWebServiceImpl$Proxy$_$$_WeldClientProxy.requestAuthorizationGet(Unknown Source) ~[classes/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_112] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140) ~[resteasy-jaxrs-3.0.21.Final.jar:3.0.21.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) ~[resteasy-jaxrs-3.0.21.Final.jar:3.0.21.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249) ~[resteasy-jaxrs-3.0.21.Final.jar:3.0.21.Final] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236) ~[resteasy-jaxrs-3.0.21.Final.jar:3.0.21.Final] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:402) [resteasy-jaxrs-3.0.21.Final.jar:3.0.21.Final] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:209) [resteasy-jaxrs-3.0.21.Final.jar:3.0.21.Final] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:228) [resteasy-jaxrs-3.0.21.Final.jar:3.0.21.Final] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.0.21.Final.jar:3.0.21.Final] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [resteasy-jaxrs-3.0.21.Final.jar:3.0.21.Final] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [servlet-api-3.1.jar:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1772) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:193) [websocket-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:226) [rewrite-servlet-3.4.1.Final.jar:3.4.1.Final] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.xdi.oxauth.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:137) [classes/:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.gluu.oxserver.filters.AbstractCorsFilter.handleNonCORS(AbstractCorsFilter.java:343) [oxcore-server-3.1.1.Final.jar:?] at org.gluu.oxserver.filters.AbstractCorsFilter.doFilter(AbstractCorsFilter.java:120) [oxcore-server-3.1.1.Final.jar:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.xdi.oxauth.audit.debug.ServletLoggingFilter.doFilter(ServletLoggingFilter.java:55) [classes/:?] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1751) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [jetty-security-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) [jetty-servlet-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.3.15.v20161220.jar:9.3.15.v20161220] ``` Also I get the similar simple error on the start up page: https://www.dropbox.com/s/52vx5nynnh8h6jp/Screen%20Shot%202017-10-27%20at%202.45.59%20PM.png?dl=0

By Aliaksandr Samuseu staff 27 Oct 2017 at 3:11 p.m. CDT

Aliaksandr Samuseu gravatar
Hi, Max. Please make sure your VPS meets all requirements specified in [this doc](https://gluu.org/docs/ce/3.1.1/installation-guide/), especially in what concerns memory and CPU. Please note that you are expected to dedicate at least 3GB of RAM to Gluu exclusively (i.e., it's not just whole memory amount at a VPS)

By Max Anderson Account Admin 31 Oct 2017 at 10:08 a.m. CDT

Max Anderson gravatar
Thanks for the reply. I currently have it set for n1-standard-2 (2 vCPUs, 7.5 GB memory). So it should have plenty of memory. I selected the default allocation for memory on the init script. I also gave it 40Gb of disk. Let me know what else could be wrong.

By Michael Schwartz Account Admin 31 Oct 2017 at 12:43 p.m. CDT

Michael Schwartz gravatar
3.1.1 requires some extra cache settings to specify internal, redis, or memcached. The cache settings are an enhancement by reducing persistence of short lived objects.

By Max Anderson Account Admin 31 Oct 2017 at 1:24 p.m. CDT

Max Anderson gravatar
Where do I configure this? I can't find it anywhere in the documentation, or maybe I'm just overlooking it.

By Aliaksandr Samuseu staff 31 Oct 2017 at 2:38 p.m. CDT

Aliaksandr Samuseu gravatar
Though tweaking it may be required at some point, I'm not sure it's something that may prevent a freshly installed instance from working. At least I haven't experienced something like this so far. If web UI is inaccessible right after installation, it's more fundamental issue, I believe. Here is what caught my eye in the logs you provided, Max: ``` 2017-10-26 18:24:38,321 ERROR [qtp2008017533-11] [org.xdi.oxauth.exception.UncaughtException] (UncaughtException.java:41) - Jersey error. java.lang.NullPointerException: null at org.xdi.net.InetAddressUtility.getMACAddressOrNullImpl(InetAddressUtility.java:57) ~[oxcore-util-3.1.1.Final.jar:?] at org.xdi.net.InetAddressUtility.getMACAddressOrNull(InetAddressUtility.java:45) ~[oxcore-util-3.1.1.Final.jar:?] ``` Here is what seems to be corresponding block of code: [link1](https://github.com/GluuFederation/oxCore/blob/master/oxUtil/src/main/java/org/xdi/net/InetAddressUtility.java#L43) and [link2](https://github.com/GluuFederation/oxCore/blob/master/oxUtil/src/main/java/org/xdi/net/InetAddressUtility.java#L52). From what I see there, it tries to parse a MAC address of the host on which it runs. Could you provide output of `# ifconfig -a` from this GCP vm, Max (outside of container)?

By Mohib Zico staff 31 Oct 2017 at 5:02 p.m. CDT

Mohib Zico gravatar
Hi Max, [This](https://www.youtube.com/watch?v=0RskrQG8km8&feature=youtu.be) is a screencast of Gluu Server 3.1.1 installation in GCP Ubuntu 16.04. Might be helpful to you.

By William Lowe user 01 Nov 2017 at 3:53 p.m. CDT

William Lowe gravatar
Max, Were you able to resolve the issue? Thanks, Will

By Max Anderson Account Admin 02 Nov 2017 at 8:46 a.m. CDT

Max Anderson gravatar
Sorry for my delay on my response. I'll look at that video and here is the output from the ifconfig -a: ``` root@auth:~# ifconfig -a ens4 Link encap:Ethernet HWaddr 42:01:0a:80:00:08 inet addr:10.128.0.8 Bcast:10.128.0.8 Mask:255.255.255.255 inet6 addr: fe80::4001:aff:fe80:8/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1460 Metric:1 RX packets:62020 errors:0 dropped:0 overruns:0 frame:0 TX packets:63381 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:21537163 (21.5 MB) TX bytes:6422432 (6.4 MB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:389760 errors:0 dropped:0 overruns:0 frame:0 TX packets:389760 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:128313788 (128.3 MB) TX bytes:128313788 (128.3 MB) root@auth:~# ```

By Aliaksandr Samuseu staff 03 Nov 2017 at 2:57 p.m. CDT

Aliaksandr Samuseu gravatar
Hi, Max. Any news regarding this issue? Have you tried to reinstall the package since the initial report, does it still fail anyway?

By Aliaksandr Samuseu staff 06 Nov 2017 at 5:32 p.m. CST

Aliaksandr Samuseu gravatar
Hi, Max. Are you still having this issue? If you was able to resolve it, may I ask what was the cause and solution?

By Max Anderson Account Admin 07 Nov 2017 at 10:19 a.m. CST

Max Anderson gravatar
No resolution yet. I'll try reinstalling again.

By Mohib Zico staff 07 Nov 2017 at 12:29 p.m. CST

Mohib Zico gravatar
Max, If you follow the screencast you will see two points ( among many of course ): - During install we _did not_ supply any IP address; setup.py script automatically chose the 'correct one' for itself. Follow that rule... just hit enter. - When we checked the Web UI / oxAuth from browser; we 'mapped' _External IP_ of VM with _the hostname_ we used for installation.

By Max Anderson Account Admin 07 Nov 2017 at 2:37 p.m. CST

Max Anderson gravatar
Seems I must have done something wrong on my first and second install. This time it is getting me to the login page. thanks for the help on this!

By Jeff Corrigan user 07 Nov 2017 at 6:25 p.m. CST

Jeff Corrigan gravatar
Hi Zico. I had a coworker setup a gluu 3.1.1 box and he was having issues with it not working correctly afterwards. I did some looking around and found the same error as above (also how I found this ticket). ``` .... Jersey error. java.lang.NullPointerException: null at org.xdi.net.InetAddressUtility.getMACAddressOrNullImpl(InetAddressUtility.java:57) .... ``` I did some more research on his setup and found the issue. I cat'd the /etc/hosts file inside and outside of the chroot. They both looked OK. However, when I did an ifconfig, the IP displayed didn't match what was listed in the /etc/hosts file. These were HA gluu boxes so the hostname was different inside and out of the chroot (normal) but the IP address issue was the same. The resolution was to change the /etc/hosts inside and outside of the chroot to what was listed in ifconfig. After doing that and restarting the service, everything worked fine and that bind issue went away. Hopefully this help someone in the future.

By Mohib Zico staff 08 Nov 2017 at 1:19 a.m. CST

Mohib Zico gravatar
Thanks for sharing, Jeff. This will be helpful to other users as well.