Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Apache knox error while running as a pod

Apache knox error while running as a pod

New Contributor

I am trying to run nexgtech/knox image in one of the pod in my kubernetes cluster. Iam having issues running the image as iam getting the below error.

 

Exception in thread "main" java.lang.reflect.InvocationTargetException
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 org.apache.knox.gateway.launcher.Invoker.invokeMainMethod(Invoker.java:68)
at org.apache.knox.gateway.launcher.Invoker.invoke(Invoker.java:39)
at org.apache.knox.gateway.launcher.Command.run(Command.java:99)
at org.apache.knox.gateway.launcher.Launcher.run(Launcher.java:75)
at org.apache.knox.gateway.launcher.Launcher.main(Launcher.java:52)
Caused by: java.lang.NoSuchFieldError: DEFAULT_XML_TYPE_ATTRIBUTE
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.setupInheritance(MappingsGenerator.java:2431)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateProject(MappingsGenerator.java:246)
at org.eclipse.persistence.jaxb.compiler.Generator.generateProject(Generator.java:191)
at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:985)
at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:978)
at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:905)
at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:198)
at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:131)
at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:122)
at org.eclipse.persistence.jaxb.compiler.CompilerHelper.getXmlBindingsModelContext(CompilerHelper.java:491)
at org.eclipse.persistence.jaxb.JAXBContextFactory.getXmlBindings(JAXBContextFactory.java:310)
at org.eclipse.persistence.jaxb.JAXBContextFactory.processBindingFile(JAXBContextFactory.java:284)
at org.eclipse.persistence.jaxb.JAXBContextFactory.getXmlBindingsFromProperties(JAXBContextFactory.java:264)
at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:853)
at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:198)
at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:131)
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.xml.bind.ContextFinder.newInstance(ContextFinder.java:171)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:131)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:293)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:431)
at org.apache.knox.gateway.services.topology.impl.DefaultTopologyService.getJAXBContext(DefaultTopologyService.java:127)
at org.apache.knox.gateway.services.topology.impl.DefaultTopologyService.<clinit>(DefaultTopologyService.java:91)
at org.apache.knox.gateway.services.CLIGatewayServices.init(CLIGatewayServices.java:88)
at org.apache.knox.gateway.util.KnoxCLI.initializeServices(KnoxCLI.java:185)
at org.apache.knox.gateway.util.KnoxCLI.run(KnoxCLI.java:155)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
at org.apache.knox.gateway.util.KnoxCLI.main(KnoxCLI.java:2122)
... 9 more
Starting LDAP succeeded with PID 89.
Starting Gateway succeeded with PID 183.
Exception in thread "main" java.lang.reflect.InvocationTargetException
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 org.apache.knox.gateway.launcher.Invoker.invokeMainMethod(Invoker.java:68)
at org.apache.knox.gateway.launcher.Invoker.invoke(Invoker.java:39)
at org.apache.knox.gateway.launcher.Command.run(Command.java:99)
at org.apache.knox.gateway.launcher.Launcher.run(Launcher.java:75)
at org.apache.knox.gateway.launcher.Launcher.main(Launcher.java:52)
Caused by: java.lang.NoSuchFieldError: DEFAULT_XML_TYPE_ATTRIBUTE
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.setupInheritance(MappingsGenerator.java:2431)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateProject(MappingsGenerator.java:246)
at org.eclipse.persistence.jaxb.compiler.Generator.generateProject(Generator.java:191)
at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:985)
at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:978)
at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:905)
at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:198)
at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:131)
at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:122)
at org.eclipse.persistence.jaxb.compiler.CompilerHelper.getXmlBindingsModelContext(CompilerHelper.java:491)
at org.eclipse.persistence.jaxb.JAXBContextFactory.getXmlBindings(JAXBContextFactory.java:310)
at org.eclipse.persistence.jaxb.JAXBContextFactory.processBindingFile(JAXBContextFactory.java:284)
at org.eclipse.persistence.jaxb.JAXBContextFactory.getXmlBindingsFromProperties(JAXBContextFactory.java:264)
at org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:853)
at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:198)
at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:131)
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.xml.bind.ContextFinder.newInstance(ContextFinder.java:171)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:131)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:293)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:431)
at org.apache.knox.gateway.services.topology.impl.DefaultTopologyService.getJAXBContext(DefaultTopologyService.java:127)
at org.apache.knox.gateway.services.topology.impl.DefaultTopologyService.<clinit>(DefaultTopologyService.java:91)
at org.apache.knox.gateway.services.CLIGatewayServices.init(CLIGatewayServices.java:88)
at org.apache.knox.gateway.util.KnoxCLI.initializeServices(KnoxCLI.java:185)
at org.apache.knox.gateway.util.KnoxCLI.run(KnoxCLI.java:155)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
at org.apache.knox.gateway.util.KnoxCLI.main(KnoxCLI.java:2122)
... 9 more
2019-12-12 04:38:13,506 INFO knox.gateway (GatewayConfigImpl.java:loadConfigResource(406)) - Loading configuration resource jar:file:/usr/local/knox-1.3.0/bin/../lib/gateway-server-1.3.0.jar!/conf/gateway-default.xml
2019-12-12 04:38:13,987 INFO knox.gateway (GatewayConfigImpl.java:loadConfigFile(394)) - Loading configuration file /usr/local/knox-1.3.0/conf/gateway-site.xml
2019-12-12 04:38:14,124 INFO knox.gateway (GatewayConfigImpl.java:initGatewayHomeDir(334)) - Using /usr/local/knox-1.3.0/bin/.. as GATEWAY_HOME via system property.
2019-12-12 04:38:14,125 INFO knox.gateway (GatewayConfigImpl.java:init(327)) - Cookie scoping feature enabled: false
2019-12-12 04:38:14,845 INFO knox.gateway (RemoteAliasService.java:init(258)) - Remote Alias Service enabled
2019-12-12 04:38:14,847 WARN knox.gateway (ZookeeperRemoteAliasService.java:init(349)) - There is no registry client defined for remote configuration monitoring.
2019-12-12 04:38:14,850 INFO knox.gateway (JettySSLService.java:init(64)) - Creating credential store for the gateway instance.
2019-12-12 04:38:14,855 INFO knox.gateway (JettySSLService.java:init(80)) - Creating keystore for the gateway instance.
2019-12-12 04:38:15,735 INFO knox.gateway (JettySSLService.java:logAndValidateCertificate(112)) - The Gateway SSL certificate is issued to hostname: localhost.
2019-12-12 04:38:15,738 INFO knox.gateway (JettySSLService.java:logAndValidateCertificate(115)) - The Gateway SSL certificate is valid between: 12/12/19 4:38 AM and 12/11/20 4:38 AM.
2019-12-12 04:46:11,263 INFO knox.gateway (GatewayServer.java:logSysProp(219)) - System Property: user.name=knox
2019-12-12 04:46:11,267 INFO knox.gateway (GatewayServer.java:logSysProp(219)) - System Property: user.dir=/home/knox
2019-12-12 04:46:11,267 INFO knox.gateway (GatewayServer.java:logSysProp(219)) - System Property: java.runtime.name=OpenJDK Runtime Environment
2019-12-12 04:46:11,267 INFO knox.gateway (GatewayServer.java:logSysProp(219)) - System Property: java.runtime.version=1.8.0_222-b10
2019-12-12 04:46:11,267 INFO knox.gateway (GatewayServer.java:logSysProp(219)) - System Property: java.home=/usr/local/openjdk-8/jre
2019-12-12 04:46:11,426 INFO knox.gateway (GatewayConfigImpl.java:loadConfigResource(406)) - Loading configuration resource jar:file:/usr/local/knox-1.3.0/bin/../lib/gateway-server-1.3.0.jar!/conf/gateway-default.xml
2019-12-12 04:46:11,484 INFO knox.gateway (GatewayConfigImpl.java:loadConfigFile(394)) - Loading configuration file /usr/local/knox-1.3.0/conf/gateway-site.xml
2019-12-12 04:46:11,491 INFO knox.gateway (GatewayConfigImpl.java:initGatewayHomeDir(334)) - Using /usr/local/knox-1.3.0/bin/.. as GATEWAY_HOME via system property.
2019-12-12 04:46:11,491 INFO knox.gateway (GatewayConfigImpl.java:init(327)) - Cookie scoping feature enabled: false
2019-12-12 04:46:11,905 INFO knox.gateway (RemoteAliasService.java:init(258)) - Remote Alias Service enabled
2019-12-12 04:46:11,909 WARN knox.gateway (ZookeeperRemoteAliasService.java:init(349)) - There is no registry client defined for remote configuration monitoring.
2019-12-12 04:46:11,920 INFO knox.gateway (JettySSLService.java:init(72)) - Credential store for the gateway instance found - no need to create one.
2019-12-12 04:46:11,938 INFO knox.gateway (JettySSLService.java:init(91)) - Keystore for the gateway instance found - no need to create one.
2019-12-12 04:46:11,942 INFO knox.gateway (JettySSLService.java:logAndValidateCertificate(112)) - The Gateway SSL certificate is issued to hostname: localhost.
2019-12-12 04:46:11,945 INFO knox.gateway (JettySSLService.java:logAndValidateCertificate(115)) - The Gateway SSL certificate is valid between: 12/12/19 4:38 AM and 12/11/20 4:38 AM.

 

Could you please let me know how i could debug this issue.

1 REPLY 1
Highlighted

Re: Apache knox error while running as a pod

Super Mentor

@Amrutha 

This looks like a Duplicate Posting of yours : https://community.cloudera.com/t5/Support-Questions/Apache-Knox/m-p/285420/highlight/false#M211816

 

.

Pasting my response from other thread: 

Which knox version is it?

We see the error as following:

 

 

Caused by: java.lang.NoSuchFieldError: DEFAULT_XML_TYPE_ATTRIBUTE

 

 

.

At a glance it looks very similar to the one issue reported with Knox https://issues.apache.org/jira/browse/KNOX-1987

Don't have an account?
Coming from Hortonworks? Activate your account here