Feature #313

Report hint to user when queue cannot be open

Added by Madars almost 6 years ago. Updated almost 4 years ago.

Status:ClosedStart date:05/11/2018
Priority:Normal (Code 4)Due date:
Assignee:-% Done:

100%

Category:-
Target version:-

Description

Currently for example:

Failed to open queue: [/rigdv,sys,bg,xadmin,12377] err: Invalid argument

Has no lead to developer that maybe /etc/rc.local is not loaded.

History

#1 Updated by Madars about 4 years ago

N:NDRX:5:c6d12c1b:15734:7fc5c26c9900:000:20200316:142536632:d_env_config:config.c:0219:SystemV SEM IPC Key set to: [42001]

N:NDRX:5:c6d12c1b:15734:7fc5c26c9900:000:20200316:142536632:_open_rply_q:config.c:0085:About to open xadmin's reply queue

N:NDRX:2:c6d12c1b:15734:7fc5c26c9900:000:20200316:142536632:_open_rply_q:config.c:0094:Failed to open queue: [/timeprorun,sys,bg,xadmin,15734] err: Invalid argument

N:NDRX:5:c6d12c1b:15734:7fc5c26c9900:000:20200316:142536632:un_init     :xadmin.c:0988:into un-init

N:NDRX:5:c6d12c1b:15734:7fc5c26c9900:000:20200316:142536633:ndrx_tpterm :i/init.c:0629:_tpterm called

N:NDRX:5:c6d12c1b:15734:7fc5c26c9900:000:20200316:142536633:ndrx_tpterm :i/init.c:0634:_tpterm ATMI is not initialized - nothing to do.

N:NDRX:5:c6d12c1b:15734:7fc5c26c9900:000:20200316:142536633:ndrx_tpterm :i/init.c:0699:_tpterm returns 0

#2 Updated by Madars about 4 years ago

At this func we could report like this:

expublic int ndrx_xadmin_open_rply_q(void)
{
    int ret = EXSUCCEED;

    NDRX_LOG(log_debug, "About to open xadmin's reply queue");
    /* Open new queue... */
    if (!M_is_reply_q_open)
    {
        if ((mqd_t)EXFAIL==(G_config.reply_queue = ndrx_mq_open_at(G_config.reply_queue_str,
                                            O_RDWR | O_CREAT,
                                            S_IWUSR | S_IRUSR, NULL)))
        {
            NDRX_LOG(log_error, "Failed to open queue: [%s] err: %s",
                                            G_config.reply_queue_str, strerror(errno));
            userlog("Failed to open queue: [%s] err: %s",
                                            G_config.reply_queue_str, strerror(errno));

            fprintf(stderr, "* ERROR: Invalid Queue config \"Enduro/X Administration Manual\", chapter 2.\n");

            ret=EXFAIL;
            goto out;
        }

Only needs to ensure that for emq, posix q and system v we return the error codes. And for EINVAL we show this error.

#3 Updated by Madars about 4 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

awaiting tests...

#4 Updated by Madars about 4 years ago

report is reported in xadmin cannot open reply queue, or fails to send msg to ndrxd

#5 Updated by Madars almost 4 years ago

  • Status changed from Resolved to Closed

7.0.32+

Also available in: Atom PDF