function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kamil SzycKamil Szyc 

Socket timeout occurred while listening for results

When running 
 
sfdx force:org:create -s -f config/project-scratch-def.json -a GeoAppScratch

I am getting:
ERROR running force:org:create:  Socket timeout occurred while listening for results.

Try this:
You may consider increasing the --wait parameter value to increase timeout.
I get the error a few seconds after I run the command and changing the wait parameter does not help. Could the fact that I am behind proxy be the issue? I have set it up as per following:  https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli_firewall.htm? search_text=proxy and I am able to use such commands as sfdx update or sfdx:force:org:open etc.
Best Answer chosen by Kamil Szyc
Ciaran Moore 6Ciaran Moore 6
Try creating "http_proxy" and "https_proxy" environment variables, this fixed the issue for me.

All Answers

Meng-Wei Tsai 6Meng-Wei Tsai 6
I got the same error message from Force.com IDE 2. But the scartch org is actually created in spite of the message.
Ciaran Moore 6Ciaran Moore 6
Try creating "http_proxy" and "https_proxy" environment variables, this fixed the issue for me.
This was selected as the best answer
Jason Tsai 17Jason Tsai 17
Thanks, Ciaran. It works for me too.
Kamil SzycKamil Szyc

Hi Ciaran,

Do you mean something different than this?

npm config set https-proxy https://username:pwd@proxy.company.com:8080
npm config set proxy https://username:pwd@proxy.company.com:8080
npm config set sslVerify false
npm config set strict-ssl false
Because this didn't help much.
 
Jason M TsaiJason M Tsai
Hi Kamil,

Create those two (http_proxy and https_proxy) as OS environment variables, in addition to the npm configuration. 
dxhub cepdxhub cep
Hi I did everything as suggested above but im still getting this error please advise
Kai Wang 18Kai Wang 18
Hi,

I got the same issue with setting https_proxy and http_proxy environment variables behind a firewall.
Any ideas?
Davide Fabris 16Davide Fabris 16
Stuck here as well, any idea?
Rajesh.KumarSFDCRajesh.KumarSFDC
Did any body get this resolved ? I am stucked with similar issue .
Kamil SzycKamil Szyc
Have a look at the answer I marked, it worked for me. I also think that the latest version of SFDX has this thing sorted out.
Ankit AvulaAnkit Avula
I had the same issue when I did it for the first time but later I tried the same command the second time it was a success.