Regarding your Sonar scanning execution failure, please read the Generic Test Data documentation to double-check your xml format of your test report. It should look something like this:
Also, in the sonar project properties you posted, you show this:
So sonar.testExecutionReportPaths is commented out, yet we see that it is being parsed/read in the logs. Please double-check your sonar project properties.
To your 2nd question: There isn’t a nice way to generate reports through the terminal or command line. SonarQube was meant to be interacted through UI and thus the browser.
But if you insist on terminal alone, you can use our Web API endpoints to curl for information in a script, for example. You can find more information here.