Hi,
I migrated my event store server (at least one of them) from linux to windows and am now in the process of converting deployment scripts etc.
Part of that is a script that creates necessary projections, but somehow these are not created correctly. Unfortunately, as mentioned in https://groups.google.com/forum/#!topic/event-store/A2YebPk-4ZA , as the projections are currently not visible via the WebUI and I don’t have a full grasp on the complete API, I am having a hard time finding the reason why it doesnt work.
To create the projection, I am using this command:
curl -X POST --user {0} --data “{1}” -v {2}projections/continuous?name=per-context&type=JS&emit=1
A GET request on projections/any shows this output:
{
“coreProcessingTime”: 15,
“version”: 0,
“epoch”: -1,
“effectiveName”: “per-context”,
“writesInProgress”: 0,
“readsInProgress”: 0,
“partitionsCached”: 1,
“status”: “Faulted (Enabled)”,
“stateReason”: “‘emit’ is not allowed by the projection/configuration/mode”,
“name”: “per-context”,
“mode”: “Continuous”,
“position”: “C:0/P:-1”,
“progress”: 100.0,
“lastCheckpoint”: “C:0/P:-1”,
“eventsProcessedAfterRestart”: 0,
“statusUrl”: “http://myIP:2113/projection/per-context”,
“stateUrl”: “http://myIP:2113/projection/per-context/state”,
“resultUrl”: “http://myIP:2113/projection/per-context/result”,
“queryUrl”: “http://myIP:2113/projection/per-context/query%3Fconfig=yes”,
“enableCommandUrl”: “http://myIP:2113/projection/per-context/command/enable”,
“disableCommandUrl”: “http://myIP:2113/projection/per-context/command/disable”,
“checkpointStatus”: “”,
“bufferedEvents”: 0,
“writePendingEventsBeforeCheckpoint”: 0,
“writePendingEventsAfterCheckpoint”: 0
}
``
For some reason, emit is disallowed, even though it’s obviously enabled in the creation request url. The url scheme I used was from https://github.com/EventStore/EventStore/blob/2b0e58f3b336e7d44d983dbadfadd427158c1ba3/src/EventStore.ClientAPI/Projections/ProjectionsClient.cs line 45, so should be correct.
I’m pretty sure this is something very trivial (and easier to find would the WebUI work ), but somehow it isn’t coming to me.
Thanks,
Nicolas