Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This is the reader that uses the 2022 protocol specification.
For the legacy parser see the Consortium Parser page that uses the previous data specification.

Table of Contents:

Setup

The reader needs to be pointed at the correct database and have the correct authentication (user Id and password) information to make the right connections. To do this use
File menu - Preferences.

image-20250122-221723.png

Import / Synch Ridings, Parties, Candidates

The menu item - File - Synchronize Database will connect to the election data server and pull in the riding, party and candidate data. Then it compares it to what is in the selected Elector Database and makes updates and adds missing records as appropriate.

  • Inserts missing ridings

  • Inserts missing parties

  • Inserts missing candidates

  • Updates candidate ballot order / id values

    • based on riding, party and candidate last name

  • Deletes any candidates found in the Elector database that are not in the Consortium data feed.

Running

When you have started the reader displays

  • The database it’s connected to and the election name and date that it is processing

in the bottom status bar:

  • the number of reports in the Queue to be processed

  • the last report it processed and the time it processed it at

  • if the reader is up-to-date or not

image-20250122-221237.png

Logs

The logs always start with the version number of the application when it launched.

Info: 	Consortium Reader for Elector Launched - Version 1.0.1.0

When you start the reader it generates a log like:

1/22/2025	17:10:00	Info: 	Started reading the datafeed
1/22/2025	17:10:00	Info: 	SELECT ID, cnd_ridingID, cnd_datafeedID FROM elc_candidates WHERE cnd_date = '2025-01-21' AND cnd_datafeedID IS NOT NULL
1/22/2025	17:10:00	Info: 	{"recordType":"begin","beginServerTime":"2025-01-22T17:10:00-0500","electionName":"2025 Federal General Election","beginOptions":{"heartbeat":true,"latestOnly":false,"startAt":1}}

When you stop the reader it generates a log like:

1/22/2025	10:10:06	Info: 	Stopped reading datafeed

Heartbeat

You may see heartbeat messages logged and these just help to indicate that the parser is still able to receive updates from the server.

1/22/2025	16:25:24	Info: 	{"recordType":"heartbeat","heartbeatTime":"2025-01-22T16:25:24-0500"}

Final Reports

Each time a riding gets its final report (when total polls = polls reporting) it logs the record with its riding number.

Final report for 2 with 77 of 77 polls...
1/22/2025	16:24:55	Info: 	{
  "ballotOrderVotes": [
    631,
    7250,
    8227,
    19467
  ],
  "dataSourceId": "E",
  "isAdvancePollCountingComplete": 0,
  "isAllCountingComplete": 1,
  "leadingParties": [
    "LIB"
  ],
  "numPolls": 77,
  "numPollsFinishedReporting": 77,
  "recordType": "vote",
  "voteDistrictId": 2,
  "voteRecordId": 184,
  "voteRecordTime": "2025-01-21 13:05:22"
}

Dropped Connections

If the application loses it’s connection to the server you may see entries like this:

1/22/2025	9:54:55	Exception: 	ReadBuffer(): Unable to read data from the transport connection: The connection was closed.
1/22/2025	9:54:55	Info: 	ReadBuffer(): done
1/22/2025	9:55:54	Info: 	ReadBuffer not running. Restarting.
1/22/2025	9:55:55	Info: 	{"recordType":"begin","beginServerTime":"2025-01-22T09:55:55-0500","electionName":"2025 Federal General Election","beginOptions":{"heartbeat":false,"latestOnly":false,"startAt":3431}}
1/22/2025	9:56:55	Exception: 	ReadBuffer(): Unable to read data from the transport connection: The connection was closed.
1/22/2025	9:56:55	Info: 	ReadBuffer(): done
1/22/2025	9:57:55	Info: 	ReadBuffer not running. Restarting.
1/22/2025	9:57:55	Info: 	{"recordType":"begin","beginServerTime":"2025-01-22T09:57:55-0500","electionName":"2025 Federal General Election","beginOptions":{"heartbeat":false,"latestOnly":false,"startAt":3431}}
...
1/22/2025	10:00:55	Exception: 	ReadBuffer(): Unable to read data from the transport connection: The connection was closed.
1/22/2025	10:00:55	Info: 	ReadBuffer(): done
1/22/2025	10:01:55	Info: 	ReadBuffer not running. Restarting.
1/22/2025	10:01:55	Info: 	ReadBuffer(): done

Debug Logging

For greater details in the logs - turn on the Debug Logging option in the menu

  • Help menu

  • Diagnostics

  • Debug Logging

If there is a checkmark beside it then it is enabled.

Debug Logging Messages

When Debug is enabled, it reports each record as it processes it. That way if it has an error in the processing or stops working you can know what it was doing when that happened. Example:

1/22/2025   16:24:54    Debug:      [3,{"ballotOrderVotes":[27,22,381,372],"dataSourceId":"E","isAdvancePollCountingComplete":0,"isAllCountingComplete":0,"leadingParties":["NDP"],"numPolls":60,"numPollsFinishedReporting":2,"recordType":"vote","voteDistrictId":6,"voteRecordId":3,"voteRecordTime":"2025-01-21 13:02:11"}]
1/22/2025   16:24:54    Debug:      Processing record: 3

Exceptions

If you see exception type messages in the log - this indicates an unexpected error in processing. The example below happened when the part of the consortium server processes had crashed:

1/22/2025	10:09:07	Exception: 	bgWorkerReadBuffer_DoWork(): Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
1/22/2025	10:09:07	Exception: 	<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
1/22/2025	10:09:08	Exception: 	<html><head>
1/22/2025	10:09:09	Exception: 	<title>502 Proxy Error</title>
1/22/2025	10:09:10	Exception: 	</head><body>
1/22/2025	10:09:11	Exception: 	<h1>Proxy Error</h1>
1/22/2025	10:09:12	Exception: 	<p>The proxy server received an invalid
1/22/2025	10:09:13	Exception: 	response from an upstream server.<br />
1/22/2025	10:09:14	Exception: 	The proxy server could not handle the request <em><a href="/results/elections/9/votes">GET&nbsp;/results/elections/9/votes</a></em>.<p>
1/22/2025	10:09:15	Exception: 	Reason: <strong>Error reading from remote server</strong></p></p>
1/22/2025	10:09:16	Exception: 	<hr>
1/22/2025	10:09:17	Exception: 	<address>Apache Server at test2.mediaelections.ca Port 80</address>
1/22/2025	10:09:18	Exception: 	</body></html>
  • No labels