Solr/SolrNet Help Required - solr

I am having an issue in while querying to solr that when my page size is larger that 75 I got error An
existing connection was forcibly closed by the remote host.
I think it might be an issue at solr side but nothing is logged in tomcat logs, I am using solr 1.4.1 with solr net
Can any body help me to resolve this particular issue.
here is the stack trace
at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.StreamReader.ReadBuffer()
at System.IO.StreamReader.ReadToEnd()
at SolrNet.Impl.SolrConnection.GetResponse(IHttpWebRequest request)
at SolrNet.Impl.SolrPostConnection.Post(String relativeUrl, String s)
at SolrNet.Impl.SolrPostConnection.Get(String relativeUrl, IEnumerable`1 parameters)
at SolrNet.Impl.SolrQueryExecuter`1.Execute(ISolrQuery q, QueryOptions options)
at SolrNet.Impl.SolrBasicServer`1.Query(ISolrQuery query, QueryOptions options)
at SolrNet.Impl.SolrServer`1.Query(String q, QueryOptions options)
Regards
Ahsan

Try increasing the connection timeout.

Related

Why SOLR not exporting result Sets from all cores of a collection

In my SolrCloud 9.0, I have set up a collection (12 string fields) with multiple cores. The following /export request handler query is not returning with full documents/datasets.
http://localhost:8983/solr/my_collection_name/export?indent=true&q.op=OR&q=*:*&fq=((Ar:(*srikanth*))%20OR%20(F_Name:(*srikanth*))%20OR%20(Mobile:(*srikanth*))%20OR%20(Name:(*srikanth*))%20OR%20(O_m_no:(*srikanth*))%20OR%20(Addr:(*srikanth*)))&wt=json&sort=id+desc&fl=Name,Mobile,F_Name
Collection is already configured with docvalues=true. The export request is returning the results different on every refresh/hit but not returning the full dataset.
Occurring the same issue on /stream request, my /stream request URL as follows,
http://localhost:8983/solr/my_collection_name/stream?
expr=search(my_collection_name,
q="*:*",
fq="((Ar:(*sridhar*))OR(DOB:(*sridhar*))OR(Email:(*sridhar*))OR(F_Name:(*sridhar*))OR(Gender:(*sridhar*))OR(Mobile:(*sridhar*))OR(Name:(*sridhar*))OR(Nationality:(*sridhar*))OR(O_m_no:(*sridhar*))OR(Addr:(*sridhar*))OR(Pincode:(*sridhar*))OR(State:(*sridhar*)))",
sort="id desc",
fl="id,Ar,DOB,Email,F_Name,Gender,Mobile,Name,Nationality,
O_m_no,Addr,Pincode,State")
Additionally I included the params zkHost, qt in the /stream request URL. This time the response is taking long and is giving the full dataset, but most of the time occurring timeout exception java.io.IOException: java.lang.RuntimeException: org.eclipse.jetty.io.EofException. In this case How can we improve the performance?
http://localhost:8983/solr/my_collection_name/stream?
expr=search(my_collection_name,
zkHost="localhost:9983",
qt="/export",
q="*:*",
fq="((Ar:(*sridhar*))OR(DOB:(*sridhar*))OR(Email:(*sridhar*))OR(F_Name:(*sridhar*))OR(Gender:(*sridhar*))OR(Mobile:(*sridhar*))OR(Name:(*sridhar*))OR(Nationality:(*sridhar*))OR(O_m_no:(*sridhar*))OR(Addr:(*sridhar*))OR(Pincode:(*sridhar*))OR(State:(*sridhar*)))",
sort="id desc",
fl="id,Ar,DOB,Email,F_Name,Gender,Mobile,Name,Nationality,
O_m_no,Addr,Pincode,State")
How can we solve this problem?

Migrated SSRS Server will not load reports

I started this process back in November with this question: How to migrate an existing SSRS setup to a new server?
I was able to migrate everything to the new server without any issues. There were no errors on any of the tabs in the Report Server Configuration Manager. And the Reporting Service started with out errors. I was able navigate the expected "directory" structure through the web interface. However, when I tried to execute a report, upload a report or manage the report I received an error dialog that read "An error has occurred. Something went wrong. Please try again later." This isn't the most helpful error, so I went to the Report Service error log and found this exception in the log:
Microsoft.ReportingServices.Portal.WebHost!reportserverwebapp!4a!03/02/2019-12:44:39:: e ERROR: [c4tdsgh8]: OData exception occurred: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:443
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.SqlServer.ReportingServices2010.ReportingService2010.IsSSLRequired()
at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SetConnectionProtocol()
at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SoapMethodWrapper`1.ExecuteMethod(Boolean setConnectionProtocol)
at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SoapMethodWrapper`1.ExecuteMethod()
at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SetItemDefinition(String itemPath, Byte[] definition, Property[] properties)
at Microsoft.ReportingServices.Portal.Services.SoapProxy.SoapRS2010Proxy.<>c__DisplayClass14.<SetItemDefinition>b__13()
at Microsoft.ReportingServices.Portal.Services.SoapProxy.SoapAuthenticationHelper.ExecuteWithWindowsAuth[TReturn](SoapHttpClientProtocol soapClient, IPrincipal userPrincipal, Func`1 func)
at Microsoft.ReportingServices.Portal.Services.SoapProxy.SoapAuthenticationHelper.ExecuteWithCorrespondingAuthMechanism[TReturn](SoapHttpClientProtocol soapClient, IPrincipal userPrincipal, Func`1 func)
at Microsoft.ReportingServices.Portal.Services.SoapProxy.SoapRS2010Proxy.SetItemDefinition(IPrincipal userPrincipal, String itemPath, Byte[] definition, Property[] properties)
at Microsoft.ReportingServices.Portal.Repositories.CatalogItemRepository.UpdateReport(IPrincipal userPrincipal, String origItemPath, Report item, Boolean renameOrMove, String[] delta)
at Microsoft.ReportingServices.Portal.Repositories.CatalogItemRepository.Update(IPrincipal userPrincipal, Guid key, CatalogItem catalogItem, String[] delta)
at Microsoft.ReportingServices.Portal.ODataWebApi.V1.Controllers.CatalogItemsController.PutEntity(String key, CatalogItem entity)
at Microsoft.ReportingServices.Portal.ODataWebApi.V1.Controllers.Reflection.EntitySetReflectionODataController`1.Put(ODataPath oDataPath, T value)
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext().
I spent a few hours looking this error up with no solution. It could be that I was pretty fried and I missed something, but any guidance would be appreciated.
You may find its faster to create a SSRS project in SSDT, import the reports and redeploy them. You may have to recreate the data sources but in my experience this is the fastest way to get it done.

Why am I getting "unable to write data to the transport connection" errors when re-indexing my Solr search index for Sitecore 7?

When I try to re-index my Sitecore 7 site using Solr. I get the following errors in the Solr log.
10232 09:10:03 WARN Crawler : AddRecursive DoItemAdd failed - {550B5CEF-242C-463F-8ED5-983922A39863}
Exception: System.IO.IOException
Message: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
Source: System
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.InternalWrite(Boolean async, Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
at System.Net.ConnectStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at SolrNet.Impl.SolrConnection.CopyTo(Stream input, Stream output)
at SolrNet.Impl.SolrConnection.PostStream(String relativeUrl, String contentType, Stream content, IEnumerable`1 parameters)
at SolrNet.Impl.SolrConnection.Post(String relativeUrl, String s)
at SolrNet.Impl.SolrBasicServer`1.SendAndParseHeader(ISolrCommand cmd)
at Sitecore.ContentSearch.SolrProvider.SolrBatchUpdateContext.AddRange(IEnumerable`1 group, Int32 groupSize)
at Sitecore.ContentSearch.SolrProvider.SolrBatchUpdateContext.AddDocument(Object itemToAdd, IExecutionContext[] executionContexts)
at Sitecore.ContentSearch.SitecoreItemCrawler.DoAdd(IProviderUpdateContext context, SitecoreIndexableItem indexable)
at Sitecore.ContentSearch.HierarchicalDataCrawler`1.CrawlItem(Tuple`3 tuple)
Nested Exception
Exception: System.Net.Sockets.SocketException
Message: An existing connection was forcibly closed by the remote host
Source: System
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
Any ideas why this would be happening?
Try loooking at your solr logs for any Errors coming from the SolrCore by browsing - http://yoursolrinstance/solr/#/~logging
I found that Solr was having an issue with fields generated from the dynamicField type.
Solr in my instance was looking for 'myfieldname_t_cs' and throwing and 'unknown field' exception for items in the cs-CZ language.
The dynamic field defination in the solr schema.xml has a field defined <dynamicField name="*_t_cz" type="text_cz" indexed="true" stored="true" />but not one with mapping the _cs suffix so I added that <dynamicField name="*_t_cs" type="text_cz" indexed="true" stored="true" /> restarted Tomcat and rebuilt my indexes and that error cleared.
I also have Solr errors about Polish content as this is language region information is not defined at all and Norway where the field is defined in the schema.xml as <dynamicField name="*_t_no" type="text_no" indexed="true" stored="true" />but solr is searching for the suffix '*_nb' eg unknown field 'id_t_nb' and throwing a unknown field exception.
There seems to be a problem with the way Sitecore and Solr are mapping languages for using the Region Info I will raise a ticket with Sitecore support and update the answer when I get a response.
You mention Chinese in your errors could be that Chinese is not defined in Solr but you have some content in Sitecore in that language.
Update
Sitecore have confirmed this behaviour as a bug
I have found that when generating search schema and updating indexes
different attributes are used (the name of language and culture). I
will register this behavior as a bug and register a wish to implement
a full support of the languages that are supported in SOLR by default.

Reporting Services 2005: Attempt to export to Excel gives "Object reference not set to an instance of an object." error

I have a moderately complex report consisting of a lot of subreports.
One particular one is causing an issue: if you run it standalone, it works fine. If you integrate it as a subreport, it refuses to allow you to export to Excel format (from Preview), with the following error:
An error occurred during local report processing.
An error occurred during rendering of the report.
An error occurred during rendering of the report.
Object reference not set to an instance of an object.
Producing to any other format works fine. Most of my Googling thus far has said "Reinstall Reporting Services", which I really don't want to do (I reinstalled for a previous issue, and it took me a good day or so to get everything happy again - possibly more), especially given it's not a guaranteed fix.
I don't know if it's significant, but the reports do make us of Dundas Charts, which may make it more difficult to parse.
Anyone know a better solution?
Update:
When I try Exporting to Excel on the report server, it gives me this:
Object reference not set to an instance of an object.
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.Exception: Object reference not set to an instance of an object.
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:
[Exception: Object reference not set to an instance of an object.]
[Exception: An error occurred during rendering of the report.]
[Exception: An error occurred during rendering of the report.]
Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream outputStream, String& mimeType, String& fileNameExtension) +520
Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean isAbortable, String format, String deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension) +936
Microsoft.Reporting.WebForms.ServerReport.Render(String format, String deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension) +28
Microsoft.Reporting.WebForms.ServerReportControlSource.RenderReport(String format, String deviceInfo, NameValueCollection additionalParams, String& mimeType, String& fileExtension) +85
Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +143
Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +152
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
I ran into the same issue with the below statement. Everything works fine as expected except when exporting to excel.
=iif(ReportItems!textbox343.Value>ReportItems!textbox344.Value or ReportItems!textbox346.Value>ReportItems!textbox347.Value,"Yes","No")
Here is the fix. Added braces and voila voodoo magic it works.
=iif((ReportItems!textbox343.Value>ReportItems!textbox344.Value) or (ReportItems!textbox346.Value>ReportItems!textbox347.Value),"Yes","No")
I believe that the Excel export of a report containing subreports is a known issue in SSRS 2005 and is addressed in 2008. I don't know if the upgrade is an option for you?

Need help for IBatis?

I am using IBatis for my applicaiton. I am using IBatis 1.6.1 version.I thought it can handle all operations related to DB connections. But I am having little bit concern about this now. Sometimes I am getting the following error details to my log file,
Message
Unable to open connection to "MySQL, MySQL provider 5.0.8.1".
Source
IBatisNet.DataMapper
Stack
at IBatisNet.DataMapper.SqlMapSession.OpenConnection(String connectionString) at IBatisNet.DataMapper.SqlMapSession.OpenConnection() at IBatisNet.DataMapper.Commands.DbCommandDecorator.System.Data.IDbCommand.ExecuteReader() at IBatisNet.DataMapper.MappedStatements.MappedStatement.RunQueryForObject(RequestScope request, ISqlMapSession session, Object parameterObject, Object resultObject) at IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObject(ISqlMapSession session, Object parameterObject, Object resultObject) at IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObject(ISqlMapSession session, Object parameterObject) at IBatisNet.DataMapper.SqlMapper.QueryForObject(String statementName, Object parameterObject) at Sunya.VideoStreaming.Persistence.SchoolRepository.GetSchoolDetailsByUrl(String SchoolUrl) in D:\SVN\Sprint104\Persistence\SchoolRepository.cs:line 192 at EduVisionBasePage.GetSchoolUrl(School& _school) at ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Message
Too many connections
Source
MySql.Data
Stack
at MySql.Data.MySqlClient.MySqlStream.OpenPacket() at MySql.Data.MySqlClient.NativeDriver.Authenticate411() at MySql.Data.MySqlClient.NativeDriver.Authenticate() at MySql.Data.MySqlClient.NativeDriver.Open() at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() at MySql.Data.MySqlClient.MySqlPool.GetConnection() at MySql.Data.MySqlClient.MySqlConnection.Open() at IBatisNet.DataMapper.SqlMapSession.OpenConnection(String connectionString)
Does someone has some idea about the error?
iBATIS has been around for quite a while (2001), and I have my doubts that there's a major bug in the MySQL provider. You mentioned that the error occurs "sometimes" - if it's intermittent, perhaps the problem lies elsewhere. "Unable to open connection" is likely to mean just that. Network errors, database outages, too many unreleased connections, authentication issues, etc. might all cause this error.
If you are using the JDBC transaction manager set the datasource to 'UNPOOLED' in you myBatisConfig.xml
<transactionManager type="JDBC"/>
<dataSource type="UNPOOLED">
.
.
.
</dataSource>
</environment>
That is the short answer. My hunch is The connection pool class is holding connections too long. Lowering the values for 'poolMaximunActiveConnection' and 'poolMaximunIdleConnections' may solve the problem.
Notes: using myBatis 3.0.3 Java, mySql Windows 5.5.9
search terms: iBatis, myBatis, 'Too many connections', mySQL

Resources