Activator Active Stocks启动应用程序无法使用java.io.IOException运行?

Sky*_*ker 5 linux scala playframework typesafe

我在Ubuntu 14.04 LTS中获得了最新版本的typesafe激活器.我也有最新版本的Scala/SBT等.

当我启动Active Stocks应用程序时,我收到以下错误java.io.IOException: User limit of inotify watches reached.我不知道这是什么......

bravegag@zeus:~/code/activestocks$ ./activator
[info] Loading project definition from /home/bravegag/code/activestocks/project
[info] Set current project to reactive-stocks (in build file:/home/bravegag/code/activestocks/)
[reactive-stocks] $ ~run

java.io.IOException: User limit of inotify watches reached
    at sun.nio.fs.LinuxWatchService$Poller.implRegister(LinuxWatchService.java:261)
    at sun.nio.fs.AbstractPoller.processRequests(AbstractPoller.java:260)
    at sun.nio.fs.LinuxWatchService$Poller.run(LinuxWatchService.java:326)
    at java.lang.Thread.run(Thread.java:745)
[trace] Stack trace suppressed: run last compile:run for the full output.
[error] (compile:run) java.lang.reflect.InvocationTargetException
[error] Total time: 0 s, completed Nov 29, 2014 4:57:15 PM
1. Waiting for source changes... (press enter to interrupt)
Run Code Online (Sandbox Code Playgroud)

检查操作系统限制我看到:

bravegag@zeus:~$ cat /proc/sys/fs/inotify/max_user_instances
128
bravegag@zeus:~$ cat /proc/sys/fs/inotify/max_user_watches
8192
Run Code Online (Sandbox Code Playgroud)

DiC*_*rio 14

不是我的解决方案,但它总是很好地拥有它所属的anwser:

$ sudo sysctl fs.inotify.max_user_watches=30000
Run Code Online (Sandbox Code Playgroud)

将立即解决问题.

否则/etc/sysctl.conf 通过简单地添加fs.inotify.max_user_watches=30000 (不要忘记换行)来设置值

有关实际情况的参考资料可以在这里找到:http://www.la-samhna.de/samhain/manual/finotify.html

之后$ activator run就像往常一样工作.