启动时总是收到消息:“180 秒后仍然没有看到 Solr 监听 8983”

问题描述 投票:0回答:3

版本:Solr 6.3

操作系统:CentOs 7.3

安装后运行

service solr restart
,180秒后我总是在打印INFO消息之前收到相同的消息。

$ service solr restart
Archiving 1 old GC log files to /var/solr/logs/archived
Archiving 1 console log files to /var/solr/logs/archived
Rotating solr logs, keeping a max of 9 generations
Waiting up to 180 seconds to see Solr running on port 8983 [-]  Still not seeing Solr listening on 8983 after 180 seconds!

奇怪的是,Solr 服务器几乎立即启动并可以通过 Web 界面访问,但是每次都花费了整整 180 秒的等待时间来抛出该消息。是什么原因导致此消息以及如何让 Solr 更快地运行?

谢谢!

solr
3个回答
0
投票

这看起来要么 Solr 没有在该端口上运行,要么它在特定接口上侦听,并且检查器脚本正在使用默认的(本地主机?)。您可以通过调试来运行它或检查启动脚本中的定义吗?


0
投票

我在尝试启动 solr 时收到相同的错误消息:“180 秒后仍然没有看到 Solr 监听 8983!”。但是,我也无法访问 solr 的 Web 界面。检查 /var/log/solr 中的日志文件,我读到以下错误消息:

java.nio.file.AccessDeniedException: /tmp/start_6692986047430088693.properties
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
        at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
        at java.nio.file.Files.newByteChannel(Files.java:361)
        at java.nio.file.Files.createFile(Files.java:632)
        at java.nio.file.TempFileHelper.create(TempFileHelper.java:138)
        at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:161)
        at java.nio.file.Files.createTempFile(Files.java:897)
        at org.eclipse.jetty.start.StartArgs.getMainArgs(StartArgs.java:596)
        at org.eclipse.jetty.start.Main.invokeMain(Main.java:205)
        at org.eclipse.jetty.start.Main.start(Main.java:458)
        at org.eclipse.jetty.start.Main.main(Main.java:76)

问题是我处于 FreeBSD 监狱中,该监狱在 /tmp 目录(也在 /var/tmp 上)设置了异常权限。修复这些目录的权限解决了问题:

# chmod 1777 /tmp /var/tmp

我意识到您的问题的原因可能有所不同。但由于错误消息是相同的,我认为在此处添加此解决方案可能会很有用。


0
投票

对我来说,这是因为JVE内存不足。

[pi@local-solr-1 ~]$ cat /var/solr_data/110/logs/solr-8983-console.log
OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006c0000000, 4294967296, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 4294967296 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /opt/solr-8.11.2/server/hs_err_pid3556.log

我们可以看到,JVE需要4G内存。 我只为我的虚拟机分配了 1G RAM。 我调整到8G后就可以了。

© www.soinside.com 2019 - 2024. All rights reserved.