ServiceControl Beta 7.15 RavenDB Error - Failed to execute indexing function on MessagesViewIndex - ravendb

Helpful information to include
Product name:
Version:
Stacktrace:
Description:
I just upgraded ServiceControl from Beta6 to Beta7.15 and I am getting the following error (see at the bottom of the is post) when I start the service and it just seems to hang there. Note that I deleted the previous database via the following script as outlined in the directions.
net stop "Particular ServiceControl"
RD C:\programdata\particular\ServiceControl\localhost-33333 /S
net start "Particular ServiceControl"
I also configured the ServiceControl config file using the following settings. I used the ServiceControl/Hostname and ServiceControl/ExposeRavenDB setting with Beta 6 with success. I just added ExpirationProcessTimerInSeconds and HoursToKeepMessagesBeforeExpiring using the instructions provided.
<add key="ServiceControl/Hostname" value="*" />
<add key="ServiceControl/ExposeRavenDB" value="true" />
<add key="ExpirationProcessTimerInSeconds" value="600" />
<add key="HoursToKeepMessagesBeforeExpiring" value="168" />
Any assistance you can provide would be greatly appreciated.
2014-03-28 15:49:13.5041|Warn|Raven.Database.Indexing.Index.Indexing|Failed to execute indexing function on MessagesViewIndex on FailedMessages/f027b8ef-2be5-7403-820f-4c358ddecba9
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Operator '!=' cannot be applied to operands of type 'string' and 'int'
at CallSite.Target(Closure , CallSite , Object , Int32 )
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at Index_MessagesViewIndex.<.ctor>b__5e(Object message)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at Raven.Database.Indexing.RobustEnumerator.MoveNext(IEnumerator en, StatefulEnumerableWrapper`1 innerEnumerator) in c:\Builds\RavenDB-Unstable-v2.5-New\Raven.Database\Indexing\RobustEnumerator.cs:line 91

Related

RTI DDS creating own data types

I am working on a .Net example where I define my own data type using RTI Connext DDS.
Instead of creating the application from the beginning, I got help from the source code of the hello_world_xml_dynamic example in rti_workspace directory. I have made several changes to the USER_QOS_PROFILES.xml file to create my own data type and changes its name to MY_PROFILES.xml
But when I compile the application and run it from the command line, I get the following error:
DDS_DomainParticipantFactory_create_participant_from_config_w_paramsI:ERROR: Profile library 'MyParticipantLibrary::PublicationParticipant' not found
! Unable to create DDS domain participant
The line of code that catching the error:
if (this.participant == null)
{
this.participant = DDS.DomainParticipantFactory.get_instance().
create_participant_from_config(
"MyParticipantLibrary::PublicationParticipant");
if (this.participant == null)
{
Console.Error.WriteLine("! Unable to create DDS domain participant");
return;
}
}
this is the configuration file MY_PROFILES.xml :
<!--
RTI Data Distribution Service Deployment
-->
<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/6.0.1/rti_dds_profiles.xsd">
<!-- Qos Library -->
<qos_library name="qosLibrary">
<qos_profile name="DefaultProfile">
</qos_profile>
</qos_library>
<!-- types -->
<types>
<struct name="FlightData">
<member name="Latitude" type="double"/>
<member name="Longitude" type="double"/>
<member name="Altitude" type="double"/>
</struct>
</types>
<!-- Domain Library -->
<domain_library name="MyDomainLibrary" >
<domain name="FlightDataDomain" domain_id="0">
<register_type name="FlightDataType"
type_ref="FlightData" />
<topic name="FlightDataTopic"
register_type_ref="FlightDataType">
<topic_qos name="FlightData_qos"
base_name="qosLibrary::DefaultProfile"/>
</topic>
</domain>
</domain_library>
<!-- Participant library -->
<domain_participant_library name="MyParticipantLibrary">
<domain_participant name="PublicationParticipant"
domain_ref="MyDomainLibrary::FlightDataDomain">
<publisher name="MyPublisher">
<data_writer name="FlightDataWriter"
topic_ref="FlightDataTopic"/>
</publisher>
</domain_participant>
<domain_participant name="SubscriptionParticipant"
domain_ref="MyDomainLibrary::FlightDataDomain">
<subscriber name="MySubscriber">
<data_reader name="FlightDataReader"
topic_ref="FlightDataTopic">
<datareader_qos name="FlightData_reader_qos"
base_name="qosLibrary::DefaultProfile"/>
</data_reader>
</subscriber>
</domain_participant>
</domain_participant_library>
</dds>
where am i making a mistake?
Your XML file looks correct. From the 'not found' error message, it seems that you may not have taken the right steps to instruct your application to load that profiles-file MY_PROFILES.xml to actually learn about your desired Participant. You can easily verify that this is the case by introducing an error in your XML file (for example by incorrectly renaming one tag) and rerun your application. If it does not complain about the syntax or schema of the XML, then your file did not get loaded and this hypothesis is correct.
If that turns out to be your problem indeed, then you have several options to fix that. They are listed in the User's Manual section 18.5 How to Load XML-Specified QoS Settings.

Specified cast is not valid using MVC4

I have the two following web.config file. The first one [1] is running smooth but when I replace it with the second [2] one it's give me and error. I'm using MVC 4.
[1] :
<add name="DBName" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\DBName.mdf;Integrated Security=True;User Instance=False"
providerName="System.Data.SqlClient"/>
[2]: When I replace the above with the below I got an error that says "Specified cast is not valid"
<add name="DBName" connectionString="Data Source=ServerName;Initial Catalog=DBName;User ID=Username;Password=Password;Connection Timeout=120"
providerName="System.Data.SqlClient" />
It's impossible to answer definitively with what you've provided, but that particular exception only occurs when a particular table column is of a type that cannot be cast to the type of the property that represents it. If this only happens when you switch between databases, then that means that your schemas of your two database do not match. Ensure that they both have exactly the same schemas, and you'll be fine.

TFS 2013 Build Cannot convert StringList to String[]

I added a new parameter and associated Metadata to the default TFS 2013 build definition.
<x:Property Name="ProjectFile" Type="InArgument(s:String[])" />
<mtbw:ProcessParameterMetadata Category="#600 Deployment" Description="The csproj file that will be used for deployment" DisplayName="Project to Deploy" Editor="Microsoft.TeamFoundation.Build.Controls.BuildProjectListEditor, Microsoft.TeamFoundation.Build.Controls" ParameterName="ProjectFile" />
Note that it is using the same editor as the ProjectsToBuild argument which also has a data type of string[]. However I get the following exception:
Cannot convert value '$/{...}.csproj' of type Microsoft.TeamFoundation.Build.Workflow.Activities.StringList to type System.String[].
Any ideas as to what I need to do differently?
You should change your property ("ProjectFile") to the type of Microsoft.TeamFoundation.Build.Workflow.Activities.StringList StringList.
I used the Reflector to check the type of BuildSettings.ProjectsToBuild and found that it uses the Microsoft.TeamFoundation.Build.Workflow.Activities.StringList StringList type.

SPWebConfigModification - Features over writing each other modification

I am using log4Net with share point 2010. I have a feature which automatically adds the log4net config when my soultion is deployed in Error mode using following code
SPWebService service = SPWebService.ContentService;
service.WebConfigModifications.Clear();
//ADD log4Net config section
service.WebConfigModifications.Add(new SPWebConfigModification()
{
Path = "configuration/configSections",
Name = "section[#name='log4net']",
Sequence = 0,
Owner = CREATE_NAME,
Type = SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode,
Value = string.Format(#"<section name='log4net' type='log4net.Config.Log4NetConfigurationSectionHandler, log4net, Version={0}, Culture=neutral, PublicKeyToken={1}' />", LOG4NET_VERSION, LOG4NET_PUBLIC_KEY_TOKEN)
});
string log4netConfig = #"<log4net>
<appender name='RollingFileAppender' type='log4net.Appender.RollingFileAppender'>
<file value='C:\\logs\\Logger.log' />
<appendToFile value='true' />
<rollingStyle value='Composite' />
<datePattern value='yyyyMMdd' />
<maxSizeRollBackups value='200' />
<maximumFileSize value='50MB' />
<layout type='log4net.Layout.PatternLayout'>
<conversionPattern value='%d [%t] %-5p %c [%x] <%X{auth}> - %m%n' />
</layout>
</appender>
<root>
<level value='ERROR' />
<appender-ref ref='RollingFileAppender' />
</root>
</log4net>";
//add error default config
service.WebConfigModifications.Add(new SPWebConfigModification()
{
Path = "configuration",
Name = "log4net",
Sequence = 0,
Owner = CREATE_NAME,
Type = SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode,
Value = log4netConfig
});
service.Update();
service.ApplyWebConfigModifications();
I wanted to create another feature which over writes Error mode of the log4net and change it to debug, so that the end user does not have to modifiy web config manually.
The problem is when the second feature is activated, it deletes everything added by the first feature.
Is this standard behaviour ?? Any feature that would activate would delete the changes by other feature.
EDIT 2
Steps to replicate
Create 2 feature. both of them should add some different entries in web config.
Activate feature 1 - Feature 1 changes are in web config
Activate feature 2 - Feature 2 changes are in web config but feature 1
changes are gone
Deactivate both the features
Activate feature 2 - Feature 2 changes are in web config
Activate feature 1 - Feature 1 changes are in web config but feature
2 changes are gone
The reason why the first web configuration is removed is because of the code block:
service.WebConfigModifications.Clear();
Basically you're saying that you will be clearing all other configurations set in your web config prior to adding the items in your feature. Removing the said code block should fix your issue.
If you need to do some other things when activating or deactivating a feature try using Feature Receivers. A good example to start with web configurations and feature receivers can be found here.
Also to give you more idea on the code block above is giving you problems you can check out the problem another guy which had the similar problem here.
if I understand this correctly, what's happening is you add a webconfigmodification, this isn't technically "added" yet as it is hasn't been implemented just yet. When you created the 2nd modification, it overwrites the first modification you created, which in turns, erases the first modification that was made, and this was the one that was applied.

CCNetModifyingUsers <user> value change after CCNET 1.6 to 1.8 upgrade

After upgrading one of our build servers to the latest version of CCNET it stopped sending emails to modifiers group. We've using Mercurial for source control and version 2.3.2 is installed on the build server.
buildmasters group still gets emails but not modifiers:
<email mailport="25" includeDetails="true" useSSL="false">
<from>buildslave8#company.com</from>
<mailhost>###.###.##.###</mailhost>
<users>
<user name="Name" group="buildmasters" address="name#company.com"/>
</users>
<groups>
<group name="buildmasters">
<notifications>
<NotificationType>Always</NotificationType>
</notifications>
</group>
</groups>
<converters>
<regexConverter find="$" replace="#company.com" />
</converters>
<modifierNotificationTypes>
<NotificationType>Always</NotificationType>
</modifierNotificationTypes>
<subjectSettings>
<subject buildResult="Success" value="Build Status - SUCCESSFUL - ${CCNetProject} - ${CCNetLabel}" />
<subject buildResult="Fixed" value="Build Status - HAS BEEN FIXED - ${CCNetProject} - ${CCNetLabel}" />
<subject buildResult="StillBroken" value="Build Status - FAILED - ${CCNetProject}" />
<subject buildResult="Broken" value="Build Status - FAILED - ${CCNetProject}" />
<subject buildResult="Exception" value="Build Status - SERVER EXCEPTION - ${CCNetProject} - a serious error has occurred" />
</subjectSettings>
<attachments></attachments>
After digging through the build logs I noticed that <user> value under <CCNetModifyingUsers> has changed as follows:
From (CCNET 1.6):
<integrationProperties>
...
<CCNetModifyingUsers>
<user>flast</user>
<user>flast</user>
</CCNetModifyingUsers>
...
</integrationProperties>
To (CCNET 1.8):
<integrationProperties>
...
<CCNetModifyingUsers>
<user>First Last</user>
<user>First Last</user>
</CCNetModifyingUsers>
...
</integrationProperties>
Not sure how the <user> value under <CCNetModifyingUsers> gets populated or how to fix it.
UPDATE #1: I'm trying to see if changing the <converter> to ldapConverter will resolve my issues.
UPDATE #2: Still trying to mess with the ldapConverter:
<ldapConverter domainName="Name.corp" ldapLogOnUser="name" ldapLogOnPassword="pswd" />
This version throws and exception:
EmailPublisher exception: System.FormatException: The specified string is not in the form required for an e-mail address.
at System.Net.Mime.MailBnfHelper.ReadMailAddress(String data, Int32& offset, String& displayName)
at System.Net.Mail.MailAddressCollection.ParseValue(String addresses)
at ThoughtWorks.CruiseControl.Core.Publishers.EmailPublisher.GetMailMessage(String from, String to, String replyto, String subject, String messageText, String workingFolder, String[] attachments)
at ThoughtWorks.CruiseControl.Core.Publishers.EmailPublisher.SendMessage(String from, String to, String replyto, String subject, String message, String workingFolder)
While this:
<ldapConverter domainName="Name.corp" ldapLogOnUser="name" ldapLogOnPassword="pswd" ldapQueryField="userPrincipalName"/>
Successfully builds, but does not send emails out to the modifiers.
UPDATE #3:
I've put the following temporary fix in place:
<converters>
<regexConverter find="(?!^.?).(?!.{0}$).* " replace="" />
<regexConverter find="$" replace="#company.com" />
</converters>
It however does not cover the following cases:
people's Mercurial username does not match their email address' name
people who have a double (triple?) first or last names
UPDATE #4:
Will have to go through the source code to see if I can track down exactly what's causing the issues... might have to maintain a local build of it going forward.
I dealt with this in November of 2013. I had to install the CCNET source code and modify EmailLDAPConverter.cs. The Convert method creates a search filter using the SSAMAccountName Active Directory attribute. This would fail. I ended up filtering on the Active Directory "displayName" attribute.