azure-sdk-for-php icon indicating copy to clipboard operation
azure-sdk-for-php copied to clipboard

Unable to open a $serviceBusRestProxy object in php

Open ZebpayHitesh opened this issue 8 years ago • 7 comments

Fatal error: Uncaught <table style="border: 1px" cellspacing="0"> <tr><td colspan="3" style="background: #ff9999"> <b>HTTP_Request2_ConnectionException</b>: Unable to connect to tls://zebpaytestnet-sb.accesscontrol.windows.net:443. Error: php_network_getaddresses: getaddrinfo failed: Name or service not known in <b>/var/www/html/Myoperator/support-scripts/Zendesk/vendor/pear/http_request2/HTTP/Request2/Adapter/Socket.php</b> on line <b>331</b></td></tr> <tr><td colspan="3" style="background-color: #aaaaaa; text-align: center; font-weight: bold;">Exception trace</td></tr> <tr><td style="text-align: center; background: #cccccc; width:20px; font-weight: bold;">#</td><td style="text-align: center; background: #cccccc; font-weight: bold;">Function</td><td style="text-align: center; background: #cccccc; font-weight: bold;">Location</td></tr> <tr><td style="text-align: center;">0</td><td>HTTP_Request2_SocketWrapper->__construct('tls://zebpaytest&hellip;', 10, Array)</td><td>/var/www/html/Myoperator/support-scripts/Zendesk/vendor in /var/www/html/Myoperator/support-scripts/Zendesk/vendor/pear/http_request2/HTTP/Request2/SocketWrapper.php on line 134

ZebpayHitesh avatar Feb 23 '17 14:02 ZebpayHitesh

@ZebpayHitesh Could you provide more info? It looks like the service was not available at this time "Name or service not known"

sergey-shandar avatar Mar 01 '17 18:03 sergey-shandar

Hello, I'm having the same issue, using PHP 5.6.25 and microsoft/windowsazure 0.4.5. I'm following the example at Microsoft PHP topic example and I'm getting this error message: Unable to connect to tls://my-sb.accesscontrol.windows.net:443. Error: php_network_getaddresses: getaddrinfo failed: No such host is known. I'm able to connect to sb://my-sb.servicebus.windows.net/, but after that, for some reason, the connection goes to .accesscontrol.windows.net:4443 which seems impossible to reach

fabio-vyzvoice avatar Mar 08 '17 13:03 fabio-vyzvoice

@fabio-vyzvoice Could you also try 0.5.0 ?

sergey-shandar avatar Mar 09 '17 01:03 sergey-shandar

Nope, I'm stuck with Zend fromawork 2.4 and can't upgrade to 2.7, which is required for version 0.5.0. I believe the problem is that the https://*-sb.servicebus.windows.net is not accessible at all. It seems that, with 0.4.5, it is not possible to use SAS authentication but CAS, as the endpoint parser can't understand the SharedAccessKey & Name, but only the SHARED_SECRET_ISSUER_NAME & SHARED_SECRET_VALUE_NAME (in src/Common/Internal/ServiceBusSettings.php ) . It seems the SAS authentication is not supported for ServicesBuilder->createServiceBusService; Would it work ServiceBuilder->createQueueService($connectionString)? Maybe tomorrow I can give it a try. Meanwhile I implemented my own SAS token generator.

fabio-vyzvoice avatar Mar 09 '17 01:03 fabio-vyzvoice

Just to affirm. I'm running into the same error using the Ruby example fabio is using the PHP example above.

2.4.1 :011 > topic = azure_service_bus_service.create_queue("test-topic") Faraday::ConnectionFailed: Failed to open TCP connection to spike-ds1-powershell-sb.accesscontrol.windows.net:443 (getaddrinfo: Name or service not known)

hail2skins avatar May 18 '17 10:05 hail2skins

Fatal error: Uncaught

HTTP_Request2_MessageException: Error writing request in C:\xampp\htdocs\edmin\RETS\NWMLS\vendor\pear-pear.php.net\HTTP_Request2\HTTP\Request2\Adapter\Socket.php on line 130
Exception trace
#FunctionLocation
0HTTP_Request2_SocketWrapper->write('DELETE /nwmls-ge…')C:\xampp\htdocs\edmin\RETS\NWMLS\vendor\pear-pear.php.net\HTTP_Request2\HTTP\Request2\Adapter\Socket.php:130
1HTTP_Request2_Adapter_Socket->sendRequest(Obj in C:\xampp\htdocs\edmin\RETS\NWMLS\vendor\pear-pear.php.net\HTTP_Request2\HTTP\Request2\SocketWrapper.php on line 206

vinayakac avatar Jul 24 '17 10:07 vinayakac

I am also facing same issue

vinayakac avatar Jul 24 '17 10:07 vinayakac