I cloned an existing site and kept getting a ‘502 Bad Gateway’ error, which I had never gotten before when cloning. Nginx error log said this: 2017/08/22 18:49:44 [emerg] 425#0: bind() to 0.0.0.0:80 failed (98: Address already in use) 2017/08/22 18:49:44 [emerg] 425#0: still could not bind() 2017/08/22 18:49:47 [error] 274#0: *1 connect() to unix:/var/run/php-fpm.sock failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: ~^(.*)\.memory\.dev$, request: "GET / HTTP/1.0", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "memory.dev"
The site I was trying to create was using the URL ‘memory.dev’. I solved it by re-cloning and using ‘memorymeadows.dev’ instead. I’m not sure WHY this solved my issue, but I thought I would post this for future people-with-a-similar-problem to see how I solved it.
No - seems like it’s having issues writing to that
Nov 6, 2017, 12:06 PM PST - info: [environment/custom] [06-Nov-2017 20:06:27] ERROR: failed to open error_log (/var/log/php/5.3.29/php-fpm.log): No such file or directory (2)
[06-Nov-2017 20:06:27] ERROR: failed to post process the configuration
[06-Nov-2017 20:06:27] ERROR: FPM initialization failed Starting php-fpm failed
Yeah, seems like that worked. I’ll have to test this more (if you want), but it seems like my install doesn’t like .localhost domains at all even when they’re in the hosts files.
When you export/re-import a site, are you supposed to delete the existing site after exporting and prior to re-importing? Or do you import over top of it?
I’m confused. How would the original site still exist to be deleted if you re-imported the same site? Did you mean that during the re-import you give it a different local domain name so that you have two separate installs (original, and imported one)? You can’t import a site that has the same domain as an existing site, correct? By the way, I’m the original creator of this thread and I solved my issue by cloning to a different domain, but when I saw your comment to Scott about export/re-import I was curious about that workflow for future debugging.
Clay, great support/responses. One clarification if you don’t mind. Is there any difference between exporting a site and re-importing it versus simply right-clicking on it and cloning it? Is one option better than another when someone encounters an error like the ones in this thread?