metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
209 stars 153 forks source link

ERROR: Unexpected closed connection by remote host... #376

Closed mohamedammar940 closed 1 month ago

mohamedammar940 commented 5 months ago

hello i have this error ERROR: Unexpected closed connection by remote host... this my laravel code $conn = new \Metaregistrar\EPP\eppConnection(); $conn->addExtension( 'allocationToken','urn:ietf:params:xml:ns:allocationToken-1.0'); $conn->useExtension('secDNS-1.1'); $conn->setHostname('epp.sandbox.nic.sa'); //also trying ssl://epp.sandbox.nic.sa $conn->setPort(700); $conn->setUsername('xxx'); $conn->setPassword('xxxxxx'); $context = stream_context_create(array( 'ssl' => array( 'local_cert' => $sslCert, 'local_pk' => $sslKey, 'passphrase'=>'', ) )); $conn->setSslContext($context); $conn->connect(); $conn->login(); but i get same error i can connect to NIC epp end point service via cmd using the SSL certificates openssl s_client -connect epp.sandbox.nic.sa:700 -cert registrar.crt -key registrar.key it return CONNECTED(00000003) depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1 verify return:1 depth=1 C = US, O = Let's Encrypt, CN = R3 verify return:1 depth=0 CN = *.sandbox.nic.sa verify return:1 and other xml resonse any

metaregistrar commented 2 months ago

This error always occurs when a connection is not accepted / most happens due to whitelisting / firewall issues. Please check the whitelist with your provider, and check your own outgoing firewall settings for the corresponding ports / IP addresses