Projection goes into a faulted state instantly.

As soon as I try to create a projection I get into a faulted state with this message.

Exception has been thrown by the target of an invocation.

Looking at the logs I see this

[PID:04668:015 2016.03.13 01:57:27.778 DEBUG MultiStreamMessageWr] PROJECTIONS: Scheduling the writing of $dispose to $projections-$1af4fd4c-51fd-43c2-bc1a-11202da2841f. Current status of Writer: Busy: False

[PID:04668:015 2016.03.13 01:57:27.778 DEBUG MultiStreamMessageWr] PROJECTIONS: Scheduling the writing of $create-and-prepare to $projections-$1af4fd4c-51fd-43c2-bc1a-11202da2841f. Current status of Writer: Busy: True

[PID:04668:008 2016.03.13 01:57:28.593 TRACE QueuedHandlerMRES ] SLOW QUEUE MSG [StorageWriterQueue]: WritePrepares - 955ms. Q: 0/7.

[PID:04668:015 2016.03.13 01:57:28.639 DEBUG MultiStreamMessageWr] PROJECTIONS: Finished writing events to $projections-$1af4fd4c51fd43c2bc1a11202da2841f: $dispose

[PID:04668:020 2016.03.13 01:57:28.671 DEBUG ProjectionCoreServic] PROJECTIONS: Command received: 5@$dispose

[PID:04668:015 2016.03.13 01:57:28.702 DEBUG MultiStreamMessageWr] PROJECTIONS: Finished writing events to $projections-$1af4fd4c51fd43c2bc1a11202da2841f: $create-and-prepare

[PID:04668:020 2016.03.13 01:57:28.702 DEBUG ProjectionCoreServic] PROJECTIONS: Command received: 6@$create-and-prepare

[PID:04668:020 2016.03.13 01:57:28.702 DEBUG ResponseWriter ] PROJECTIONS: Scheduling the writing of $faulted to $projections-$master. Current status of Writer: Busy: False

[PID:04668:020 2016.03.13 01:57:28.749 DEBUG ResponseWriter ] PROJECTIONS: Finished writing events to $projections-$master: $faulted

[PID:04668:015 2016.03.13 01:57:28.749 DEBUG ProjectionManagerRes] PROJECTIONS: Response received: 234@$faulted

I am running the client like this

.\EventStore.ClusterNode.exe --db .\data --log .\logs --ext-http-prefixes=“http://*:2113/” --ext-ip=azure_InternalIP–int-ip=azure_InternalIP --add-interface-prefixes=false --ext-tcp-heartbeat-timeout=10000 --ext-tcp-heartbeat-interval=5000 --run-projections=all

  1. What’s the version of Event Store?

  2. What does your projection look like?

  3. Have you tried a simple projection like

fromStream(’$stats-127.0.0.1:2113’)
.when({
$init:function(s,e){
return { count: 0 }
},
$any: function(s,e){
s.count += 1;
return s;
}
})

``

Just noticed the logs now, so it’s 3.5.0. Ignore question 1. :slight_smile:

Any feedback regarding getting a little more information about this issue? e.g. What does the projection look like? does the simple one I posted work?

Ok I took the simple projection you gave me and it worked. I was trying to use a simple projection that I found on the blog that was not working. I did restart the server between trying that and yours so I am not sure if it was the projection or the restart that worked.

Thanks for your help.