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

Does not run on FreeBSD due to Linux dependency: /proc/mounts #12542

Closed
borjam opened this issue Apr 27, 2022 · 6 comments
Closed

Does not run on FreeBSD due to Linux dependency: /proc/mounts #12542

borjam opened this issue Apr 27, 2022 · 6 comments
Assignees

Comments

@borjam
Copy link

borjam commented Apr 27, 2022

Expected Behavior

The previous versions didn't rely on the presence of /proc/mounts, which is not supported on FreeBSD's procfs.
It worked perfectly on FreeBSD

Current Behavior

Graylog aborts on startup with this message


2022-04-27 14:45:30,466 WARN o.u.FileUtil [main] File not found or not readable: /proc/mounts
Exception in thread "main" java.lang.ArithmeticException: / by zero
	at org.graylog2.shared.system.stats.fs.OshiFsProbe.lambda$fsStats$11(OshiFsProbe.java:116)
	at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321)
	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
	at java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:440)
	at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1723)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
	at org.graylog2.shared.system.stats.fs.OshiFsProbe.fsStats(OshiFsProbe.java:106)
	at org.graylog2.bootstrap.preflight.DiskJournalPreflightCheck.checkJournalDirSizeAndType(DiskJournalPreflightCheck.java:67)
	at org.graylog2.bootstrap.preflight.DiskJournalPreflightCheck.runCheck(DiskJournalPreflightCheck.java:62)
	at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:422)
	at org.graylog2.bootstrap.preflight.PreflightCheckService.runChecks(PreflightCheckService.java:51)
	at org.graylog2.bootstrap.ServerBootstrap.runPreFlightChecks(ServerBootstrap.java:135)
	at org.graylog2.bootstrap.ServerBootstrap.beforeInjectorCreation(ServerBootstrap.java:126)
	at org.graylog2.bootstrap.CmdLineTool.run(CmdLineTool.java:292)
	at org.graylog2.bootstrap.Main.main(Main.java:45)

Possible Solution

Does it need to use /proc/mounts for any useful purpose?

Steps to Reproduce (for bugs)

Starting it on FreeBSD 13.1-RC4.

Context

Can't run this version of Graylog on FreeBSD. Previous versions worked perfectly.

Your Environment

  • Graylog Version: 4.3.0-rc3
  • Java Version: OpenJDK openjdk8-8.312.07.1
  • Elasticsearch Version: 7.10.2
  • MongoDB Version: 3.6.23
  • Operating System: FreeBSD 13.1-RC4
  • Browser version: Safari 15.4 (irrelevant anyway)
@borjam borjam added the bug label Apr 27, 2022
@mpfz0r mpfz0r self-assigned this Apr 27, 2022
@mpfz0r
Copy link
Member

mpfz0r commented Apr 27, 2022

Thanks for the report. I've recently seen this error in a different context. I will try to make this code more robust.
In the meantime you can use
disable_native_system_stats_collector=true in your graylog.conf as a workaround

@borjam
Copy link
Author

borjam commented Apr 27, 2022

Thank you, testing now!
Let me know how I can help to find the required statistics on FreeBSD. Maybe it's possible to achieve it in a portable way.

@borjam
Copy link
Author

borjam commented Apr 27, 2022

And confirmed, it started up.

Thanks!

@bernd bernd added the triaged label May 18, 2022
@chalfling
Copy link

Also got this error on FreeBSD 12.2 and Graylog 4.3.0

@dch
Copy link

dch commented Jun 2, 2022

thanks, warning added to the FreeBSD port for this as well.

@mpfz0r
Copy link
Member

mpfz0r commented Jun 9, 2022

This will be fixed in the upcoming 4.3.2 release.

@mpfz0r mpfz0r closed this as completed Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants