Re: [SOAP] soapclient using https randomly closes connection
[email protected] (Sriram Natarajan)
| Newsgroups | php.soap |
|---|---|
| Message-ID | <[email protected]> |
Bernhard Ege wrote: > I am using php 5.2.9 (solaris) and have access to a .NET webservice > that I > have to access using https. > > In most cases, accessing it works just fine, but every now and again, > SoapClient closes the connection before actually having transfered the > request, erroring with "could not connect to host ...". > > I have captured the actual communication using snoop and examined the > result > in wireshark and I see that the tcp connection to the webservice is > established correct, but before the request is transmitted, SoapClient > closes the tcp-connection which is acknowledged by the webservice > which also > resets the TCP connection. > > When I disable the caching of the WSDL file for SoapClient, I get these > errors (not always, only sometimes): > > Warning: SoapClient::SoapClient() [soapclient.soapclient]: failed to > create > an SSL context in /space/hom > > Warning: SoapClient::SoapClient() [soapclient.soapclient]: Failed to > enable > crypto in /space/home > This warning suggests that PHP is unable to create a SSL stream context . By default, if you disable caching, PHP has to download the wsdl to your /tmp directory. Is is possible you are running out of disk space in /tmp. - Sriram > Warning: SoapClient::SoapClient(https://sitename.../pathto?WSDL) > [soapclient.soapclient]: failed to open stream: operation failed in > /space/home > > Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : > failed to load external entity "https://sitename.../pathto?WSDL" in > /space/hom > > Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing > WSDL: > Couldn't load from 'https://... > > > If I would get this error every time, I'd be more happy, but when it only > occurs once in a while (like every 10. connect), I am more at a loss. > But it > does seem like SoapClient is at fault. > > Any suggestions? > > /Bernhard >