I have both Solr 7.2.1 with port 8983 and Solr 6.6.2 with port 8984 on my machine. My 9.1 instance is using solr 7.2.1 and working fine. But my Solr 6.6.2 for Sitecore 9.0.2, is showing this error.
Server Error in '/' Application.
Data at the root level is invalid. Line 1, position 1.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[XmlException: Data at the root level is invalid. Line 1, position 1.]
System.Xml.XmlTextReaderImpl.Throw(Exception e) +91
System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() +408
System.Xml.XmlTextReaderImpl.ParseDocumentContent() +487
System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options) +60
System.Xml.Linq.XDocument.Parse(String text, LoadOptions options) +156
SolrNet.Impl.SolrCoreAdmin.SendAndParseHeader(ISolrCommand cmd) +40
Sitecore.ContentSearch.SolrProvider.SolrNetIntegration.SolrPinger.Ping() +32
Sitecore.ContentSearch.SolrProvider.SolrConnectors.SolrConnector.TestConnection() +70
Sitecore.ContentSearch.SolrProvider.SolrStatus.OkSolrStatus() +99
Sitecore.ContentSearch.SolrProvider.SolrStatus..cctor() +72
[TypeInitializationException: The type initializer for 'Sitecore.ContentSearch.SolrProvider.SolrStatus' threw an exception.]
Sitecore.ContentSearch.SolrProvider.SolrStatus.SetIndexForInitialization(ISearchIndex solrIndex) +0
Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.SetForReinitialization() +202
Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.InitializeSolr() +190
Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.Initialize() +46
Sitecore.ContentSearch.SolrProvider.SolrContentSearchManager.Initialize() +169
(Object , Object ) +9
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +236
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
Sitecore.Nexus.Web.HttpModule.Application_Start() +161
Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +767
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +581
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +168
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +277
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +369
[HttpException (0x80004005): The type initializer for 'Sitecore.ContentSearch.SolrProvider.SolrStatus' threw an exception.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +714