本文介绍了Java和R与Rserve的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有用于分析的Java应用程序,需要安装R.我的系统中还安装了R,并且安装了Rserve库.但是,当我尝试在R控制台中实现命令Rserve()时,会出现以下错误:

I have java application for analysis for which need to have R installed. I have R also installed in my system and I installed Rserve library. But when I am trying to implement command Rserve() in my R console, following error is coming:

SOCK_ERROR:绑定错误#98(地址已在使用中)

SOCK_ERROR: bind error #98(address already in use)

我已经安装了Java应用程序所需的所有必备组件以及Rserve,并且我认为除了Rserve之外,它们都可以正常工作.有人可以帮助我摆脱困境吗?

I have installed all the prerequisite, along with Rserve, needed for my java application and I think these are working fine except Rserve. Can anybody help me out from this predicament?

工具名称是cytoscape,我要运行它会引发错误的DvD应用程序.操作系统是Linux(CentOS).

The tool name is cytoscape along with that I want to run DvD application for which it is throwing error. And operating system is Linux (CentOS).

谢谢,曼达语

推荐答案

这表示您在同一主机和同一端口上有一台正在运行的服务器.这可能是由于以前执行过但从未关闭服务器的执行引起的.如果有客户端,您可以尝试连接到服务器并关闭它,或者验证是否有服务器在运行.由于您使用的是CentOS,因此您可以使用:

it means that you have a running server on the same host and on the same port. It could be caused by a previous execution who never shut down the server. You could try connecting to the server and shut it down, if you have a client, or verify if there's a server running. Since you are on CentOS you could understnd with a :

ps faux | grep Rserve

如果您看到类似这样的行

If you see a row like

root     23762  0.0  0.7 211304 28632 ?        Ss   14:11   0:00 /usr/lib64/R/bin/Rserve

那么你知道你拥有它.您可以杀死服务器并重新运行您的工具.

then you know you have it. You could kill the server and re-run your tool.

这篇关于Java和R与Rserve的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 05:06