0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

java.lang.RuntimeException: java.io.IOException: User limit of inotify watches reachedエラーが出る

Posted at

はじめに

日本語の記事がなかったようなので簡素ですが、解決方法をのせます

問題

Javaのアプリケーションを起動したところ以下のエラーがでました

java.lang.RuntimeException: java.io.IOException: User limit of inotify watches reached
	at io.quarkus.deployment.dev.filesystem.watch.WatchServiceFileSystemWatcher.watchPath(WatchServiceFileSystemWatcher.java:174)
	at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.startTestScanningTimer(RuntimeUpdatesProcessor.java:248)
	at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.checkForChangedTestClasses(RuntimeUpdatesProcessor.java:657)
	at io.quarkus.deployment.dev.RuntimeUpdatesProcessor$1.testsEnabled(RuntimeUpdatesProcessor.java:155)
	at io.quarkus.deployment.dev.testing.TestSupport.start(TestSupport.java:136)
	at io.quarkus.deployment.dev.testing.TestHandler.accept(TestHandler.java:21)
	at io.quarkus.deployment.dev.testing.TestHandler.accept(TestHandler.java:17)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.performCustomBuild(AugmentActionImpl.java:162)
	at io.quarkus.deployment.dev.IsolatedTestModeMain.accept(IsolatedTestModeMain.java:130)
	at io.quarkus.deployment.dev.IsolatedTestModeMain.accept(IsolatedTestModeMain.java:34)
	at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:149)
	at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:104)
	at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:131)
	at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:62)
Caused by: java.io.IOException: User limit of inotify watches reached
	at java.base/sun.nio.fs.LinuxWatchService$Poller.implRegister(LinuxWatchService.java:264)
	at java.base/sun.nio.fs.AbstractPoller.processRequests(AbstractPoller.java:266)
	at java.base/sun.nio.fs.LinuxWatchService$Poller.run(LinuxWatchService.java:364)
	at java.base/java.lang.Thread.run(Thread.java:1589)

解決方法

以下を実行したところ起動できるようになりました

$ echo fs.inotify.max_user_watches=262144 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -p

おわりに

日本語の記事がないと不安になる人がいるのかなと思い、調べればすぐわかることですが記事にしてみました

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?