Email notification

If you are having a problem using Vault, post a message here.
Post Reply
AnywareVideo
Posts: 7
Joined: Mon Jan 18, 2016 7:59 am

Email notification

Post by AnywareVideo » Mon Jan 18, 2016 8:18 am

Hello,

We've just switched our Vault Professional server and now we are not able to receive the notifications after a developper's action.

We've installed the same version of the server (6.1.0.30531) and we've setup the notifications as it was on our previous server. I've followed this http://support.sourcegear.com/viewtopic ... 13&t=21758 to verify our settings. The "Test settings..." works fine and I'm correctly receiving the test email.

I would have a look on the log file, but there was no SGVaultNotify folder in C:\Windows\Temp\.

Best regards,

Nicolas - Anyware Video

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Email notification

Post by Beth » Mon Jan 18, 2016 9:26 am

Log into your Vault admin web page and click on the Logging link. What path is listed for the logs? Go to that path and find sgvault/sgvault.log. In that log it may list errors when trying to connect to the notify service. What errors are there?

If the log path doesn't go to C:\Windows\temp, then check the new path for the sgvaultnotify folder.
Beth Kieler
SourceGear Technical Support

AnywareVideo
Posts: 7
Joined: Mon Jan 18, 2016 7:59 am

Re: Email notification

Post by AnywareVideo » Tue Jan 19, 2016 4:19 am

Hi,

The log files patch is the default one so C:\Windows\temp\sgvault.

We get this error (sorry this is in french):

Code: Select all

----19/01/2016 11:08:54      --()--	The Plugin at https://localhost:7639/VaultService/VaultNotifyService/VaultNotifyService.asmx was not called with Event Login.  Exception: Le client a trouvé 'text/html; charset=utf-8' comme type de contenu de la réponse, alors qu'il attendait 'text/xml'.
La demande a échoué avec le message d'erreur :
--
<!DOCTYPE html>
<html>
    <head>
        <title>Erreur de configuration</title>
        <meta name="viewport" content="width=device-width" />
        <style>
         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
         pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}
         .marker {font-weight: bold; color: black;text-decoration: none;}
         .version {color: gray;}
         .error {margin-bottom: 10px;}
         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
         @media screen and (max-width: 639px) {
          pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }
         }
         @media screen and (max-width: 479px) {
          pre { width: 280px; }
         }
        </style>
    </head>

    <body bgcolor="white">

            <span><H1>Erreur du serveur dans l'application '/VaultService'.<hr width=100% size=1 color=silver></H1>

            <h2> <i>Erreur de configuration</i> </h2></span>

            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

            <b> Description : </b>Une erreur s'est produite lors du traitement d'un fichier de configuration requis pour répondre à cette demande. Veuillez consulter ci-dessous les détails relatifs à l'erreur en question, puis modifier votre fichier de configuration de manière appropriée.
            <br><br>

            <b> Message d'erreur de l'analyseur: </b>L'utilisation d'une section inscrite comme allowDefinition='MachineToApplication' au-delà du niveau d'application est une erreur. Cette erreur peut provenir d'un répertoire virtuel non configuré en tant qu'application dans IIS.<br><br>

            <b>Erreur source:</b> <br><br>

            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code><pre>

Ligne 120 :      ASP.NET to identify an incoming user. 
Ligne 121 :    -->
<font color=red>Ligne 122 :    <authentication mode="None" />
</font>Ligne 123 :
Ligne 124 :    <!--</pre></code>

                  </td>
               </tr>
            </table>

            <br>

            <b> Fichier source : </b> C:\inetpub\wwwroot\VaultService\vaultnotifyservice\web.config<b>    Ligne : </b> 122
            <br><br>

            <hr width=100% size=1 color=silver>

            <b>Informations sur la version :</b> Version Microsoft .NET Framework :4.0.30319; Version ASP.NET :4.0.30319.34280

            </font>

    </body>
</html>
<!-- 
[ConfigurationErrorsException]: L'utilisation d'une section inscrite comme allowDefinition='MachineToApplication' au-delà du niveau d'application est une erreur. Cette erreur peut provenir d'un répertoire virtuel non configuré en tant qu'application dans IIS. (C:\inetpub\wwwroot\VaultService\vaultnotifyservice\web.config line 122)
   à System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
   à System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
   à System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
   à System.Web.Configuration.RuntimeConfig.GetSectionObject(String sectionName)
   à System.Web.Configuration.RuntimeConfig.GetSection(String sectionName, Type type, ResultsIndex index)
   à System.Web.Configuration.RuntimeConfig.get_CustomErrors()
   à System.Web.Configuration.CustomErrorsSection.GetSettings(HttpContext context, Boolean canThrow)
   à System.Web.HttpResponse.ReportRuntimeError(Exception e, Boolean canThrow, Boolean localExecute)
   à System.Web.HttpContext.ReportRuntimeErrorIfExists(RequestNotificationStatus& status)
-->
Hereunder is the list of the pluigins.

Image

I've changed the plugins configuration because all the urls were with "http", so I've just change http by https. The rest of the configuration is the default one.

Thanks for your help.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Email notification

Post by Beth » Tue Jan 19, 2016 4:16 pm

You don't need so many there. Delete all but 4. The 4 you keep should look like:

For Source Code Control
http://<your Vault server>/VaultIndexService/VaultIndexService.asmx
http://<your Vault server>/VaultNotifyService/VaultNotifyService.asmx
http://<your Vault server>/VaultShadowFolder/VaultShadowFolder.asmx

For Work Item Tracking
http://<your Vault server>/VaultNotifyService/VaultNotifyService.asmx

Replace <your Vault server> with either localhost:7639 or 127.0.0.1:7639. Then just test those 4. If those work, you are done with the plugins.
Beth Kieler
SourceGear Technical Support

AnywareVideo
Posts: 7
Joined: Mon Jan 18, 2016 7:59 am

Re: Email notification

Post by AnywareVideo » Wed Jan 20, 2016 5:21 am

Hello,

Thanks for your advice but it is still not working.

Hereunder is the content of the notify log file:

Code: Select all

20/01/2016 11:44:01 <generic>: URL is: http://127.0.0.1/VaultService/VaultService.asmx
Security token is: a3bfbed1-c3a6-4b7b-a431-a2f4690b59e7
RepID is: 18
Prev TxID is: 1813149
Curr TxID is: 1813150

20/01/2016 11:45:30 <generic>: Could not retrieve the repository delta from the configured Vault server, http://127.0.0.1/VaultService/VaultService.asmx. [System.Net.Sockets.SocketException (0x80004005): Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée 127.0.0.1:80
   à System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   à System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)] Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée 127.0.0.1:80
   à System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   à System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
[System.Net.WebException: Impossible de se connecter au serveur distant ---> System.Net.Sockets.SocketException: Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée 127.0.0.1:80
   à System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   à System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- Fin de la trace de la pile d'exception interne ---
   à System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   à System.Net.HttpWebRequest.GetRequestStream()
   à System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   à VaultClientNetLib.ClientService.VaultService.GetRepositoryStructureDelta(Guid guidSecurityToken, Int32 nRepID, Int64 nBaseRevision, Int64 nTargetRevision, VaultRepositoryDelta& rd)
   à VaultNotifyService.VaultNotifyManager.GetRepositoryDelta(Guid guidSecurityToken, VaultTriggerEventEndTx vteEndTx, VaultRepositoryDelta& rd)] Impossible de se connecter au serveur distant
   à System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   à System.Net.HttpWebRequest.GetRequestStream()
   à System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   à VaultClientNetLib.ClientService.VaultService.GetRepositoryStructureDelta(Guid guidSecurityToken, Int32 nRepID, Int64 nBaseRevision, Int64 nTargetRevision, VaultRepositoryDelta& rd)
   à VaultNotifyService.VaultNotifyManager.GetRepositoryDelta(Guid guidSecurityToken, VaultTriggerEventEndTx vteEndTx, VaultRepositoryDelta& rd)

20/01/2016 11:45:30 <generic>: URL is: http://127.0.0.1/VaultService/VaultService.asmx
Security token is: a3bfbed1-c3a6-4b7b-a431-a2f4690b59e7
RepID is: 18
Prev TxID is: 1813150
Curr TxID is: 1813151
Hereunder the plugin list. I've also test with "https" instead of "http" because our VaultPortal is using "https".
Image

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Email notification

Post by jclausius » Wed Jan 20, 2016 4:00 pm

Do you see the magnifying glass for 'Test' in the list?

If you click on the image, it should launch a page which goes to the Plugin's Service page. Can you check the URL if it is correct? I'm assuming the SSL certificate is using a hostname, so the loopback of 127.0.0.1 is probably causing a SSL certificate issue.

Also, is it safe to assume 7639 is bound to HTTPS in IIS, The default for HTTPS is 433.


In any case, you want the plugin URLs to work correctly, so disable any Plugins with invalid URLs in order to clear any problems on the Vault Server.
Jeff Clausius
SourceGear

AnywareVideo
Posts: 7
Joined: Mon Jan 18, 2016 7:59 am

Re: Email notification

Post by AnywareVideo » Fri Jan 22, 2016 2:33 am

Hello,

With "https://localhost.." the test was unsuccessfull because of a certificat error.
I've switched localhost by the hostname. Now the test is successfull --> I get the webpage with all the web service calls.

Our previous server was using 7639 as port for HTTPS and it worked well.

I think we are making progress because, now, I get this information in the VaultNotifyService log file:
22/01/2016 09:10:47 <generic>: SourceGear Notification Service started.
But we still do not receive the notifications.

Thanks

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Email notification

Post by jclausius » Fri Jan 22, 2016 9:19 am

If the plugin-url is correct, then any kind of login or transaction should cause the Vault Server to trigger the Notification Server to check for emails.

The first thing to check is the Notification Server's info for the Vault Server. Within the Notification Server's installation, will be a web.config directory with a "vault_server" xml entry. Verify the URL there is correct, and if not edit the file. Save your changes. Note, the return Vault Server URL is important to configure correctly, and the same thing applies to the Vault Index Server's installation if you are planning to use Find in Files.

After that, can you check the Vault Server's Email Settings using the Web Admin Tool. There is a 'Test Settings' button there to make sure email is working correctly.

Does everything there look OK?

Finally, once this is sorted out and the Notification Server is started, check the notification log file which by default is in %windir%\temp\SGVaultNotify\ . Are there now any errors found in the log?
Jeff Clausius
SourceGear

AnywareVideo
Posts: 7
Joined: Mon Jan 18, 2016 7:59 am

Re: Email notification

Post by AnywareVideo » Mon Jan 25, 2016 3:27 am

Hello,

Thanks for your help.

The vault_server URL was set to http://127.0.0.1/. I've changed to https://VAULT:7639, now it works.

The ticket can be closed.

Nicolas - Anyware Video

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Email notification

Post by jclausius » Mon Jan 25, 2016 9:39 am

Glad to see you're up and running

F:17041
Jeff Clausius
SourceGear

Post Reply