Errors getting to NetKernel admin pages after setting http.proxyHost and http.proxyPort

Poster Content
nk4um Moderator
Posts: 755
July 23, 2010 09:36Fixed
Hi Kevin,

Hmmm.  My apologies again. As I mentioned before the Apache http client has two modes based on which type of proxy it is working with.  In the case of the NTLM handling we were not testing if the required state object (which holds the credentials) was null.

Thanks for persevering with this.  We wanted to get this into the RC and developed it in a hurry!

I''ve posted a fix into the apposite repositories - if you are able to use apposite then sync and accepts the update.

Given that you''re behind a proxy and your http client is bust then you probably won''t be able to use apposite.  In this case I''ve put a copy of the new module here...

http://resources.1060research.com/packages/2010/7/urn.org.netkernel.client.http-1.7.12.jar

So to install by hand, download this and put it in [ install ]/modules/ then edit [install]/etc/modules.xml and change the entry for http-client to point to the 1.7.12 jar.

I hope this will have fixed it for you.  Please let us know.

Cheers,

Peter
nk4um User
Posts: 41
July 23, 2010 05:26
Downloaded 4.1.1-RC1 from cs site and installed it using the proxy, port, username, password, workstation and domain. When started, same NTLM errors that I was receiving with Standard Edition 4.1.1 (see error stack below).

W 00:19:07 FirstTimeSync Endpoint [FirstTimeSync] post-commission failed:
<ex>
<ex>
  <id>org.netkernel.layer0.nkf.NKFException</id>
</ex>
<ex>
  <id>RequestFrameException</id>
  <request>SOURCE res:/tools/apposite/admin/repo/updateService as Object</request>
</ex>
<ex>
  <id>SubrequestException</id>
  <space>Apposite Core Application</space>
  <endpointId>apposite:updateService</endpointId>
  <endpoint>MapperOverlay</endpoint>
  <ex>
   <id>org.netkernel.layer0.nkf.NKFException</id>
   <stack>
    <level>org.netkernel.layer0.nkf.impl.NKFContextImpl.issueKernelRequest() line:503</level>
    <level>org.netkernel.layer0.nkf.impl.NKFContextImpl.issueRequestForResponse() line:402</level>
    <level>org.netkernel.module.standard.builtin.mapper.MapperConfig$Mapping.onRequest() line:446</level>
    <level>org.netkernel.module.standard.builtin.mapper.MapperConfig.onRequest() line:213</level>
    <level>org.netkernel.module.standard.endpoint.ConfiguredOverlayImpl.onRequest() line:191</level>
    <level>org.netkernel.layer0.nkf.impl.NKFEndpointImpl.onAsyncRequest() line:93</level>
    <level>... 30 more</level>
   </stack>
  </ex>
</ex>
<ex>
  <id>RequestFrameException</id>
  <request>SOURCE active:groovy+operator@res%3A/app/apposite/admin/repo/updateService.gy as Object</request>
</ex>
<ex>
  <id>SubrequestException</id>
  <space>Lang / Groovy </space>
  <endpointId>GroovyRuntime</endpointId>
  <endpoint>GroovyRuntime</endpoint>
  <ex>
   <id>Unhandled Exception in GroovyRuntime</id>
   <location>res:/app/apposite/admin/repo/updateService.gy line:2</location>
  </ex>
  <ex>
   <id>org.netkernel.layer0.nkf.NKFException</id>
  </ex>
</ex>
<ex>
  <id>RequestFrameException</id>
  <request>SOURCE active:appositeProcUpdate as Object</request>
</ex>
<ex>
  <id>SubrequestException</id>
  <space>Package / Core Services </space>
  <endpointId>ep:RZN8WM-UA0BD6</endpointId>
  <endpoint>MapperOverlay</endpoint>
  <ex>
   <id>org.netkernel.layer0.nkf.NKFException</id>
   <stack>
    <level>org.netkernel.layer0.nkf.impl.NKFContextImpl.issueKernelRequest() line:503</level>
    <level>org.netkernel.layer0.nkf.impl.NKFContextImpl.issueRequestForResponse() line:402</level>
    <level>org.netkernel.module.standard.builtin.mapper.MapperConfig$Mapping.onRequest() line:446</level>
    <level>org.netkernel.module.standard.builtin.mapper.MapperConfig.onRequest() line:213</level>
    <level>org.netkernel.module.standard.endpoint.ConfiguredOverlayImpl.onRequest() line:191</level>
    <level>org.netkernel.layer0.nkf.impl.NKFEndpointImpl.onAsyncRequest() line:93</level>
    <level>... 56 more</level>
   </stack>
  </ex>
</ex>
<ex>
  <id>RequestFrameException</id>
  <request>SOURCE active:groovy+operator@res%3A/org/netkernel/packge/data/proc/updateProc.gy as Object</request>
</ex>
<ex>
  <id>SubrequestException</id>
  <space>Lang / Groovy </space>
  <endpointId>GroovyRuntime</endpointId>
  <endpoint>GroovyRuntime</endpoint>
  <ex>
   <id>Unhandled Exception in GroovyRuntime</id>
   <location>res:/org/netkernel/packge/data/proc/updateProc.gy line:28</location>
  </ex>
  <ex>
   <id>org.netkernel.layer0.nkf.NKFException</id>
  </ex>
</ex>
<ex>
  <id>RequestFrameException</id>
  <request>SOURCE https://apposite.1060research.com/repo/netkernel/1060-NetKernel-EE/4.1.1-RC1/hashes.xml as IBinaryStreamRepresentation</request>
</ex>
<ex>
  <id>SubrequestException</id>
  <space>Package / Core Services  /mapper/space</space>
  <endpointId>ep:RZN8WM-9XIPMJ</endpointId>
  <endpoint>HTTPSIntercept</endpoint>
  <ex>
   <id>org.netkernel.layer0.nkf.NKFException</id>
   <stack>
    <level>org.netkernel.layer0.nkf.impl.NKFContextImpl.issueKernelRequest() line:503</level>
    <level>org.netkernel.layer0.nkf.impl.NKFContextImpl.issueRequestForResponse() line:402</level>
    <level>org.netkernel.packge.endpoint.HTTPSIntercept.onSource() line:39</level>
    <level>org.netkernel.layer0.nkf.impl.NKFEndpointImpl.onRequest() line:140</level>
    <level>org.netkernel.layer0.nkf.impl.NKFEndpointImpl.onAsyncRequest() line:93</level>
    <level>... 83 more</level>
   </stack>
  </ex>
</ex>
<ex>
  <id>RequestFrameException</id>
  <request>SOURCE active:httpGet+headers@pbv%3Aheaders+url@https%3A//apposite.1060research.com/repo/netkernel/1060-NetKernel-EE/4.1.1-RC1/hashes.xml a
s Object</request>
</ex>
<ex>
  <id>SubrequestException</id>
  <space>HTTP Client Library </space>
  <endpointId>httpClient.httpGet</endpointId>
  <endpoint>HttpClientAccessor</endpoint>
  <ex>
   <id>java.lang.NullPointerException</id>
   <stack>
    <level>org.netkernel.client.http.endpoint.HttpClientAccessorOld.getHttpClient() line:463</level>
    <level>org.netkernel.client.http.endpoint.HttpClientAccessorOld.onSource() line:217</level>
    <level>org.netkernel.client.http.endpoint.HttpClientAccessor.onSource() line:15</level>
    <level>org.netkernel.layer0.nkf.impl.NKFEndpointImpl.onRequest() line:140</level>
    <level>org.netkernel.layer0.nkf.impl.NKFEndpointImpl.onAsyncRequest() line:93</level>
    <level>... 91 more</level>
   </stack>
  </ex>
</ex>
</ex>
nk4um Moderator
Posts: 755
July 22, 2010 13:48
Ah,  I was assuming you were trying out the NKEE RC1 release which was posted last week and available through the NetKernel portal...

https://cs.1060research.com/csp/download/

This has the updated settings editor.  But yes you can also edit them in NKSE by hand in etc/kernel.properties...

#Set by installer and relayed to System properties by bootloader
http.proxyHost=%HTTPPROXYHOST%
http.proxyPort=%HTTPPROXYPORT%
http.proxyUsername=%HTTPPROXYUSERNAME%
http.proxyPassword=%HTTPPROXYPASSWORD%
http.proxyNTWorkstation=%HTTPPROXYNTWORKSTATION%
http.proxyDomain=%HTTPPROXYNTDOMAIN%


Sorry for confusion.  Let me know how it goes.

P.
nk4um User
Posts: 41
July 22, 2010 13:40
Peter,
Thanks for the quick response. However, the page you directed me to does not contain a field for entering the domain. In the proxy section the only two fields are host and port. How can I see the domain or can this be done directly in the kernel.properties file? If it can be done in kernel.properties, what is the variable to set (i.e. http.proxyDomain)?

Thanks,
Kevin
nk4um Moderator
Posts: 755
July 22, 2010 07:33NT Domain
Hi Kevin,

Thanks very much for posting this. We''ve not been able to test with an NTLM proxy - so apologies that you''ve been tripped up.

The Apache HTTP client has two different credential models to connect to proxies - we are using the value of the NT Domain setting as the trigger to go from the regular authenticating proxy server mode over to the NTLM mode. 

Therefore my hunch is that you''ve not set a value for the NT Domain. You will be able to set it (even with the bust home tab) here..

http://localhost:1060/tools/kernelconfig

By posting this error report - you''ve also highlighted an unanticipated error handling failure in the RSS news feed reader on the home tab - which we''ll fix too.  Fortunately only the home tab would be affected - the rest of the tools should be fine.

Please let me know if this helps you - we really want to get the NTLM proxy mode tested before we sign off on the NKEE final release.

Cheers,

Peter
nk4um User
Posts: 41
NetKernel is sitting behind a proxy that uses ntlm authentication. When I add parameters, restart NetKernel and attempt to access an admin page, I receive the following errors (posted below are errors from browser window and command prompt window):

Within browser window:
java.lang.NullPointerException

Retry the request.
A detailed Exception Trace is available, please report this to the system administrator or use it to identify the source of the problem.

SOURCE res:/panel/urn:org:netkernel:nkse:control:panel:home as IBinaryStreamRepresentation

DynamicImportEndpoint[cp2:panel]
HTTP Bridge Overlay
org.netkernel.layer0.nkf.NKFException
org.netkernel.layer0.nkf.impl.NKFContextImpl.issueKernelRequest() line:503
org.netkernel.layer0.nkf.impl.NKFContextImpl.issueRequestForResponse() line:402
org.netkernel.layer0.util.Utils.delegateRequestInto() line:362
org.netkernel.layer1.endpoint.DynamicImportEndpoint.onRequest() line:130
org.netkernel.layer0.nkf.impl.NKFEndpointImpl.onAsyncRequest() line:93
... 23 more

SOURCE res:/panel/urn:org:netkernel:nkse:control:panel:home as IBinaryStreamRepresentation

PanelAccessor[cp2:panel]
Control Panel
org.netkernel.layer0.nkf.NKFException
org.netkernel.layer0.nkf.impl.NKFContextImpl.issueKernelRequest() line:503
org.netkernel.layer0.nkf.impl.NKFContextImpl.issueRequestForResponse() line:402
org.netkernel.cp.PanelAccessor.onSource() line:59
org.netkernel.layer0.nkf.impl.NKFEndpointImpl.onRequest() line:140
org.netkernel.layer0.nkf.impl.NKFEndpointImpl.onAsyncRequest() line:93
... 31 more

SOURCE active:xrl2+content@pbv%3Acontent+icon@pbv%3Aicon+pagetitle@pbv%3Apagetitle+subtitle@pbv%3Asubtitle+tabs@pbv%3Atabs+template@res%3A/nkse/style/template/cp-template.xml+tooltitle@pbv%3Atooltitle as IBinaryStreamRepresentation

XRL2Runtime[XML Recursive Linker (XRL)]
Lang / XRL
XRL Include Failure
Unhandled exception processing eval of [<null>]
/xrl:include
XRL Include Failure
Unhandled exception processing eval of [<null>]
/xrl:include
XRL Include Failure
Unhandled exception processing eval of [<null>]
/html/body/center/div/table/tr[2]/td/div/div[2]/div[2]/div/table[1]/tr/td/xrl:include
java.lang.NullPointerException
com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.importNode() line:-1
com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.importNode() line:-1
org.netkernel.lang.xrl.endpoint.XRL2Runtime.processInclude() line:142
org.netkernel.lang.xrl.endpoint.XRL2Runtime.recurse() line:72
org.netkernel.lang.xrl.endpoint.XRL2Runtime.recurse() line:94
org.netkernel.lang.xrl.endpoint.XRL2Runtime.recurse() line:94
org.netkernel.lang.xrl.endpoint.XRL2Runtime.recurse() line:94
org.netkernel.lang.xrl.endpoint.XRL2Runtime.processInclude() line:147
org.netkernel.lang.xrl.endpoint.XRL2Runtime.recurse() line:72
org.netkernel.lang.xrl.endpoint.XRL2Runtime.recurse() line:94
... 51 more



Within command prompt window:
I 16:37:36 Kernel        NetKernel Ready, accepting requests...
I 16:37:36 ModuleManager System now at RunLevel [7]
I 16:37:36 InitEndpoint  Init completed - system at RunLevel [7]
I 16:37:36 CronTransport Added Job [Apposite Synchronize @ Every 3rd Day] of typ
e [crontab]
Jul 21, 2010 4:37:58 PM org.apache.commons.httpclient.auth.AuthChallengeProcesso
r selectAuthScheme
INFO: ntlm authentication scheme selected
Jul 21, 2010 4:37:58 PM org.apache.commons.httpclient.HttpMethodDirector process
ProxyAuthChallenge
INFO: No credentials available for NTLM <any realm>@cccnetproxy:80
SystemId Unknown; Line #1; Column #62; White spaces are required between publicI
d and systemId.

Any ideas what I am doing wrong?

Kevin