Thankfully I found the solution myself after doing some testing. I will post the solution incase anyone has the same issue:
I have X-pack installed and I believe that might have conflicted with the authentication portion.
The fix is simple. Add '-u elastic' after the '-XPUT' command. Where 'elastic' is the default username for X-pack. After running the command you should be prompted for a password. Use the password to authenticate. Default password is 'changeme'.
Thanks for sharing your solution, Ryan! To speed things up a bit, you can also pass the username and password as a single argument: -u elastic:changeme.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.