2

hope there is someone who can help? It's taken me a couple of days, but I've finally got the buildkit successfully installed, however when I try to create my first instance I'm getting permissions errors, is this because I've installed it in the wrong place? I've checked the Apache version and the restart command.

This is a fresh install on gc ubuntu16.04 with up to date dependencies

Errors:

seankenny@instance-2:~$ ./buildkit/bin/amp test Create test application Create data directory: /home/seankenny/.amp/canary/data/F2Dn7Skcr6zJM61SvzEB72IjOuoUMHwi AMP_URL='http://localhost:7979' AMP_ROOT='/home/seankenny/.amp/canary' AMP_DB_DSN='mysql://canary_wfa83:n29ZlTuwvd9UxLuI@127.0.0.1:3306/canary_wfa83?new_link=true' AMP_DB_USER='canary_wfa83' AMP_DB_PASS='n29ZlTuwvd9UxLuI' AMP_DB_HOST='127.0.0.1' AMP_DB_PORT='3306' AMP_DB_NAME='canary_wfa83' AMP_DB_ARGS='--defaults-file='\''/home/seankenny/.amp/my.cnf.d/my.cnf-e7cb970bf21e2d4b82d944711b5fc15b'\'' canary_wfa83' Connect to test application Expect response: "response-code-wgnXWegrsL" PHP Warning: file_get_contents(http://localhost:7979/index.php): failed to open stream: Connection refused in phar:///home/seankenny/buildkit/bin/amp/src/Amp/Command/TestCommand.php on line 163 Warning: file_get_contents(http://localhost:7979/index.php): failed to open stream: Connection refused in phar:///home/seankenny/buildkit/bin/amp/src/Amp/Command/TestCommand.php on line 163 Received incorrect response: "" Tips for common issues: - (Re)run "amp config" - Double-check the httpd_type (apache24) along with any displayed instructions. - Double-check the httpd_restart_command. - (Re)run "amp test"

4

Accessing URL http://localhost:7979 requires at least these things:

  • Your client is able to resolve host localhost to the local IP address
  • You have a server which is listening to port 7979
  • Your server on port 7979 is able to listen to that port (not firewalled / filtered)

Check DNS for localhost

If the command host localhost does not resolve to 127.0.0.1, you should check your /etc/hosts file has an entry which defines the correct IP for localhost.

Expected output is something like:

chris@strike:~$ host localhost
localhost has address 127.0.0.1
localhost has IPv6 address ::1

Check server is listening on expected port

From the debug output above, we can see your server expects to bind to port 7979. So we can use lsof to confirm that the expected process is listening on this port.

chris@strike:~ $ sudo lsof -i :7979
COMMAND   PID  USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
nginx     432 chris    6u  IPv4 0x74beb77a214bedc1      0t0  TCP *:micromuse-ncps (LISTEN)
nginx   12446 chris    6u  IPv4 0x74beb77a214bedc1      0t0  TCP *:micromuse-ncps (LISTEN)
nginx   12447 chris    6u  IPv4 0x74beb77a214bedc1      0t0  TCP *:micromuse-ncps (LISTEN)

This output tells us that port 7979 "belongs" to a service named "micromuse-ncps", but we'll ignore that; we're using that port for your AMP hosts. Just read "micromuse-ncps" as saying "7979".

Your output should show that -

  • The expected program has this port bound. (I'm using nginx, you'll see apache there.)
  • The expected user account is running this program. (If I saw "alice" instead of "chris" as the username, that might be telling me that Alice's buildkit had already claimed port 7979, so I couldn't have it.)
  • If no results show up, this might indicate that your webserver didn't know to bind that port, which might happen if the AMP include was not added to the webserver's config file.

Firewalls

If the port is bound but you can't connect to it, that might indicate the presence of a firewall or other system preventing AMP's test connecting.

Documenting firewall configuration isn't in scope here, sorry! Should your buildkit host have a firewall, you'll have to be responsible for making sure that firewall doesn't interfere with buildkit, by ensuring the buildkit/amp ports are available to the expected client IPs.

  • That's great, thanks. I got down as far as "If no results show up, this might indicate that your webserver didn't know to bind that port, which might happen if the AMP include was not added to the webserver's config file." and found out a lot more about ufw. Test build launches now, but new issues to diagnose of course. – Sean Kenny Dec 8 '16 at 15:31
0

I have buildkit working in multiple places but a quick check suggests that

./buildkit/bin/amp test

gives the results above - so I don't know if you have to get past that to get buildkit working...

Probably only if you want it to run on a port as opposed to defining something in your hosts file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.