Open vcmgc27 opened 7 years ago
Please provide the command line(s) you are using to invoke the email notifier, and your config file. If you modified EmailNotifier.sh, please also provide your modified EmailNotifier.sh. That information should help me see what's going on. -- Steve
Hello Steve,
I have added the below command lines into "EmailNotifier.sh" file based on my understanding from Readme file in Email Notifier package.
-projectName[project name] -config[Email_Notifier/properties/config.properties]
-template[Email_Notifier/properties/email.xml]
I have removed the server and login details from config.properties as it is a secured server.
If i'm not correct in configuring this. Please let me know the steps to configure it from first.
Thanks for your help. VCMGC
Hi VCMGC:
Are you using version 2.0.0 (notifiers-2.0.0.zip)? The project name argument is actually -protexProjectName. The standard way to run it is:
(There isn't any need to edit EmailNotifier.sh.)
Using this approach with version 2.0.0 should avoid the error you are seeing. Best regards, Steve
Hello Steve,
Thanks for your help.
I ran the above steps with my project details. Please confirm the commands used properly or not.
Thanks for your help. VCMGC
Hello Steve, When using the above configuration, I'm getting the below error: /bin/sh: /Email_Notifier/bin/EmailNotifier.sh -PRPC_Master(Bamboo) -config: No such file or directory
I'm trying to add this plugin into Bamboo and execute as a part of Build plan task. When trying it, getting the above error.
Thanks, VCMGC
Hi VCMGC,
The error says there is no file with the path "/Email_Notifier/bin/EmailNotifier.sh". Is that the correct path to that file on the Bamboo server?
The error also seems to indicate that the "projectName" was omitted.
Before you try to run EmailNotifier.sh from Bamboo, I recommend you first make sure you can run it directly from a bash command line. Once you have it working, then you can execute the same commands from Bamboo.
If you are still having trouble, please do the following:
Best regards, Steve
Hello Steve,
Your suggestions help a lot.
I ran the script as u mentioned above. But no email triggered.
Please find below log for information.
[bamboo@srulesre2 bin]$ ./EmailNotifier.sh -protexProjectName "PRPC_Master(Bamboo)" -config ../properties/config_email.properties -template ../properties/success-template.xml Email Notifier for Black Duck Suite 2016-11-28 07:30:15,105 INFO (main) [java.lang.Class] - Project name: PRPC_Master(Bamboo) 2016-11-28 07:30:15,106 INFO (main) [java.lang.Class] - Config file location: ../properties/config_email.properties 2016-11-28 07:30:15,106 INFO (main) [java.lang.Class] - Template file location: ../properties/success-template.xml 2016-11-28 07:30:15,138 INFO (main) [net.jmatrix.eproperties.EProperties] - Loading EProperties version 1.1.0 2016-11-28 07:30:15,197 INFO (main) [com.blackducksoftware.tools.commonframework.core.config.ConfigurationFile] - Updating configuration file /usr/local/bamboo/bamboo-agent-home-3/xml-data/build-dir/BUILD-PHBT-JOB1/MailConfig/Email_Notifier/bin/../properties/config_email.properties; encrypting passwords and adjusting password properties. 2016-11-28 07:30:15,456 INFO (main) [com.blackducksoftware.tools.notifiers.email.EmailNotifierUtilityConfig] - [Optional] property: server.list.location, is missing or blank 2016-11-28 07:30:15,457 INFO (main) [com.blackducksoftware.tools.notifiers.email.EmailNotifierUtilityConfig] - [Optional] property: proxy.server, is missing or blank 2016-11-28 07:30:15,457 INFO (main) [com.blackducksoftware.tools.notifiers.email.EmailNotifierUtilityConfig] - [Optional] property: proxy.port, is missing or blank 2016-11-28 07:30:15,458 INFO (main) [com.blackducksoftware.tools.notifiers.email.EmailNotifierUtilityConfig] - [Optional] property: proxy.https.server, is missing or blank 2016-11-28 07:30:15,458 INFO (main) [com.blackducksoftware.tools.notifiers.email.EmailNotifierUtilityConfig] - [Optional] property: proxy.https.port, is missing or blank 2016-11-28 07:30:15,458 WARN (main) [com.blackducksoftware.tools.notifiers.email.EmailNotifierUtilityConfig] - Server List location property exists, but empty 2016-11-28 07:30:15,458 INFO (main) [com.blackducksoftware.tools.notifiers.email.EmailNotifierUtilityConfig] - [Optional] property: protex.sdk.timeout, is missing or blank 2016-11-28 07:30:15,459 INFO (main) [EmailNotifierUtilityConfig] - Showing file paths: false 2016-11-28 07:30:15,459 INFO (main) [EmailNotifierUtilityConfig] - File path max count: 10 Proxy initialized - SDK version 7.0 2016-11-28 07:30:15,521 INFO (main) [com.blackducksoftware.tools.commonframework.connector.protex.ProtexAPIWrapper] - User Info: XX@xx.com 2016-11-28 07:30:15,888 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.com:sdk:v7.0:user}UserApiService from class com.blackducksoftware.sdk.protex.user.UserApi 2016-11-28 07:30:17,763 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.com:sdk:v7.0:bom}BomApiService from class com.blackducksoftware.sdk.protex.project.bom.BomApi 2016-11-28 07:30:18,105 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.com:sdk:v7.0:codetree}CodeTreeApiService from class com.blackducksoftware.sdk.protex.project.codetree.CodeTreeApi 2016-11-28 07:30:18,296 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.com:sdk:v7.0:component}ComponentApiService from class com.blackducksoftware.sdk.protex.component.ComponentApi 2016-11-28 07:30:18,543 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.com:sdk:v7.0:identification}IdentificationApiService from class com.blackducksoftware.sdk.protex.project.codetree.identification.IdentificationApi 2016-11-28 07:30:18,827 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.com:sdk:v7.0:project}ProjectApiService from class com.blackducksoftware.sdk.protex.project.ProjectApi 2016-11-28 07:30:19,552 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.com:sdk:v7.0:discovery}DiscoveryApiService from class com.blackducksoftware.sdk.protex.project.codetree.discovery.DiscoveryApi 2016-11-28 07:30:19,795 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.com:sdk:v7.0:report}ReportApiService from class com.blackducksoftware.sdk.protex.report.ReportApi 2016-11-28 07:30:19,920 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.com:sdk:v7.0:license}LicenseApiService from class com.blackducksoftware.sdk.protex.license.LicenseApi 2016-11-28 07:30:20,099 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.com:sdk:v7.0:policy}PolicyApiService from class com.blackducksoftware.sdk.protex.policy.PolicyApi 2016-11-28 07:30:20,491 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.com:sdk:v7.0:localcomponent}LocalComponentApiService from class com.blackducksoftware.sdk.protex.project.localcomponent.LocalComponentApi 2016-11-28 07:30:20,588 INFO (main) [NotifierProcessor] - Checking pending counts for project: PRPC_Master(Bamboo) 2016-11-28 07:30:20,921 INFO (main) [NotifierProcessor] - Project exists, last analyzed: 11/28/2016 2016-11-28 07:30:20,923 INFO (main) [ProtexInformationCollector] - Build URL for protex project: http://*******//protex/ProtexIPIdentifyFolderBillOfMaterialsContainer?isAtTop=true&ProtexIPProjectId=c_prpc_masterbamboo_5003&ProtexIPIdentifyFileViewLevel=folder&ProtexIPIdentifyFileId=-1 2016-11-28 07:30:20,923 INFO (main) [ProtexInformationCollector] - START Gathering pending ID information for: PRPC_Master(Bamboo) 2016-11-28 07:30:21,119 INFO (main) [ProtexInformationCollector] - DONE gathering pending ID information, total: 0 2016-11-28 07:30:21,119 INFO (main) [ProtexInformationCollector] - START Gathering BOM components for: PRPC_Master(Bamboo) 2016-11-28 07:30:21,247 INFO (main) [ProtexInformationCollector] - DONE Gathering BOM components for: PRPC_Master(Bamboo) 2016-11-28 07:30:21,247 INFO (main) [ProtexInformationCollector] - START Gathering BOM components for: PRPC_Master(Bamboo) 2016-11-28 07:30:21,247 INFO (main) [ProtexInformationCollector] - DONE Gathering BOM components for: PRPC_Master(Bamboo) 2016-11-28 07:30:21,248 INFO (main) [NotifierProcessor] - DONE collecting content from Protex. 2016-11-28 07:30:21,248 INFO (main) [com.blackducksoftware.tools.commonframework.standard.email.CFEmailNotifier] - Trigger rules were created, but none triggered - no email[s] sent. 2016-11-28 07:30:21,249 INFO (main) [EmailHandler] - All Email processing completed 2016-11-28 07:30:21,249 INFO (main) [NotifierProcessor] - Finished general processing. 2016-11-28 07:30:21,249 INFO (main) [java.lang.Class] - Exiting.
Please let me know any changes need to be done further.
Thanks for your help, VCMGC
Hi VCMGC:
The message "Trigger rules were created, but none triggered - no email[s] sent." indicates that none of the conditions for which you configured trigger rules (the value of the email.trigger.rules property) were true on that Protex project.
For example, to generate an email you could set: email.trigger.rules=PENDING and then make sure the Protex project has one or more Pending IDs (one or more "IDs Required").
If you want additional input, please provide me with the contents of your configuration file.
Steve
Hello Steve,
I posted a comment 2 days before. But it didn't reflected here. Sorry for that.
Please find the configuration file details below.
protex.server.name=http://*****/
protex.user.name=**@.com protex.password=*****
email.smtp.address=xxx.yyyy.com email.smtp.from=cgcg@xyxy.com email.smtp.to=cgcg@xyxy.com
notifier.show.filepaths=false notifier.show.filepaths.maxcount=10
email.trigger.rules=PENDING
Please let me know what I can do to make it work
Thanks for your help.
Hi VCMG,
The output you are getting indicates that the Protex Project "PRPC_Master(Bamboo)" has no files in the "pending identification" state. If no files are pending identification, it is correct for the utility to generate no email.
In Protex, from the dashboard, click on your project name. Then click on the Components tab. Then click on Identify: It will show you how many files are Pending Identification. (In the classic view: Identify tab: Project Status will tell you how many files are Pending Identification.) If you need help determining whether your Protex project has Pending IDs, Black Duck Technical Support can help with that.
Best regards, Steve
Hello Steve,
Thanks for your help.
Please find the attachment for pending file details. the Protex Project "PRPC_Master(Bamboo)" has 386 pending ID's. Even then no mail has been triggered. BOM also has 2 components in it. Please look into this attachment and help me in resolving this issue also let me know is there any problem with config file above.
Thanks for your help.
Hi VCMGC:
I have been able to reproduce the problem here running against Protex 7.4.1. The problem does not occur running against Protex 7.3, so it appears to be a relatively new bug in the Protex SDK causing CodeTreeHelper.getTotalPendingIDCount() to return 0 when it should return >0. I have filed a bug report for it: PROTEX-22296.
You can see the problem in the log message: 2016-11-28 07:30:21,119 INFO (main) [ProtexInformationCollector] - DONE gathering pending ID information, total: 0
This value (0) is the value returned by CodeTreeHelper.getTotalPendingIDCount(), and 0 is incorrect for your project. That 0 value causes the notifier utility to believe there are no pending IDs, so it generates no email.
What version of Protex are you using? Steve
Hi Steve,
I'm using Protex 7.4.1. Will this issue be resolved by Black Duck or you will update the plugin. Because we rely on this plugin a lot. If possible, can you suggest me any other way to get email notifications.
Thanks, VCMGC
Hi VCMGC:
Unfortunately I don't know of another way to get email notifications. You may want to explore the topic with your Black Duck Customer Success Manager, since finding creative solutions to problems like this is their specialty.
If you can tell me what company you are with, I can find out who your Customer Success Manager is.
Sorry for the inconvenience. Steve
The underlying SDK bug appears to be PROTEX-22283
Hello Ken,
Is this bug is fixed?. or if any other workaround available, please let us know. We depend on this plugin,as we proposed this to be in our release pipeline.
Thanks, VCMGC
No, these bugs were only just created in the past few days. No, there is no workaround.
KenS
`Thanks Ken, Any idea on this, what we can do next?
Hello Ken,
Possibly, when can we expect this fix in SDk, so that we can use this email notifier to complete our requirement.
Thanks, VCMGC
Protex 7.5 is expected by the end of the week. The underlying bug is fixed in it.
Thanks Ken. Awaiting for the release. It will help us a lot...
The online release of 7.5 was announced today. So, it should be available on your server for download in the next day.
Ken Smith Principal Technical Support Engineer
Hello Ken,
Getting this error and Email not generated. Guess the issue is still exist in SDK. Project to which we are trying to trigger mail has 388 pending ID's. But according to the below log it says
2016-12-20 00:24:50,982 INFO (main) [ProtexInformationCollector] - START Gathering pending ID information for: EmailNotifier 2016-12-20 00:24:51,097 INFO (main) [ProtexInformationCollector] - DONE gathering pending ID information, total: 0
Please look into this and let us know, what we can do on this issue.
[chakg@srulesre2 bin]$ EmailNotifier.sh -protexProjectName "EmailNotifier" -config ../properties/config_email.properties -template ../properties/succ ess-template.xml Email Notifier for Black Duck Suite 2016-12-20 00:24:45,913 INFO (main) [java.lang.Class] - Project name: EmailNotifier 2016-12-20 00:24:45,914 INFO (main) [java.lang.Class] - Config file location: ../properties/config_email.properties 2016-12-20 00:24:45,914 INFO (main) [java.lang.Class] - Template file location: ../properties/success-template.xml 2016-12-20 00:24:45,946 INFO (main) [net.jmatrix.eproperties.EProperties] - Loading EProperties version 1.1.0 2016-12-20 00:24:45,983 INFO (main) [com.blackducksoftware.tools.commonframework.core.config.ConfigurationFile] - Updating configuration file /home/c hakg/Email_Notifier/bin/../properties/config_email.properties; encrypting passwords and adjusting password properties. 2016-12-20 00:24:46,205 INFO (main) [com.blackducksoftware.tools.notifiers.email.EmailNotifierUtilityConfig] - [Optional] property: server.list.locat ion, is missing or blank 2016-12-20 00:24:46,207 INFO (main) [com.blackducksoftware.tools.notifiers.email.EmailNotifierUtilityConfig] - [Optional] property: proxy.server, is missing or blank 2016-12-20 00:24:46,207 INFO (main) [com.blackducksoftware.tools.notifiers.email.EmailNotifierUtilityConfig] - [Optional] property: proxy.port, is mi ssing or blank 2016-12-20 00:24:46,207 INFO (main) [com.blackducksoftware.tools.notifiers.email.EmailNotifierUtilityConfig] - [Optional] property: proxy.https.serve r, is missing or blank 2016-12-20 00:24:46,207 INFO (main) [com.blackducksoftware.tools.notifiers.email.EmailNotifierUtilityConfig] - [Optional] property: proxy.https.port, is missing or blank 2016-12-20 00:24:46,207 WARN (main) [com.blackducksoftware.tools.notifiers.email.EmailNotifierUtilityConfig] - Server List location property exists, but empty 2016-12-20 00:24:46,207 INFO (main) [com.blackducksoftware.tools.notifiers.email.EmailNotifierUtilityConfig] - [Optional] property: protex.sdk.timeou t, is missing or blank 2016-12-20 00:24:46,208 INFO (main) [EmailNotifierUtilityConfig] - Showing file paths: false 2016-12-20 00:24:46,208 INFO (main) [EmailNotifierUtilityConfig] - File path max count: 10 Proxy initialized - SDK version 7.0 2016-12-20 00:24:46,285 INFO (main) [com.blackducksoftware.tools.commonframework.connector.protex.ProtexAPIWrapper] - User Info: Gowtham.Chakkarapani @in.pega.com 2016-12-20 00:24:46,642 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.co m:sdk:v7.0:user}UserApiService from class com.blackducksoftware.sdk.protex.user.UserApi 2016-12-20 00:24:48,056 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.co m:sdk:v7.0:bom}BomApiService from class com.blackducksoftware.sdk.protex.project.bom.BomApi 2016-12-20 00:24:48,393 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.co m:sdk:v7.0:codetree}CodeTreeApiService from class com.blackducksoftware.sdk.protex.project.codetree.CodeTreeApi 2016-12-20 00:24:48,580 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.co m:sdk:v7.0:component}ComponentApiService from class com.blackducksoftware.sdk.protex.component.ComponentApi 2016-12-20 00:24:48,824 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.co m:sdk:v7.0:identification}IdentificationApiService from class com.blackducksoftware.sdk.protex.project.codetree.identification.IdentificationApi 2016-12-20 00:24:49,105 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.co m:sdk:v7.0:project}ProjectApiService from class com.blackducksoftware.sdk.protex.project.ProjectApi 2016-12-20 00:24:49,717 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.co m:sdk:v7.0:discovery}DiscoveryApiService from class com.blackducksoftware.sdk.protex.project.codetree.discovery.DiscoveryApi 2016-12-20 00:24:49,958 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.co m:sdk:v7.0:report}ReportApiService from class com.blackducksoftware.sdk.protex.report.ReportApi 2016-12-20 00:24:50,080 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.co m:sdk:v7.0:license}LicenseApiService from class com.blackducksoftware.sdk.protex.license.LicenseApi 2016-12-20 00:24:50,256 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.co m:sdk:v7.0:policy}PolicyApiService from class com.blackducksoftware.sdk.protex.policy.PolicyApi 2016-12-20 00:24:50,637 INFO (main) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating Service {urn:protex.blackducksoftware.co m:sdk:v7.0:localcomponent}LocalComponentApiService from class com.blackducksoftware.sdk.protex.project.localcomponent.LocalComponentApi 2016-12-20 00:24:50,732 INFO (main) [NotifierProcessor] - Checking pending counts for project: EmailNotifier 2016-12-20 00:24:50,980 INFO (main) [NotifierProcessor] - Project exists, last analyzed: 12/20/2016 2016-12-20 00:24:50,982 INFO (main) [ProtexInformationCollector] - Build URL for protex project: http://sengbd01//protex/ProtexIPIdentifyFolderBillOf MaterialsContainer?isAtTop=true&ProtexIPProjectId=c_emailnotifier_5107&ProtexIPIdentifyFileViewLevel=folder&ProtexIPIdentifyFileId=-1 2016-12-20 00:24:50,982 INFO (main) [ProtexInformationCollector] - START Gathering pending ID information for: EmailNotifier 2016-12-20 00:24:51,097 INFO (main) [ProtexInformationCollector] - DONE gathering pending ID information, total: 0 2016-12-20 00:24:51,098 INFO (main) [ProtexInformationCollector] - START Gathering BOM components for: EmailNotifier 2016-12-20 00:24:51,199 INFO (main) [ProtexInformationCollector] - DONE Gathering BOM components for: EmailNotifier 2016-12-20 00:24:51,199 INFO (main) [ProtexInformationCollector] - START Gathering BOM components for: EmailNotifier 2016-12-20 00:24:51,199 INFO (main) [ProtexInformationCollector] - DONE Gathering BOM components for: EmailNotifier 2016-12-20 00:24:51,199 INFO (main) [NotifierProcessor] - DONE collecting content from Protex. 2016-12-20 00:24:51,200 INFO (main) [com.blackducksoftware.tools.commonframework.standard.email.CFEmailNotifier] - Trigger rules were created, but no ne triggered - no email[s] sent. 2016-12-20 00:24:51,200 INFO (main) [EmailHandler] - All Email processing completed 2016-12-20 00:24:51,200 INFO (main) [NotifierProcessor] - Finished general processing. 2016-12-20 00:24:51,200 INFO (main) [java.lang.Class] - Exiting.
Thanks, VCMGC
Hello Ken/Steve,
We tested after latest upgrade of Protex server. We were able to generate the mail. But there is an issue in getting the Pending files count. Please find below the log.
2016-12-26 08:51:53,798 INFO (main) [ProtexInformationCollector] - START Gathering pending ID information for: EmailNotifier 2016-12-26 08:51:53,888 INFO (main) [ProtexInformationCollector] - DONE gathering pending ID information, total: 0
Please let us know, if there is a code change in Protex SDK for fetching Pendig ID information. Which should be changed in this plugin?
Thanks, VCMGC
Hello Steve,
I'm not able to find this class: CodeTreeHelper.getTotalPendingIDCount() in SDK. Please make sure any changes made to this class. The default success-template.xml return "0" for Total Pending ID's.
I tried searching to figure out any changes made to this. But I got this information from SDK release notes. CodeTreeApi.getCodeTreeNodes now correctly populates discovery and pending ID node counts for folders.
Please help us in resolving this issue.
Thanks for your help, VCMGC
Hello Steve,
I'm trying to use Email Notifier plugin to auto generate mails. I configured this in Bamboo as a task. When executing this task. I'm getting below error.
22-Nov-2016 04:24:23 Email Notifier for Black Duck Suite 22-Nov-2016 04:24:23 2016-11-22 04:24:23,657 ERROR (main) [java.lang.Class] - Unable to parse command line arguments 22-Nov-2016 04:24:23 usage: Email Notifier 22-Nov-2016 04:24:23 -config Location of configuration file (required)
22-Nov-2016 04:24:23 -h,--help show help.
22-Nov-2016 04:24:23 -projectName Name of Project (required)
22-Nov-2016 04:24:23 -template Location of email template file (optional)
I have added the project name, location of email template and location of config.properties in EmailNotifier.sh file. Then also, im getting the above error.
Please let me know, my configuration is right and if its wrong, let me know the proper configuration to use it.
Thanks for your help. VCMGC