Git Product home page Git Product logo

Comments (19)

rabbah avatar rabbah commented on May 21, 2024 1

from openwhisk.

rabbah avatar rabbah commented on May 21, 2024

suspect the router failed in your vagrant machine.

$ docker ps | grep nginx

if that returns nothing

$ ls -l /tmp | grep nginx

if that shows that nginx is owned by root, remove it.

$ sudo rm -rf /tmp/nginx/

then ant clean build deploy and try again - the deploy step when it installs the standard assets in the final step (installCatalog), should report no errors ([exec] open catalog ERRORS = 0).

# this should now show a running container
$ docker ps | grep nginx

from openwhisk.

mdcarlson avatar mdcarlson commented on May 21, 2024

docker ps | grep nginx returned nothing
ls -l /tmp | grep nginx also returned nothing. I confirmed that no nginx files were in /tmp or a subfolder

docker images lists several images.

I have logged out of the VM and executed vagrant reload.

Anything else before I ant clean build deploy ?

from openwhisk.

mdcarlson avatar mdcarlson commented on May 21, 2024

I completely tore down the Vagrant box (vagrant destroy + vagrant box remove ubuntu/trusty64-2) and then reinstalled from scratch following the steps in the Build and deploy OpenWhisk section.

I can successfully create a new subject usingwskadmin and can set the apihost property on the command line with no errors.

However, when I attempt to run the sample action, I am still getting connection refused:

wsk --verbose action invoke /whisk.system/samples/echo -p message hello --blocking --result
{'apihost': '192.168.33.13:443', 'namespace': '_', 'clibuild': '2016-02-28T19:03:52-05:00', 'apiversion': 'v1'}
========
REQUEST:
POST https://192.168.33.13:443/api/v1/namespaces/whisk.system/actions/samples/echo?blocking=true
Headers sent:
{
    "Authorization": "Basic ...",
    "Content-Type": "application/json"
}
Body sent:
{"message": "hello"}
error: [Errno 111] Connection refused

docker ps shows no results at all. No running containers.
ls -lah /tmp does not show any nginx folders at all.

Not sure how to proceed.

Thanks for looking.

from openwhisk.

sjfink avatar sjfink commented on May 21, 2024

Could you run 'ant clean build deploy >& /tmp/x' and attach /tmp/x here?

from openwhisk.

rabbah avatar rabbah commented on May 21, 2024

note: scrub the file for any cloudant passwords.

from openwhisk.

mdcarlson avatar mdcarlson commented on May 21, 2024

Will do. Back in an hour.

from openwhisk.

rabbah avatar rabbah commented on May 21, 2024

If it helps - this is the output of docker ps inside a clean vagrant machine I just created. So there was a failure in your case to either build or deploy. The logs will helps us diagnose what went wrong and improve the process. Thanks for your help and patience.

$ docker ps
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS              PORTS                                                                                                              NAMES
87a6405b714e        whisk/dispatcher:latest     "/startDispatcher.sh "   4 minutes ago       Up 4 minutes        0.0.0.0:12001->8080/tcp                                                                                            invoker0
cf1f1d0ed79a        whisk/loadbalancer:latest   "/startLoadBalancer.s"   4 minutes ago       Up 4 minutes        0.0.0.0:10003->8080/tcp                                                                                            loadbalancer
cfd15f5e26e3        whisk/dispatcher:latest     "/startDispatcher.sh "   4 minutes ago       Up 4 minutes        0.0.0.0:12000->8080/tcp                                                                                            activator
c5e96cc52cb1        whisk/controller:latest     "/startController.sh"    4 minutes ago       Up 4 minutes        0.0.0.0:10001->8080/tcp                                                                                            controller
e7d9ad87eeae        gliderlabs/registrator      "/bin/registrator -ip"   4 minutes ago       Up 4 minutes                                                                                                                           registrator
f85bf6923075        whisk/consul:latest         "/startconsulserver.s"   4 minutes ago       Up 4 minutes        8000/tcp, 53/udp, 8080/tcp, 8301-8302/tcp, 8301-8302/udp, 8400/tcp, 0.0.0.0:8500->8500/tcp, 0.0.0.0:8600->53/tcp   consulserver
6298c63f8a03        whisk/kafka:latest          "/start.sh"              5 minutes ago       Up 5 minutes        7203/tcp, 0.0.0.0:9092->9092/tcp, 0.0.0.0:9093->8080/tcp                                                           kafka
5ef6a2fcff67        whisk/zookeeper:latest      "/opt/zookeeper/bin/z"   5 minutes ago       Up 5 minutes        2888/tcp, 3888/tcp, 8080/tcp, 0.0.0.0:2181->2181/tcp                                                               zookeeper
212271a5a939        nginx                       "nginx -g 'daemon off"   5 minutes ago       Up 5 minutes        0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:8443->8443/tcp      

from openwhisk.

mdcarlson avatar mdcarlson commented on May 21, 2024

Attached.

openwhisk.build.log.txt

Running the sample action now produces a different result:

wsk -v action invoke /whisk.system/samples/echo -p message hello --blocking --result
{'apihost': '192.168.33.13:443', 'namespace': '_', 'clibuild': '2016-02-28T20:51:47-05:00', 'apiversion': 'v1'}
========
REQUEST:
POST https://192.168.33.13:443/api/v1/namespaces/whisk.system/actions/samples/echo?blocking=true
Headers sent:
{
    "Authorization": "Basic ...",
    "Content-Type": "application/json"
}
Body sent:
{"message": "hello"}
--------
RESPONSE:
Got response with code 502
Body received:
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.9.11</center>
</body>
</html>

========
error: connection failed or timed out

Results of docker ps

docker ps
CONTAINER ID        IMAGE                    COMMAND                  CREATED             STATUS              PORTS                                                                                                              NAMES
dc4bac9de51f        19cb05bc7dbd             "/startDispatcher.sh "   58 minutes ago      Up 58 minutes       0.0.0.0:12001->8080/tcp                                                                                            invoker0
38dfbc98c30e        aa18164df72d             "/startLoadBalancer.s"   58 minutes ago      Up 58 minutes       0.0.0.0:10003->8080/tcp                                                                                            loadbalancer
2f399fef8a52        19cb05bc7dbd             "/startDispatcher.sh "   58 minutes ago      Up 58 minutes       0.0.0.0:12000->8080/tcp                                                                                            activator
d3a59e3788bc        cdc281a58aa6             "/startController.sh"    58 minutes ago      Up 58 minutes       0.0.0.0:10001->8080/tcp                                                                                            controller
af9ec87c23e0        gliderlabs/registrator   "/bin/registrator -ip"   58 minutes ago      Up 58 minutes                                                                                                                          registrator
8d85b47cbcf4        whisk/consul:latest      "/startconsulserver.s"   58 minutes ago      Up 58 minutes       8000/tcp, 8080/tcp, 53/udp, 8301-8302/tcp, 8301-8302/udp, 8400/tcp, 0.0.0.0:8500->8500/tcp, 0.0.0.0:8600->53/tcp   consulserver
f21efa06ec14        whisk/kafka:latest       "/start.sh"              59 minutes ago      Up 59 minutes       7203/tcp, 0.0.0.0:9092->9092/tcp, 0.0.0.0:9093->8080/tcp                                                           kafka
3e1156e8b626        whisk/zookeeper:latest   "/opt/zookeeper/bin/z"   59 minutes ago      Up 59 minutes       2888/tcp, 3888/tcp, 0.0.0.0:2181->2181/tcp, 8080/tcp                                                               zookeeper
e3d3fc9c9be1        nginx                    "nginx -g 'daemon off"   59 minutes ago      Up 59 minutes       0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:8443->8443/tcp                                                   nginx

from openwhisk.

rabbah avatar rabbah commented on May 21, 2024

The log you attached shows the controller failed to start up: "controller is not responding." And this would explain the bad gateway failure.

How much RAM does your Mac have?

from openwhisk.

mdcarlson avatar mdcarlson commented on May 21, 2024

8Gb. Approx 1.5Gb free. The vagrant VM is using 3.75Gb

from openwhisk.

rabbah avatar rabbah commented on May 21, 2024

try manually restarting the controller only:

docker rm -f controller
ant -f openwhisk/core/controller/build.xml startController

then run wsk list it should respond with

$ wsk list
entities in namespace: default
packages
actions
triggers
rules

from openwhisk.

rabbah avatar rabbah commented on May 21, 2024

If the previous works, I suggest this ant clean build deploy -Dbuildthreads=1.

from openwhisk.

mdcarlson avatar mdcarlson commented on May 21, 2024

That worked.

@rabbah is the suggestion to specify the number of buildThreads something that I need to do now or just if I have to rebuild again in the future?

from openwhisk.

rabbah avatar rabbah commented on May 21, 2024

I'm suspecting that the parallel builds and deploys are stressing the vm and the containers are slow to come up and respond. If with 1 build thread you're able to reliably bring up and deploy the system, you can create a custom config file that overrides the parameter so you don't have to type it regularly. I will post instructions here once you confirm that improves your build/deploy cycle.

from openwhisk.

mdcarlson avatar mdcarlson commented on May 21, 2024

OK, I'll kick that off shortly and capture the output.

from openwhisk.

mdcarlson avatar mdcarlson commented on May 21, 2024

With the single thread option specified (e.g. ant clean build deploy -Dbuildthreads=1 ) , the entire build process completed successfully and correctly deployed the sample actions.

For reference, I was using a mid-2012 Macbook Air with 8Gb RAM and a 500Gb SSD drive.

The failure to deploy the proxy (nginx container) caused the authentication error shown in the subject line.

from openwhisk.

rabbah avatar rabbah commented on May 21, 2024

I'll address the nginx build/deploy robustness in issue #32.

from openwhisk.

AsmOK avatar AsmOK commented on May 21, 2024

I get a connection refused error.
image
However, the containers are all there. Comparing to a properly running version, only a couchdb container is missing for me, but I'm using Cloudant, so that's the reason it's missing.
image

from openwhisk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.