处理Portal无法访问一例:Could not access any Portal machines. Please contact your system administrator.

问题描述: 今天早上访问前两天搭建好的一套Portal,版本是10.5,其中ArcGIS Server,DataStore,Portal都部署在一台Redhat 7.3的操作系统中,访问Portal报如下错误:
Could not access any Portal machines. Please contact your system administrator.

排查过程:
  1. 由于网页可以返回错误信息,说明443端口处于正常监听状态。
  2. 查看Portal日志,报了很多无法Connection的错误,如下所示

 
WARNING: Could not connect to Log service. Writing log message to console.
<Msg time="2017-07-25T10:48:02,937" type="INFO" code="217070" source="Portal" process="6355" thread="1" methodName="" machine="" user="" elapsed="">Starting portal.</Msg>
Tue Jul 25 10:48:02 CST 2017 JMXServerContoller.getJMXConnector() failed to return connection - Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is
java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused]6355:10
Tue Jul 25 10:48:02 CST 2017 JMXServerContoller.getJMXConnector() failed to return connection - Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is
java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused]6355:10
WARNING: Could not connect to Log service. Writing log message to console.
<Msg time="2017-07-25T10:48:02,937" type="INFO" code="217071" source="Portal" process="6355" thread="1" methodName="" machine="" user="" elapsed="">Starting JMX server.</Msg>
Tue Jul 25 10:48:02 CST 2017 JMXServerContoller.getJMXConnector() failed to return connection - Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is
java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused]6355:10
WARNING: Could not connect to Log service. Writing log message to console.
<Msg time="2017-07-25T10:48:03,142" type="INFO" code="217037" source="Portal" process="6355" thread="1" methodName="" machine="" user="" elapsed="">Log Service not started. Restartin
g it.</Msg>
WARNING: Could not connect to Log service. Writing log message to console.
<Msg time="2017-07-25T10:48:03,142" type="INFO" code="217038" source="Portal" process="6355" thread="1" methodName="" machine="" user="" elapsed="">Registering and starting log service
ce.</Msg>



  1. 查看针对于某个机器上的日志信息,如下:

 
[arcgis@bigdataserver portal]$ pwd
/home/arcgis/arcgis/portal/usr/arcgisportal/logs/BIGDATASERVER.ESRI.COM/portal
[arcgis@bigdataserver portal]$ ll
total 1600
-rwx------ 1 arcgis arcgis 40814 Jul 14 12:15 portal-20170710.172513-12386-0.0.log
-rwx------ 1 arcgis arcgis 0 Jul 10 17:25 portal-20170710.172513-12386-0.0.log.lck
-rw------- 1 arcgis arcgis 204 Jul 14 16:00 portal-20170714.155850-13334-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 14 15:58 portal-20170714.155850-13334-0.0.log.lck
-rw------- 1 arcgis arcgis 2626 Jul 14 16:39 portal-20170714.162138-3757-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 14 16:21 portal-20170714.162138-3757-0.0.log.lck
-rw------- 1 arcgis arcgis 0 Jul 14 16:39 portal-20170714.163959-10178-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 14 16:39 portal-20170714.163959-10178-0.0.log.lck
-rw------- 1 arcgis arcgis 0 Jul 14 17:00 portal-20170714.170027-14620-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 14 17:00 portal-20170714.170027-14620-0.0.log.lck
-rw------- 1 arcgis arcgis 0 Jul 14 17:00 portal-20170714.170056-14765-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 14 17:00 portal-20170714.170056-14765-0.0.log.lck
-rw------- 1 arcgis arcgis 0 Jul 14 17:14 portal-20170714.171403-16573-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 14 17:14 portal-20170714.171403-16573-0.0.log.lck
-rw------- 1 arcgis arcgis 0 Jul 14 17:23 portal-20170714.172323-17918-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 14 17:23 portal-20170714.172323-17918-0.0.log.lck
-rw------- 1 arcgis arcgis 0 Jul 14 17:36 portal-20170714.173620-19717-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 14 17:36 portal-20170714.173620-19717-0.0.log.lck
-rw------- 1 arcgis arcgis 0 Jul 14 17:40 portal-20170714.174004-20458-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 14 17:40 portal-20170714.174004-20458-0.0.log.lck
-rw------- 1 arcgis arcgis 0 Jul 14 20:54 portal-20170714.205453-15589-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 14 20:54 portal-20170714.205453-15589-0.0.log.lck
-rw------- 1 arcgis arcgis 1578 Jul 14 21:00 portal-20170714.205620-16235-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 14 20:56 portal-20170714.205620-16235-0.0.log.lck
-rw------- 1 arcgis arcgis 1665 Jul 14 21:03 portal-20170714.210207-18728-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 14 21:02 portal-20170714.210207-18728-0.0.log.lck
-rw------- 1 arcgis arcgis 1169 Jul 14 21:09 portal-20170714.210814-19234-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 14 21:08 portal-20170714.210814-19234-0.0.log.lck
-rw------- 1 arcgis arcgis 1579 Jul 18 11:25 portal-20170718.112231-26801-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 18 11:22 portal-20170718.112231-26801-0.0.log.lck
-rw------- 1 arcgis arcgis 1099 Jul 18 11:30 portal-20170718.112952-28734-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 18 11:29 portal-20170718.112952-28734-0.0.log.lck
-rw------- 1 arcgis arcgis 1578 Jul 18 11:38 portal-20170718.113443-29782-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 18 11:34 portal-20170718.113443-29782-0.0.log.lck
-rw------- 1 arcgis arcgis 10905 Jul 18 13:37 portal-20170718.113832-30728-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 18 11:38 portal-20170718.113832-30728-0.0.log.lck
-rw------- 1 arcgis arcgis 2204 Jul 18 15:04 portal-20170718.134351-26095-0.0.log
-rw------- 1 arcgis arcgis 1917 Jul 21 09:46 portal-20170718.165415-2830-0.0.log
-rw------- 1 arcgis arcgis 1572 Jul 24 16:40 portal-20170724.090242-3363-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 24 09:02 portal-20170724.090242-3363-0.0.log.lck
-rw------- 1 arcgis arcgis 1076455 Jul 25 10:32 portal-20170724.164051-15688-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 24 16:40 portal-20170724.164051-15688-0.0.log.lck
-rw------- 1 arcgis arcgis 83754 Jul 25 10:47 portal-20170725.103219-994-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 25 10:32 portal-20170725.103219-994-0.0.log.lck
-rw------- 1 arcgis arcgis 356602 Jul 25 11:40 portal-20170725.104803-6355-0.0.log
-rw------- 1 arcgis arcgis 0 Jul 25 10:48 portal-20170725.104803-6355-0.0.log.lck
[arcgis@bigdataserver portal]$ vi portal-20170725.104803-6355-0.0.log

<Msg time="2017-07-25T11:41:12,378" type="SEVERE" code="218010" source="Portal Admin" process="6699" thread="13" methodName="" machine="BIGDATASERVER.ESRI.COM" user="" elapsed="">The portal has been initialized and configured but is not accessible. The internal portal database does not appear to be running or accepting connections. Restart the portal machine or machines and if the problem persists, contact Esri technical support (U.S.) or your distributor (customers outside the U.S.).</Msg>
<Msg time="2017-07-25T11:41:17,384" type="SEVERE" code="218010" source="Portal Admin" process="6699" thread="13" methodName="" machine="BIGDATASERVER.ESRI.COM" user="" elapsed="">The portal has been initialized and configured but is not accessible. The internal portal database does not appear to be running or accepting connections. Restart the portal machine or machines and if the problem persists, contact Esri technical support (U.S.) or your distributor (customers outside the U.S.).</Msg>
<Msg time="2017-07-25T11:41:22,423" type="SEVERE" code="218010" source="Portal Admin" process="6699" thread="13" methodName="" machine="BIGDATASERVER.ESRI.COM" user="" elapsed="">The portal has been initialized and configured but is not accessible. The internal portal database does not appear to be running or accepting connections. Restart the portal machine or machines and if the problem persists, contact Esri technical support (U.S.) or your distributor (customers outside the U.S.).</Msg>

错误日志描述是内部所使用的数据库好像没有运行或者运行了但是不接受连接。
  1. 查看内部数据库所监听的端口是否正常(内部PostgreSQL所监听的端口是7654)。

 
[arcgis@bigdataserver portal]$ netstat -lnp|grep 7654
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:7654 0.0.0.0:* LISTEN 6669/postgres
tcp6 0 0 :::7654 :::* LISTEN 6669/postgres
unix 2 [ ACC ] STREAM LISTENING 7437357 6669/postgres /tmp/.s.PGSQL.7654

内部端口监听正常,说明数据库运行正常,可能是无法接受某种信息的连接。继续查看Portal中的数据库日志,如下:
[arcgis@bigdataserver pg_log]$ pwd
/home/arcgis/arcgis/portal/usr/arcgisportal/logs/database/pg_log
[arcgis@bigdataserver pg_log]$ ll
total 18296
-rw------- 1 arcgis arcgis 1046882 Jul 11 14:59 postgresql-2017-07-10_024639.log -rw------- 1 arcgis arcgis 1438270 Jul 12 14:59 postgresql-2017-07-11_000000.log -rw------- 1 arcgis arcgis 2694558 Jul 13 14:59 postgresql-2017-07-12_000000.log -rw------- 1 arcgis arcgis 8322253 Jul 14 12:15 postgresql-2017-07-13_000000.log -rw------- 1 arcgis arcgis 158291 Jul 14 16:39 postgresql-2017-07-14_012427.log -rw------- 1 arcgis arcgis 1070 Jul 14 21:00 postgresql-2017-07-14_055701.log -rw------- 1 arcgis arcgis 1548 Jul 14 21:03 postgresql-2017-07-14_060246.log -rw------- 1 arcgis arcgis 378926 Jul 15 14:59 postgresql-2017-07-14_060855.log -rw------- 1 arcgis arcgis 302990 Jul 16 14:59 postgresql-2017-07-15_000000.log -rw------- 1 arcgis arcgis 773882 Jul 17 14:59 postgresql-2017-07-16_000000.log -rw------- 1 arcgis arcgis 286297 Jul 18 11:21 postgresql-2017-07-17_000000.log -rw------- 1 arcgis arcgis 1064 Jul 18 11:24 postgresql-2017-07-17_202352.log -rw------- 1 arcgis arcgis 1070 Jul 18 11:37 postgresql-2017-07-17_203523.log -rw------- 1 arcgis arcgis 1070 Jul 18 13:37 postgresql-2017-07-17_203912.log -rw------- 1 arcgis arcgis 229521 Jul 18 14:59 postgresql-2017-07-17_224629.log -rw------- 1 arcgis arcgis 111609 Jul 18 16:34 postgresql-2017-07-18_000000.log -rw------- 1 arcgis arcgis 1079056 Jul 19 14:59 postgresql-2017-07-18_015727.log -rw------- 1 arcgis arcgis 302998 Jul 20 14:59 postgresql-2017-07-19_000000.log -rw------- 1 arcgis arcgis 340829 Jul 21 14:59 postgresql-2017-07-20_000000.log -rw------- 1 arcgis arcgis 35806 Jul 21 17:42 postgresql-2017-07-21_000000.log -rw------- 1 arcgis arcgis 295547 Jul 24 14:59 postgresql-2017-07-23_180542.log -rw------- 1 arcgis arcgis 119762 Jul 24 16:40 postgresql-2017-07-24_000000.log -rw------- 1 arcgis arcgis 411628 Jul 25 10:31 postgresql-2017-07-24_014235.log -rw------- 1 arcgis arcgis 117978 Jul 25 10:47 postgresql-2017-07-24_193348.log -rw------- 1 arcgis arcgis 152830 Jul 25 11:46 postgresql-2017-07-24_194843.log [arcgis@bigdataserver pg_log]$ vi postgresql-2017-07-24_194843.log
LOG: connection received: host=127.0.0.1 port=16138
FATAL: no pg_hba.conf entry for host "127.0.0.1", user "liufeng", database "gwdb", SSL off
LOG: connection received: host=127.0.0.1 port=16154
FATAL: no pg_hba.conf entry for host "127.0.0.1", user "liufeng", database "gwdb", SSL off
LOG: connection received: host=127.0.0.1 port=16162
FATAL: no pg_hba.conf entry for host "127.0.0.1", user "liufeng", database "gwdb", SSL off
LOG: connection received: host=127.0.0.1 port=16186
FATAL: no pg_hba.conf entry for host "127.0.0.1", user "liufeng", database "gwdb", SSL off

至此确定错误信息,是pg_hba.conf中没有针对于127.0.0.1的ssl连接项。看到这个错误想起来是昨天为了让别的机器可以连接上手动修改了pg_hba.conf中的该项。
手动改动pg_hba.conf,将该项加上,如下:
[arcgis@bigdataserver db]$ more pg_hba.conf
local all liufeng md5
local replication liufeng md5
host all liufeng 127.0.0.1/32 md5
host all liufeng 192.168.0.0/16 md5
host replication liufeng 127.0.0.1/32 md5
host all liufeng ::1/128 md5
host replication liufeng ::1/128 md5

  1. 重启Portal

 
[arcgis@bigdataserver portal]$ ./stopportal.sh
Stopping Portal for ArcGIS...
Portal for ArcGIS stopped successfully.
[arcgis@bigdataserver portal]$ ./startportal.sh
Starting Portal for ArcGIS...
Portal for ArcGIS started successfully.

后问题解决。
文章来源:http://blog.csdn.net/liufeng1980423/article/details/76064215

0 个评论

要回复文章请先登录注册