Jump to content


Swarm review email is not being sent

swarm review email

  • Please log in to reply
6 replies to this topic

#1 Andrew DeFaria

Andrew DeFaria

    Advanced Member

  • Members
  • PipPipPip
  • 125 posts

Posted 01 March 2016 - 12:36 AM

My users are complaining that Swarm review email is not being sent. Looking at the log I see lots of messages like:

CRIT
exception 'Application\Permissions\Exception\UnauthorizedException' in /opt/perforce/swarm/module/Application/config/module.config.php:289

I don't know what's wrong. How can I fix this?

#2 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 01 March 2016 - 08:01 PM

Hi Andrew,

Thank you for sending the error message. Has Swarm been working fine otherwise? If so, this message can be ignored. The message is not a critical error and is a false positive in how information warnings are handled. They are looking to adjust Swarm logging to include warnings or informational type warnings as everything right now is logged critical, which can be problematic.

Is this for all users this is happening? This message can occur when a user is accessing an area of the depot they do not have permission, or a part of Swarm that they do not have access to. You should be able to see other failures in the apache logs that might help narrow it down, such as 400 or 500 series errors against the user, most likely 403 or something equivalent to that. Knowing the paths being accessed would be helpful, including having the full stack trace.

#3 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 01 March 2016 - 08:24 PM

Regarding your Swarm emails not being sent, please let us know the following:

a] What version of Swarm and the Perforce server are you using?

b] When did this behavior start happening? Have you tried restarting your web server?

c] Has anything been modified recently in your "mail" section in data/config.php?

d] Does the Swarm log show any email related errors?

See 'Email configuration'
https://www.perforce...dmin.email.html

I have seen this type of issue happen when the user was putting a line break between #review and @user. Having it on one line resolved the issue.

#4 Andrew DeFaria

Andrew DeFaria

    Advanced Member

  • Members
  • PipPipPip
  • 125 posts

Posted 01 March 2016 - 08:48 PM

I found that somehow our swarm-trigger.sh got modified and didn't have the SWARM_TOKEN, etc. Now some users get email but others don't. We now see the following in the log:

Next exception 'Zend\ServiceManager\Exception\ServiceNotCreatedException' with message 'An exception was raised while creating "p4_user"; no instance returned' in /opt/perforce/swarm/library/Zend/ServiceManager/ServiceManager.php:912
Stack trace:
#0 /opt/perforce/swarm/library/Zend/ServiceManager/ServiceManager.php(1037): Zend\ServiceManager\ServiceManager->createServiceViaCallback(Object(Closure), 'p4user', 'p4_user')
#1 /opt/perforce/swarm/library/Zend/ServiceManager/ServiceManager.php(609): Zend\ServiceManager\ServiceManager->createFromFactory('p4user', 'p4_user')
#2 /opt/perforce/swarm/library/Zend/ServiceManager/ServiceManager.php(569): Zend\ServiceManager\ServiceManager->doCreate('p4_user', 'p4user')
#3 /opt/perforce/swarm/library/Zend/ServiceManager/ServiceManager.php(503): Zend\ServiceManager\ServiceManager->create(Array)
#4 /opt/perforce/swarm/module/Users/src/Users/Authentication/BasicAuthListener.php(80): Zend\ServiceManager\ServiceManager->get('p4_user')
#5 [internal function]: Users\Authentication\BasicAuthListener->enforceBasicAuth(Object(Zend\Mvc\MvcEvent))
#6 /opt/perforce/swarm/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#7 /opt/perforce/swarm/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#8 /opt/perforce/swarm/library/Zend/Mvc/Controller/AbstractController.php(117): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#9 /opt/perforce/swarm/library/Zend/Mvc/DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#10 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#11 /opt/perforce/swarm/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#12 /opt/perforce/swarm/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#13 /opt/perforce/swarm/library/Zend/Mvc/Application.php(309): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#14 /opt/perforce/swarm/public/index.php(57): Zend\Mvc\Application->run()
#15 {main}

Ideas?

#5 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 01 March 2016 - 09:10 PM

Hi Andrew,

Thanks for the stack trace output and the update. We will take a look at it. Correcting the swarm token in the trigger has in the past solved the problem with #review in perforce changelists not getting detected/updated by swarm.

Have you confirmed that the users not receiving emails do not have a line break between #review and @user?

#6 clesemann

clesemann

    Advanced Member

  • Members
  • PipPip
  • 20 posts

Posted 01 March 2016 - 09:25 PM

Hi Andrew...with 2015.3+ you will have to upgrade to the perl trigger to ensure notifications continue to work properly. Having just dealt with a mountain of notifications issues, in all those cases users weren't using the perl trigger after an upgrade from 15.2 or previous.

Thankfully the trigger is well written and most of the parameters are exactly the same, but you can confirm by using the -o switch:

./swarm-trigger.pl -o

IF notifications are still not being sent after you upgrade the trigger, please send us a note at support@perforce.com, as it will probably require a bit more back and forth and adding some debugging statements and taking a peak at some keys.


View PostAndrew DeFaria, on 01 March 2016 - 08:48 PM, said:

I found that somehow our swarm-trigger.sh got modified and didn't have the SWARM_TOKEN, etc. Now some users get email but others don't. We now see the following in the log:

Next exception 'Zend\ServiceManager\Exception\ServiceNotCreatedException' with message 'An exception was raised while creating "p4_user"; no instance returned' in /opt/perforce/swarm/library/Zend/ServiceManager/ServiceManager.php:912
Stack trace:
#0 /opt/perforce/swarm/library/Zend/ServiceManager/ServiceManager.php(1037): Zend\ServiceManager\ServiceManager->createServiceViaCallback(Object(Closure), 'p4user', 'p4_user')
#1 /opt/perforce/swarm/library/Zend/ServiceManager/ServiceManager.php(609): Zend\ServiceManager\ServiceManager->createFromFactory('p4user', 'p4_user')
#2 /opt/perforce/swarm/library/Zend/ServiceManager/ServiceManager.php(569): Zend\ServiceManager\ServiceManager->doCreate('p4_user', 'p4user')
#3 /opt/perforce/swarm/library/Zend/ServiceManager/ServiceManager.php(503): Zend\ServiceManager\ServiceManager->create(Array)
#4 /opt/perforce/swarm/module/Users/src/Users/Authentication/BasicAuthListener.php(80): Zend\ServiceManager\ServiceManager->get('p4_user')
#5 [internal function]: Users\Authentication\BasicAuthListener->enforceBasicAuth(Object(Zend\Mvc\MvcEvent))
#6 /opt/perforce/swarm/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#7 /opt/perforce/swarm/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#8 /opt/perforce/swarm/library/Zend/Mvc/Controller/AbstractController.php(117): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#9 /opt/perforce/swarm/library/Zend/Mvc/DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#10 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#11 /opt/perforce/swarm/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#12 /opt/perforce/swarm/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#13 /opt/perforce/swarm/library/Zend/Mvc/Application.php(309): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#14 /opt/perforce/swarm/public/index.php(57): Zend\Mvc\Application->run()
#15 {main}

Ideas?

Chris Lesemann
Senior Technical Lead - Perforce
Electronic Arts Canada

#7 Andrew DeFaria

Andrew DeFaria

    Advanced Member

  • Members
  • PipPipPip
  • 125 posts

Posted 02 March 2016 - 06:57 AM

We also had an SMTP configuration error which was corrected. I've switched to the Perl triggers under your advice. We'll see how it goes. I think it'll be good but we have another issue here where people cannot create projects. I've checked the config and I think they should be. If that becomes a problem I'll post a different thread.



Also tagged with one or more of these keywords: swarm, review email

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users