开发者

Can't run nutch from a Tomcat webapp on Windows

I have a web app that spawns off a script that runs a Nutch crawl. It's all working really well, except now my client wants it running on a Windows PC. The Windows PC she gave me is running Windows 7 Home Premium.

I've got nearly everything running, except when the crawl script - when it fires off nutch, nutch (which runs Hadoop, which for some bizarre reason does a whoami) fails because whoami returns "nt authority\system" instead of a single string. The error:

javax.s开发者_Python百科ecurity.auth.login.LoginException: Login failed: Expect one token as the result of whoami: nt authority\system

Is there some way to change the name that whoami returns in that case?

Update: Just to clarify, the exact same script runs fine when I run it from the command line. The problem is that Tomcat runs as a service, so the script it spawns is running as this "nt authority\system" user, which is what is confusing hadoop because it evidently expects whoami to return a single word, not two words separated by a space.


The problem is that Tomcat runs as a service, so the script it spawns is running as this "nt authority\system" user, which is what is confusing hadoop because it evidently expects whoami to return a single word, not two words separated by a space.

Then change the account. Start > Run > services.msc, doubleclick the Tomcat service, open Log On tab and set the account there.


I run Nutch on my Windows PC using Vista... almost daily, with cygwin installed have you tried ?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜