简体   繁体   English

在远程Windows机器上记录日志文件的解析器

[英]log parser for a log file on remote windows machine

I have a log parser2.2 query for parsing log on remote windows machine. 我有一个日志解析器2.2查询解析远程Windows机器上的日志。 When the query is run, on log parser command prompt; 运行查询时,在日志解析器命令提示符下; i get successful output. 我获得了成功的输出。 Following is the query : 以下是查询:

logparser -i:Textline -rtp:-1  -stats:OFF \"SELECT EXTRACT_SUFFIX(text,0,\'(IBM PC)\') AS REPORT_SINCE from \\\\remote_machine\\remote_folder\\XXXXX.log where text like \'%IBM PC%\'\"";

The same command if , used in a java program (jsp); 如果在java程序(jsp)中使用相同的命令; it throws the following error: 它会引发以下错误:

Task Aborted. 

Following is error trace : 以下是错误跟踪:

Cannot open : Error opening files: Error searching for files in Error = folder \\remote_machine\remote_folder: Access is denied.

Any idea as to why this is happening & how to get it fixed ? 任何想法为什么会发生这种情况以及如何解决这个问题?

Access denied means that the application is being run from an account that is not permitted to access that remote folder. 拒绝访问意味着正在从不允许访问该远程文件夹的帐户运行该应用程序。 If the command is failing within the context of a JSP, that means that the account / identity that is running the web container doesn't have the necessary permissions. 如果命令在JSP的上下文中失败,则意味着运行Web容器的帐户/标识没有必要的权限。

This could be a deliberate security decision. 这可能是一个深思熟虑的安全决定。 Letting your web server access remote shares is asking for trouble ... if your website gets "hacked". 让你的网络服务器访问远程共享是一个麻烦...如果你的网站被“黑客入侵”。 It is prudent to run a web container with minimal privileges as a precaution. 谨慎的做法是以最小的权限运行Web容器作为预防措施。

This is not a programming problem per se . 这不是一个规划问题本身 Rather it is a problem of figuring out why you don't have permission, and how to get permission safely; 相反,它是一个问题,弄清楚为什么你没有许可,以及如何安全地获得许可; ie without making your entire network more vulnerable to hackers. 即不使整个网络更容易受到黑客的攻击。 Talk to your local (Windows) system administrators. 与您当地的(Windows)系统管理员联系。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM