Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

neo4j-admin report command is partially failing due to missing 'ps' proc #382

Open
donatelloOo opened this issue Sep 21, 2022 · 2 comments
Assignees

Comments

@donatelloOo
Copy link

donatelloOo commented Sep 21, 2022

The neo4j-admin report command is reporting errors when trying to generate the "ps.csv" file.
This is due to missing psproc package (ps command is not available).

Steps to reproduce

  • Expected behaviour: full report generated without errors, and including ps.csv file
  • Actual behaviour: partial report generated with errors, without ps.csv (and possibly some other files coming after?)
  • Neo4j image tag being used: neo4j:4.4.8-enterprise

Following stacktraces can be found on command error output:

Sep 21, 2022 8:44:00 AM org.jutils.jprocesses.util.ProcessesUtils executeCommand
SEVERE: Error executing command
java.io.IOException: Cannot run program "ps": error=2, No such file or directory
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
        at org.jutils.jprocesses.util.ProcessesUtils.executeCommand(ProcessesUtils.java:55)
        at org.jutils.jprocesses.info.UnixProcessesService.getProcessesData(UnixProcessesService.java:107)
        at org.jutils.jprocesses.info.AbstractProcessesService.getList(AbstractProcessesService.java:48)
        at org.jutils.jprocesses.info.AbstractProcessesService.getList(AbstractProcessesService.java:43)
        at org.jutils.jprocesses.info.AbstractProcessesService.getList(AbstractProcessesService.java:35)
        at org.jutils.jprocesses.JProcesses.getProcessList(JProcesses.java:136)
        at org.neo4j.commandline.dbms.DiagnosticsReportCommand.lambda$runningProcesses$1(DiagnosticsReportCommand.java:282)
        at org.neo4j.kernel.diagnostics.DiagnosticsReportSources$DiagnosticsStringReportSource.newInputStream(DiagnosticsReportSources.java:161)
        at org.neo4j.kernel.diagnostics.DiagnosticsReporter.writeDiagnostics(DiagnosticsReporter.java:92)
        at org.neo4j.kernel.diagnostics.DiagnosticsReporter.dump(DiagnosticsReporter.java:80)
        at org.neo4j.commandline.dbms.DiagnosticsReportCommand.execute(DiagnosticsReportCommand.java:122)
        at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:71)
        at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:34)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at org.neo4j.cli.AdminTool.execute(AdminTool.java:93)
        at org.neo4j.cli.AdminTool.main(AdminTool.java:79)
Caused by: java.io.IOException: error=2, No such file or directory
        at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
        at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:340)
        at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
        ... 23 more
@Sandalorian
Copy link

@donatelloOo The above exception did not prevent neo4j-admin report from producing the report. From what I see only the ps.csv file is missing.

The ps.csv file only contains a csv output of ps, which inside a docker container is intentionally limited to the neo4j process and a few other operational processes (tini, bash if you've exec'd in, etc).

I'm not entirely sure what the use case of ps.csv is in the context of a docker container. There is only the java process which is Neo4j inside the container.

You can skip the creation of ps.csv, and avoid the above error, by using the following command

neo4j-admin report logs config plugins tree metrics plugins version

@donatelloOo
Copy link
Author

sure, good workaround, however it should be removed by default if not supported
my 2 cents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants