Menu

#41 log exchange not defaulting to xs_<user>

SarraBeta
closed-fixed
None
5
2017-07-29
2016-06-22
Ian Cameron
No

Receiving a permission denied error when attempting to deliver file to a remote host, using sr_sender. This is due to the log exchange not defaulting to xs_<user>.</user>

2016-06-22 13:16:57,946 [ERROR] Delivery failed sftp://sarra@localhost///tmp/configfile. Type: <class 'permissionerror'="">, Value: [Errno 13] Permission denied
2016-06-22 13:16:57,948 [DEBUG] Closed channel #4
2016-06-22 13:16:57,948 [ERROR] Type: <class 'amqplib.client_0_8.exceptions.amqpchannelexception'="">, Value: (403, "ACCESS_REFUSED - access to exchange 'xlog' in vhost '/' refused for user 'peter'", (60, 40), 'Channel.basic_publish')</class></class>

There is a work around, but this should not be necessary:
Go back to your configuration file and explicity add:
log_exchange xs_<user></user>

Discussion

  • psilva

    psilva - 2016-07-17
    • assigned_to: Murray Rennie
     
  • psilva

    psilva - 2016-07-17

    Murray, can you take a look at this?

     
  • Murray Rennie

    Murray Rennie - 2016-07-22

    Aren't log exchanges xl_<user> ?</user>

     
  • Murray Rennie

    Murray Rennie - 2016-07-22

    if so it was changed in this ticket...https://sourceforge.net/p/metpx/bugs/34/

     
  • psilva

    psilva - 2016-08-29

    log -> report change means... the setting is...

    report_exchange xs_user

     
  • Murray Rennie

    Murray Rennie - 2016-08-30

    so in sr_sender is there any reason for it to go to xreport, or should it always go to xs_<username>?</username>

     
  • Murray Rennie

    Murray Rennie - 2016-08-30

    from Peter

    when the user is a feeder, or an admin, it should go directly to xreport.
    When the user is a subscriber or a source, it should go to xs_*

     
  • Murray Rennie

    Murray Rennie - 2016-09-02

    Made modifications. Wednesday-Thursday Aug31-Sep1

     
  • Murray Rennie

    Murray Rennie - 2016-09-02

    Tested Sept 1

     
  • Murray Rennie

    Murray Rennie - 2016-09-02

    Pushed up Sept 1

     
  • psilva

    psilva - 2016-09-26
    • status: open --> closed
     
  • psilva

    psilva - 2016-09-26
    • status: closed --> open
     
  • psilva

    psilva - 2016-09-26

    cannot find commit in origin/master
    Please try to push again.

     
  • Murray Rennie

    Murray Rennie - 2016-11-25

    I'm confused here. I did push this up, but also along the way sr_log.py became sr_report.py. And since I have updated my git repository since then the sr_log was removed and replaced by sr_report.py. And from the looks of things my changes from sr_log are already in sr_report...specifically lines72-77.

     

    Last edit: Murray Rennie 2016-11-25
  • psilva

    psilva - 2016-11-26

    I understand the confusion. The bug you are thinking about is indeed fixed (and closed) it is bug #34.
    the fix to sr_report is there, and fine.

    this bug is against the log_exchange used by sr_sender. It's the same bug, but in a different component. Sr_sender does not call sr_log so a fix to sr_log will not help. log_exchange (now report_exchange) used by all components (sr_sender, sr_subscribe, sr_sarra, sr_shovel.

    If you look at your comment in this bug on Aug 28th, you see you mention sr_sender, for example... and you mention committing a change in Sept. 1st but I cannot find it in the repo (inside sr_sender.)

    clarification:
    sr_log/sr_report is not a logging API used by the other bits (great demo of why the name of log was changed to report... endlessly confusion!) sr_report is an independent component invoked to view or process reports of successful or failed delivery of products.

    I guess rather than opening the same bug on all the different bits, it should be rephrased:

    for component in [ 'sr_subscribe', 'sr_sender', 'sr_sarra', 'sr_shovel', 'sr_post', 'sr_watch' ]:
    if component called by [ 'feeder' or 'admin'] then default_report_exchange = xreport.
    else # component invoked by a source or subscriber
    default_report_exchange = xs_<username></username>

    Does it make more sense now?

     
  • Murray Rennie

    Murray Rennie - 2016-12-05

    Well, I have to figure this out. sr_sender.py has no nice place to ensure the right report exchange is set, and I believe it's set elsewhere. The same can be said for most of the other scripts mentioned.

     

    Last edit: Murray Rennie 2016-12-05
  • Murray Rennie

    Murray Rennie - 2016-12-05

    sr_sender has entries for two exchanges. So should the exchange be based on the origionating broker or should it be based on the post_broker?

     
  • Murray Rennie

    Murray Rennie - 2016-12-06

    My test change uses the originating broker in sr_sender

     

    Last edit: Murray Rennie 2016-12-06
  • psilva

    psilva - 2016-12-14
    • Group: deferred --> v2.16.00b
     
  • Murray Rennie

    Murray Rennie - 2017-01-17

    pushed up a sample sr_sender.py

     
  • psilva

    psilva - 2017-02-03

    yes, the fix made it in.
    one thing: I noticed the exchange chosen in xr_<user> ... when it failed the flow_test.sh (got permission denied errors) so I changed it to xs_<user> and it was fine. xr_<user> exchanges are for reports coming back from the system. users write everything to their source, but sr_report should (once the report routing logic fully works) read from xr_<user></user></user></user></user>

     
  • psilva

    psilva - 2017-04-24
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB