No matching index template for data data stream [<template-name>]

Hello,

I'm encountering the above error as part of the error below.
Connection marked as failed because the onConnect callback failed: error loading template: failed to put data stream: could not put data stream: 400 Bad Request
I'm trying to execute filebeat.yml for multiple indexes. After creating the indices for first logfile, the error is coming up when the second logfile is being executed. The Index template is already created as part of the first logfile template setup. I'm using the same template for all the logfiles, just different indices. I can see the index template, ILM Policy and indices created for the first logfile but failing further on.