今天尝试在Linux环境下安装ArcGIS Server10.2,启动服务碰到一个错误:ERROR: Unable to start Xvfb on any port in the range 6600 - 6619.
具体环境:
Linux:Redhat 6.4 64Bit
ArcGIS Server 10.2
因为前一段时间在群上也有人问起这个错误,当时没有太在意,今天自己安装也碰到了,特此记录一下。
首先看一下ArcGIS Server10.2的系统需求:http://resources.arcgis.com/en/help/system-requirements/10.2/index.html#/ArcGIS_for_Server/015100000072000000/
特别注意的是,如果你的操作系统是RH6,需要安装以下组件:
关于Xvfb:主要就是通过内存计算模拟出图形界面,没有平常所见的操作界面,分为客户端和服务器。
通过这个错误,我直接在ArcGIS Server找到相关的帮助文档,如下所述:
DIAG010 |
Check Xvfb ports |
ArcGIS Server requires Xvfb and will start it on any port in the range of 6600-6619. If this check returns a warning, ArcGIS Server will not run properly. To correct this issue, open one of the ports in the range of 6600-6619 and restart ArcGIS Server. |
DIAG010 |
检查 Xvfb 端口 |
ArcGIS Server 需要 Xvfb,并可在 6600 至 6619 的范围内的任何端口上启动 Xvfb。如果此检查返回一则警告,ArcGIS Server 将无法正常运行。要更正此问题,请开启在 6600 至 6619 范围内的其中一个端口,然后重新启动 ArcGIS Server。 |
从它给出的直面意思就是只要在任何6600-6619直接开启端口启动Xvfb即可。但是检查和操作之后,没有任何作用,仍然报相关错误。
使用Linux的find命令,查找是否有相关文件
[ags@linghe ~]$ find -name xvfb ./arcgis/server/framework/runtime/xvfb [ags@linghe ~]$ cd arcgis/server/framework/runtime/xvfb/ [ags@linghe xvfb]$ ll total 24 -rwx------. 1 ags ags 4458 Aug 16 19:18 init_Xvfb.sh drwx------. 2 ags ags 4096 Jun 21 02:45 RHEL drwx------. 2 ags ags 4096 Jun 21 02:45 SuSE -rw-------. 1 ags ags 133 Aug 16 19:19 xvfb_err.log -rw-------. 1 ags ags 4 Aug 16 19:19 xvfb.port查看xvfb_err.log也没有得到相关有用的信息。
打开Init_Xvfb.sh文件,启动Xvfb就是使用这个.sh文件,如果有问题,应该跟该文件有关系。简单浏览该文件有以下几句话值得注意(70行左右)
# fall back to our own if [ -f /etc/SuSE-release ]; then XVFBBIN="${XVFBHOME}/SuSE/Xvfb" elif [ -f /etc/lsb-release ]; then XVFBBIN="${XVFBHOME}/Ubuntu/Xvfb" else XVFBBIN="${XVFBHOME}/RHEL/Xvfb" fi如果是SuSE操作系统,使用${XVFBHOME}/suse/Xvfb
如果是lsb-release使用${XVFBHOME}/ubuntu/Xvfb
这里面根据没有ubuntu文件夹,所以将ubuntu文件夹修改为REHL
# fall back to our own if [ -f /etc/SuSE-release ]; then XVFBBIN="${XVFBHOME}/SuSE/Xvfb" elif [ -f /etc/lsb-release ]; then XVFBBIN="${XVFBHOME}/RHEL/Xvfb" else XVFBBIN="${XVFBHOME}/RHEL/Xvfb" fi
login as: ags [email protected]'s password: Last login: Fri Aug 16 18:47:56 2013 from 192.168.100.111 [ags@linghe ~]$ cd arcgis/server/framework/runtime/xvfb/ [ags@linghe xvfb]$ ll total 20 -rwx------. 1 ags ags 4460 Jun 21 02:46 init_Xvfb.sh drwx------. 2 ags ags 4096 Jun 21 02:45 RHEL drwx------. 2 ags ags 4096 Jun 21 02:45 SuSE -rw-------. 1 ags ags 157 Aug 16 18:46 xvfb_err.log [ags@linghe xvfb]$ vi init_Xvfb.sh [ags@linghe xvfb]$ cd [ags@linghe ~]$ cd arcgis/server/ [ags@linghe server]$ ./startserver.sh Attempting to start ArcGIS Server... [ OK ]