Я могу подключиться к MQ из Eclipse Explorer со всеми учетными записями пользователей. Но когда я пытаюсь подключиться от C-клиента с моим useraccount ('muthu'), он выдает ошибку «MQCONN закончился кодом причины 2035». Примечание. Я могу получить доступ к MQ, используя тот же код C-Client, при запуске кода в качестве пользователя root (который является частью группы mqm).Ошибка подключения IBM Websphere
Моя текущая настройка
ALTER QMGR PSNPRES(SAFE)
ALTER QMGR PSMODE (ENABLED)
ALTER QMGR CHLAUTH(DISABLED)
SET CHLAUTH(*) TYPE(BLOCKUSER) USERLIST('*NOACCESS')
DEFINE CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN) MCAUSER('sampleuser') REPLACE
ALTER AUTHINFO(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) AUTHTYPE(IDPWOS) CHCKCLNT(OPTIONAL)
REFRESH SECURITY TYPE(CONNAUTH)
Ниже журнала находится в AMQERR01.LOG
----- cmqxrsrv.c : 2363 -------------------------------------------------------
02/22/17 13:51:13 - Process(353.6) User(root) Program(amqrmppa)
Host(ec060cda2b57) Installation(Installation1)
VRMF(9.0.0.0) QMgr(TMVDEVQM)
AMQ9788: Slow DNS lookup for address '172.17.0.1'.
EXPLANATION:
An attempt to resolve address '172.17.0.1' using the 'getnameinfo' function
call took 20 seconds to complete. This might indicate a problem with the DNS
configuration.
ACTION:
Ensure that DNS is correctly configured on the local system.
If the address was an IP address then the slow operation was a reverse DNS
lookup. Some DNS configurations are not capable of reverse DNS lookups and some
IP addresses have no valid reverse DNS entries. If the problem persists,
consider disabling reverse DNS lookups until the issue with the DNS can be
resolved.
----- amqcrhna.c : 794 --------------------------------------------------------
02/22/17 13:51:33 - Process(353.6) User(root) Program(amqrmppa)
Host(ec060cda2b57) Installation(Installation1)
VRMF(9.0.0.0) QMgr(TMVDEVQM)
AMQ9788: Slow DNS lookup for address '172.17.0.1'.
EXPLANATION:
An attempt to resolve address '172.17.0.1' using the 'getnameinfo' function
call took 20 seconds to complete. This might indicate a problem with the DNS
configuration.
ACTION:
Ensure that DNS is correctly configured on the local system.
If the address was an IP address then the slow operation was a reverse DNS
lookup. Some DNS configurations are not capable of reverse DNS lookups and some
IP addresses have no valid reverse DNS entries. If the problem persists,
consider disabling reverse DNS lookups until the issue with the DNS can be
resolved.
----- amqcrhna.c : 794 --------------------------------------------------------
02/22/17 13:51:33 - Process(353.6) User(root) Program(amqrmppa)
Host(ec060cda2b57) Installation(Installation1)
VRMF(9.0.0.0) QMgr(TMVDEVQM)
AMQ9209: Connection to host '172.17.0.1' for channel 'SYSTEM.DEF.SVRCONN'
closed.
EXPLANATION:
An error occurred receiving data from '172.17.0.1' over TCP/IP. The connection
to the remote host has unexpectedly terminated.
The channel name is 'SYSTEM.DEF.SVRCONN'; in some cases it cannot be determined
and so is shown as '????'.
ACTION:
Tell the systems administrator.
C Код сутью:
int pub(char *topic_name, char *queue_manager_name, char *message)
{
/* Declare file and character for sample input */
FILE *fp;
/* Declare MQI structures needed */
MQOD od = {MQOD_DEFAULT}; /* Object Descriptor */
MQMD md = {MQMD_DEFAULT}; /* Message Descriptor */
MQPMO pmo = {MQPMO_DEFAULT}; /* put message options */
/** note, sample uses defaults where it can **/
MQHCONN Hcon; /* connection handle */
MQHOBJ Hobj; /* object handle */
MQLONG CompCode; /* completion code */
MQLONG OpenCode; /* MQOPEN completion code */
MQLONG Reason; /* reason code */
MQLONG CReason; /* reason code for MQCONN */
MQLONG messlen; /* message length */
char buffer[100]; /* message buffer */
char QMName[50]; /* queue manager name */
QMName[0] = 0; /* default */
strncpy(QMName, queue_manager_name, MQ_Q_MGR_NAME_LENGTH);
pmo.Options = MQPMO_FAIL_IF_QUIESCING
| MQPMO_NO_SYNCPOINT;
/******************************************************************/
/* */
/* Connect to queue manager */
/* */
/******************************************************************/
MQCONN(QMName, /* queue manager */
&Hcon, /* connection handle */
&CompCode, /* completion code */
&CReason); /* reason code */
/* report reason and stop if it failed */
if (CompCode == MQCC_FAILED)
{
printf("MQCONN ended with reason code %d\n", CReason);
return (int)CReason;
}
.................
Любые мысли. ?
Это продолжение моего вопроса от Provide anonymous access to IBM WebSphere MQ
С каким клиентом вы подключаетесь? Один из примеров приложений или ваш собственный? Если это образец приложения, какой из них и какие переменные среды вы устанавливаете/параметры, вы передаете? В журнале, который вы указали, вы можете просто проверить, что вы дали весь журнал из журнала менеджера очереди (/ var/mqm/qmgrs/ /errors/AMQERR01.LOG) Я ожидал увидеть еще одно сообщение журнала пойдите с ошибкой AMQ9557. –
Просто добавлена строка из журнала, предшествующего AMQ9557. Это то, о чем вы говорите? Я использую один из примеров pub/sub c-programs, который поставляется с установкой, с небольшими изменениями. – Muthukumar
Какая пробная паб/подпрограмма точно? amqspuba.c? amqssuba.c? Я был на самом деле после предыдущей записи в журнале. Например, я быстро обновил ошибку AMQ9557 в журналах Queue Manager и до того, как это сообщение об ошибке является другим сообщением об ошибке (в моем случае AMQ8075), в котором подробно объясняется, почему была вызвана ошибка AMQ9557. –