首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Openshift:安装新的Relic Jar文件时权限被拒绝

Openshift:安装新的Relic Jar文件时权限被拒绝
EN

Stack Overflow用户
提问于 2015-01-30 04:13:01
回答 1查看 401关注 0票数 0

我正在尝试将new-relic jar安装到我的Openshift应用程序(wildfly cartridge)中,但使用permission denied失败了。这是日志

代码语言:javascript
复制
\> java -jar newrelic.jar install
Jan 29, 2015 15:01:14 -0500 [64858 1] com.newrelic INFO: Agent is using Logback
***** ( ( o))  New Relic Java Agent Installer
***** Installing version 3.13.0 ...
Problem writing file to disk
java.io.FileNotFoundException: /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf.20150129_150114 (Permission denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:206)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:95)
    at java.io.FileWriter.<init>(FileWriter.java:63)
    at com.newrelic.agent.util.EditableFile.write(EditableFile.java:273)
    at com.newrelic.agent.util.EditableFile.backup(EditableFile.java:251)
    at com.newrelic.agent.install.SelfInstaller.backup(SelfInstaller.java:125)
    at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEdit(JBoss7SelfInstaller.java:51)
    at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEditStartScript(JBoss7SelfInstaller.java:35)
    at com.newrelic.agent.AgentCommandLineParser.installCommand(AgentCommandLineParser.java:138)
    at com.newrelic.agent.AgentCommandLineParser.parseCommand(AgentCommandLineParser.java:81)
    at com.newrelic.agent.Agent.main(Agent.java:261)
    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:483)
    at com.newrelic.bootstrap.BootstrapAgent.main(BootstrapAgent.java:84)
Problem writing file to disk
java.io.FileNotFoundException: /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf (Permission denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:206)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:95)
    at java.io.FileWriter.<init>(FileWriter.java:63)
    at com.newrelic.agent.util.EditableFile.write(EditableFile.java:273)
    at com.newrelic.agent.util.EditableFile.write(EditableFile.java:263)
    at com.newrelic.agent.util.EditableFile.append(EditableFile.java:240)
    at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEdit(JBoss7SelfInstaller.java:55)
    at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEditStartScript(JBoss7SelfInstaller.java:35)
    at com.newrelic.agent.AgentCommandLineParser.installCommand(AgentCommandLineParser.java:138)
    at com.newrelic.agent.AgentCommandLineParser.parseCommand(AgentCommandLineParser.java:81)
    at com.newrelic.agent.Agent.main(Agent.java:261)
    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:483)
    at com.newrelic.bootstrap.BootstrapAgent.main(BootstrapAgent.java:84)
Added agent switch to start script /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf
Problem writing file to disk
java.io.FileNotFoundException: /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf.20150129_150114 (Permission denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:206)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:95)
    at java.io.FileWriter.<init>(FileWriter.java:63)
    at com.newrelic.agent.util.EditableFile.write(EditableFile.java:273)
    at com.newrelic.agent.util.EditableFile.backup(EditableFile.java:251)
    at com.newrelic.agent.install.SelfInstaller.backup(SelfInstaller.java:125)
    at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEdit(JBoss7SelfInstaller.java:51)
    at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEditStartScript(JBoss7SelfInstaller.java:37)
    at com.newrelic.agent.AgentCommandLineParser.installCommand(AgentCommandLineParser.java:138)
    at com.newrelic.agent.AgentCommandLineParser.parseCommand(AgentCommandLineParser.java:81)
    at com.newrelic.agent.Agent.main(Agent.java:261)
    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:483)
    at com.newrelic.bootstrap.BootstrapAgent.main(BootstrapAgent.java:84)
Problem writing file to disk
java.io.FileNotFoundException: /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf (Permission denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:206)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:95)
    at java.io.FileWriter.<init>(FileWriter.java:63)
    at com.newrelic.agent.util.EditableFile.write(EditableFile.java:273)
    at com.newrelic.agent.util.EditableFile.write(EditableFile.java:263)
    at com.newrelic.agent.util.EditableFile.append(EditableFile.java:240)
    at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEdit(JBoss7SelfInstaller.java:55)
    at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEditStartScript(JBoss7SelfInstaller.java:37)
    at com.newrelic.agent.AgentCommandLineParser.installCommand(AgentCommandLineParser.java:138)
    at com.newrelic.agent.AgentCommandLineParser.parseCommand(AgentCommandLineParser.java:81)
    at com.newrelic.agent.Agent.main(Agent.java:261)
    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:483)
    at com.newrelic.bootstrap.BootstrapAgent.main(BootstrapAgent.java:84)
Added agent switch to start script /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf
No need to create New Relic configuration file because:
 .:. A config file already exists: /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/newrelic/newrelic.yml
***** Install successful
***** Next steps:
You're almost done! To see performance data for your app:
 .:. Restart your app server
 .:. Exercise your app
 .:. Log into http://rpm.newrelic.com
Within two minutes, your app should show up, ready to monitor and troubleshoot.
If app data doesn't appear, check newrelic/logs/newrelic_agent.log for errors.

如何安装?我可以从哪里获得许可?

EN

回答 1

Stack Overflow用户

发布于 2015-01-30 06:03:45

看起来NewRelic正在尝试创建它在~/wildfly/bin/standalone.conf上找到的WildFly配置文件的备份。不幸的是,由于~/wildfly/bin被WildFly盒式磁带锁定,因此失败,正如您在盒式磁带的managed_files.yml中看到的权限和条目所示

代码语言:javascript
复制
\> ls -ld wildfly/bin/
drwxr-xr-x. 6 root 544c2c3be0b8cdf8da000253 4096 Dec 23 20:01 wildfly/bin/

\> cat wildfly/metadata/managed_files.yml
---
[...]
locked_files:
- bin/
- bin/*
[...]

我看到了三种选择,按照复杂性的顺序。

  1. 查看newrelic.jar是否接受不执行配置文件备份的标志。
  2. 由于newrelic.jar似乎正在尝试为您自动修改standalone.conf,请尝试在您确实具有权限的具有WildFly的本地环境中运行此步骤。然后将新的standalone.conf签入到OpenShift git。
  3. Fork WildFly cart repo,并从managed_files.yml中的locked_files密钥中删除bin/bin/*条目。但请确保在购物车的bin/setup脚本中手动创建这些脚本,因为锁定通常会为您完成此操作。有关更多信息,请参见Locking cartridges
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28223720

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档