seanhuxy opened a new issue #80: Cannot create a trigger with alarm feed
URL: https://github.com/apache/incubator-openwhisk-package-alarms/issues/80
 
 
   I am trying to use openwhisk and the alarms package on ubuntu 14 (on one AWS 
EC2 instance). openwhisk is running well.
   
   I cannot create a trigger with this alarm package, with the error code saying
   
   ```
   "code": 12268,
   "error": "There was an error processing your request."
   ```
   
   which doesn't really helpful.
   
   Please let me know if you have any ideas about it.
   
   ----
   
   Here is my settings
   
   Step 1: Install alarm package with installCatalog.sh
   
   ```sh
   WSK_HOME="$HOME/openwhisk"
   
   SYS_AUTH=`cat $WSK_HOME/ansible/files/auth.whisk.system`
   
   DB_HOST=`awk -F "=" '/db_host/ {print $2}' $WSK_HOME/ansible/db_local.ini`
   DB_PORT=`awk -F "=" '/db_port/ {print $2}' $WSK_HOME/ansible/db_local.ini`
   DB_PREFIX=`awk -F "=" '/db.prefix/ {print $2}' $WSK_HOME/whisk.properties`
   EDGE_HOST=`awk -F "=" '/APIHOST/ {print $2}' $HOME/.wskprops`
   API_HOST=`awk -F "=" '/APIHOST/ {print $2}' $HOME/.wskprops`
   
   export OPENWHISK_HOME=$WSK_HOME
   ./installCatalog.sh $SYS_AUTH $EDGE_HOST $DB_HOST:$DB_PORT $DB_PREFIX 
$API_HOST
   ```
   It is verified when I use ``wsk package`` to list them
   
   ```
    $ wsk package -i --auth ${auth.whisk.system} list
   packages
   /whisk.system/alarmsWeb                                                
private
   /whisk.system/alarms                                                   shared
   ...
   ```
   
   ```
   $ wsk action -i --auth 
789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP
 list
   actions
   /whisk.system/alarmsWeb/alarmWebAction                                 
private nodejs:6
   /whisk.system/alarms/alarm                                             
private nodejs:6
   ....
   ```
   
   Step 2: Build the alarm provider docker image
   
   ``./gradlew :distDocker``
   
   Step 3: Run the alarm provider docker
   
   
   ```sh
   set -e
   set -x
   WSK_HOME=$HOME/openwhisk
   DB_PROTOCOL=`awk -F "=" '/db_protocol/ {print $2}' 
$WSK_HOME/ansible/db_local.ini`
   DB_HOST=`awk -F "=" '/db_host/ {print $2}' $WSK_HOME/ansible/db_local.ini`
   DB_PORT=`awk -F "=" '/db_port/ {print $2}' $WSK_HOME/ansible/db_local.ini`
   DB_USER=`awk -F "=" '/db_username/ {print $2}' 
$WSK_HOME/ansible/db_local.ini`
   DB_PWD=`awk -F "=" '/db_password/ {print $2}' $WSK_HOME/ansible/db_local.ini`
   DB_PREFIX=`awk -F "=" '/db.prefix/ {print $2}' $WSK_HOME/whisk.properties`
   
   docker run -d -p 11001:8080 -v $HOME/wsklogs/alarms:/logs \
   -e PORT=8080 -e ROUTER_HOST=172.17.0.1 \
   -e DB_PREFIX=${DB_PREFIX} -e DB_USERNAME=${DB_USER} \
   -e DB_PASSWORD=${DB_PWD} -e DB_HOST=${DB_HOST}:${DB_PORT} \
   -e DB_PROTOCOL=${DB_PROTOCOL} whisk/catalog_alarms
   ```
   
   The docker is running locally on port 11001, which is verified from ``docker 
ps``
   ```
   CONTAINER ID        IMAGE                        COMMAND                  
CREATED             STATUS              PORTS                                   
                                                                                
                               NAMES
   ....
   3b178d6cc3e3        whisk/catalog_alarms         "/bin/bash -c 'node /"   15 
minutes ago      Up 15 minutes       0.0.0.0:11001->8080/tcp                    
                                                                                
                            infallible_bohr
   ....
   ```
   I also have the log, seems pretty good
   ```
   $ cat wsklogs/alarms/alarmsTrigger_logs.log 
   [2017-07-27T18:55:12.723Z] [INFO] [??] [alarmsTrigger] [createDatabase] 
creating the trigger database
   [2017-07-27T18:55:12.733Z] [INFO] [??] [alarmsTrigger] [server.listen] 
Express server listening on port 8080
   [2017-07-27T18:55:12.757Z] [INFO] [??] [alarmsTrigger] [createDatabase] 
created trigger database: ubuntu_ip-10-0-0-42_alarmservice
   [2017-07-27T18:55:12.776Z] [INFO] [??] [alarmsTrigger] [initAllTriggers] 
resetting system from last state
   ```
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to