Can't log into Kaui (Dockerized 0.18.9, Kaui 0.8.8)

202 views
Skip to first unread message

team...@gmail.com

unread,
Jun 20, 2017, 7:23:24 PM6/20/17
to Kill Bill users mailing-list
Hi, I'm using the docker KillBill 0.18.9 and Kaui 0.8.8 from your docker images on a single large EC2 Linux AMI. It seems the 'latest' versions of those instances don't point to the latest tags.

The DB is backed by a MySQL RDS on AWS, so not a linked docker instance.

I'm just getting started, the documentation for making use of KillBill and Kaui seems to be all over the place, especially with regards to AWS.

The Killbill API is accessible on 8080, and the Kaui login screen is available on 80. (Looks like they both use 8080 under the hood, inside the respective containers)


I used these modifications to the instructions I found somewhere (no up to date AWS deployment docs I can find)


echo "create database kaui;" | mysql -h billingdb2.rds.amazonaws.com -u admin -pXXX
curl -s https://raw.githubusercontent.com/killbill/killbill-admin-ui/master/db/ddl.sql | mysql -h billingdb2.us-east-1.rds.amazonaws.com -u admin -pXXX -D kaui

install a user to kaui
echo "insert into kaui_allowed_users (kb_username, description, created_at, updated_at) values ('admin', 'super admin', NOW(), NOW());" | mysql -h billingdb2.us-east-1.rds.amazonaws.com -u admin -pXXX -D kaui


After trying to log into Kaui the very first time with admin/password as the default, I get a "We're sorry, but something went wrong." screen.

Note that I'm getting to Kaui via http://ecpublicdnsname/, with no path information. The error logs look like it's expecting to be under 1.0/kb/?

Here is the Kaui tomcat error, truncated:
Jun 20, 2017 10:53:46 PM org.apache.catalina.core.ApplicationContext log
INFO: Parameters: {"utf8"=>"?", "authenticity_token"=>"GZg8YNoUoAec4DB6EudWBAC0TxsCwOPWfJdslOUCeNaQvNip9tVCLNkg6ipXH87ZIu3HBn3B+EF6pPRdC7R8jw==", "user"=>{"kb_username"=>"admin", "password"=>"[FILTERED]"}, "commit"=>"Sign in"}

Jun 20, 2017 10:53:46 PM org.apache.catalina.core.ApplicationContext log
INFO: Request method='GET', uri='http://localhost:8080/1.0/kb/security/permissions'

Jun 20, 2017 10:53:46 PM org.apache.catalina.core.ApplicationContext log
INFO: Started GET "/1.0/kb/security/permissions" for 127.0.0.1 at 2017-06-20 22:53:46 +0000

Jun 20, 2017 10:53:46 PM org.apache.catalina.core.ApplicationContext log
INFO:
ActionController::RoutingError (No route matches [GET] "/1.0/kb/security/permissions"):
gems/gems/actionpack-4.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
gems/gems/actionpack-4.2.8/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
gems/gems/railties-4.2.8/lib/rails/rack/logger.rb:38:in `call_app'
gems/gems/railties-4.2.8/lib/rails/rack/logger.rb:20:in `call'
gems/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:68:in `tagged'
gems/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:26:in `tagged'
gems/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:68:in `tagged'
gems/gems/railties-4.2.8/lib/rails/rack/logger.rb:20:in `call'
gems/gems/actionpack-4.2.8/lib/action_dispatch/middleware/request_id.rb:21:in `call'
gems/gems/rack-1.6.5/lib/rack/methodoverride.rb:22:in `call'
gems/gems/rack-1.6.5/lib/rack/runtime.rb:18:in `call'
gems/gems/activesupport-4.2.8/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
gems/gems/actionpack-4.2.8/lib/action_dispatch/middleware/static.rb:120:in `call'
gems/gems/rack-1.6.5/lib/rack/sendfile.rb:113:in `call'
gems/gems/railties-4.2.8/lib/rails/engine.rb:518:in `call'
gems/gems/railties-4.2.8/lib/rails/application.rb:165:in `call'
file:lib/jruby-rack-1.1.19.jar!/rack/handler/servlet.rb:22:in `call'

Jun 20, 2017 10:53:46 PM org.apache.catalina.core.ApplicationContext log
INFO: Response code='404', reason='Not Found', latency='65.0'

Jun 20, 2017 10:53:46 PM org.apache.catalina.core.ApplicationContext log
INFO: Completed 500 Internal Server Error in 112ms (ActiveRecord: 4.0ms)

Jun 20, 2017 10:53:46 PM org.apache.catalina.core.ApplicationContext log
INFO:
KillBillClient::API::NotFound ({"status":"404","error":"Not Found"}):
gems/gems/killbill-client-1.7.0/lib/killbill_client/api/net_http_adapter.rb:216:in `request'
gems/gems/killbill-client-1.7.0/lib/killbill_client/api/api.rb:43:in `get'
gems/gems/killbill-client-1.7.0/lib/killbill_client/models/resource.rb:43:in `get'
gems/gems/killbill-client-1.7.0/lib/killbill_client/models/security.rb:8:in `find_permissions'
gems/gems/kaui-0.15.5/app/models/kaui/user.rb:45:in `do_find_permissions'
gems/gems/kaui-0.15.5/app/models/kaui/user.rb:15:in `find_permissions'
gems/gems/kaui-0.15.5/app/models/kaui/killbill_authenticatable.rb:11:in `valid_killbill_password?'
gems/gems/kaui-0.15.5/config/initializers/killbill_authenticatable.rb:17:in `authenticate!'
gems/gems/devise-3.4.1/lib/devise/models/authenticatable.rb:80:in `valid_for_authentication?'
gems/gems/devise-3.4.1/lib/devise/strategies/authenticatable.rb:36:in `validate'
gems/gems/kaui-0.15.5/config/initializers/killbill_authenticatable.rb:17:in `authenticate!'
gems/gems/warden-1.2.7/lib/warden/strategies/base.rb:54:in `_run!'
gems/gems/warden-1.2.7/lib/warden/proxy.rb:359:in `_run_strategies_for'
org/jruby/RubyArray.java:1613:in `each'
gems/gems/warden-1.2.7/lib/warden/proxy.rb:354:in `_run_strategies_for'
gems/gems/warden-1.2.7/lib/warden/proxy.rb:324:in `_perform_authentication'
gems/gems/warden-1.2.7/lib/warden/proxy.rb:128:in `authenticate!'
gems/gems/devise-3.4.1/app/controllers/devise/sessions_controller.rb:16:in `create'
gems/gems/actionpack-4.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
gems/gems/actionpack-4.2.8/lib/abstract_controller/base.rb:198:in `process_action'
gems/gems/actionpack-4.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'
gems/gems/actionpack-4.2.8/lib/abstract_controller/callbacks.rb:20:in `process_action'

stephane brossier

unread,
Jun 20, 2017, 9:40:22 PM6/20/17
to team...@gmail.com, Kill Bill users mailing-list
On Tue, Jun 20, 2017 at 4:23 PM, <team...@gmail.com> wrote:
Hi, I'm using the docker KillBill 0.18.9 and Kaui 0.8.8 from your docker images on a single large EC2 Linux AMI.  It seems the 'latest' versions of those instances don't point to the latest tags.


I am confused,  KillBill 0.18.9 and Kaui 0.8.8  are the latest images.


 
The DB is backed by a MySQL RDS on AWS, so not a linked docker instance.

I'm just getting started, the documentation for making use of KillBill and Kaui seems to be all over the place, especially with regards to AWS.

The Killbill API is accessible on 8080, and the Kaui login screen is available on 80.  (Looks like they both use 8080 under the hood, inside the respective containers)



 
Yes, Kill Bill and Kaui bind on port 8080. The port that you see on the docker container is in your control -- depends how you start your container (option '-p'). Example: 

docker run -tid \
         --name killbill \
         -p 8080:8080 \
         -p 12345:12345 \
         --link db:dbserver \
         -e KILLBILL_CONFIG_DAO_URL=jdbc:mysql://dbserver:3306/killbill \
         -e KILLBILL_CONFIG_DAO_USER=root \
         -e KILLBILL_CONFIG_DAO_PASSWORD=root \
         -e KILLBILL_CONFIG_OSGI_DAO_URL=jdbc:mysql://dbserver:3306/killbill \
         -e KILLBILL_CONFIG_OSGI_DAO_USER=root \
         -e KILLBILL_CONFIG_OSGI_DAO_PASSWORD=root \
         -e KILLBILL_PLUGIN_ANALYTICS=1 \
         -e KILLBILL_PLUGIN_STRIPE=1 \
         killbill/killbill:0.18.x

 
I used these modifications to the instructions I found somewhere (no up to date AWS deployment docs I can find)



Do you want to submit a PR in our doc repository?

 

echo "create database kaui;" | mysql -h billingdb2.rds.amazonaws.com -u admin -pXXX
curl -s https://raw.githubusercontent.com/killbill/killbill-admin-ui/master/db/ddl.sql | mysql -h billingdb2.us-east-1.rds.amazonaws.com -u admin -pXXX -D kaui

install a user to kaui
echo "insert into kaui_allowed_users (kb_username, description, created_at, updated_at) values ('admin', 'super admin', NOW(), NOW());" | mysql -h billingdb2.us-east-1.rds.amazonaws.com -u admin -pXXX -D kaui


After trying to log into Kaui the very first time with admin/password as the default, I get a "We're sorry, but something went wrong." screen.

Note that I'm getting to Kaui via http://ecpublicdnsname/, with no path information. 
The error logs look like it's expecting to be under 1.0/kb/?



The "/1.0/kb" path is the standard path for Kill Bill server endpoints. I suggest you first try to curl the server to understand where the issue lies (KAUI or Kill Bill server).


Stéphane


 

Daniel Jue

unread,
Jun 20, 2017, 11:48:53 PM6/20/17
to Kill Bill users mailing-list
Hi Stephane,

On https://hub.docker.com/r/killbill/kaui/tags/
The "latest' tag is 3 months old and a hundred megs smaller than the
0.8.8. So I grabbed the 0.8.8 explicitly.

Likewise, here on https://hub.docker.com/r/killbill/killbill/tags/
The 'latest' tag is 3 months old and much smaller, so I grabbed 0.18.9
explicitly. The latest tags probably just need to be updated point to
the right tag, I'm guessing.

Thanks for the link to the docs project, I didn't see that. I was
going mostly off of http://docs.killbill.io/0.18/aws.html, with some
parts taken from your Killbill on AWS/Azure blog posts, which are from
older versions.

I'll try curling around to see why it's not working, thanks.

I should say that I'm attempting to use KillBill for a Saas
subscription + usage billing module, tied into a larger AWS chargeback
module which will post 'billing events' based on 'usage events'.
(Probably done through lambdas reading usage events off Kinesis) I'm
assuming KillBill can handle this type of 'catalog' since it's
described on the website, but I haven't gotten to building the catalog
part yet.
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Kill Bill users mailing-list" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/killbilling-users/hvg8xfpNtzE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> killbilling-us...@googlegroups.com.
> To post to this group, send email to killbill...@googlegroups.com.
> Visit this group at https://groups.google.com/group/killbilling-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/killbilling-users/CAKuqY32RDNEvz1uTCHxqNL8eyw_sVqOB4HcV6rrxmFTfNnOSYg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

stephane brossier

unread,
Jun 21, 2017, 12:04:37 AM6/21/17
to Daniel Jue, Kill Bill users mailing-list
On Tue, Jun 20, 2017 at 8:48 PM, Daniel Jue <team...@gmail.com> wrote:
Hi Stephane,

On https://hub.docker.com/r/killbill/kaui/tags/
The "latest' tag is 3 months old and a hundred megs smaller than the
0.8.8.  So I grabbed the 0.8.8 explicitly.

Likewise, here on https://hub.docker.com/r/killbill/killbill/tags/
The 'latest' tag is 3 months old and much smaller, so I grabbed 0.18.9
explicitly.  The latest tags probably just need to be updated point to
the right tag, I'm guessing.


Ok, let me explain because this is non obvious:

The 'latest' tag, is just an empty envelope that will then download the 'latest' archive (currently
'0.8.8' for KAUI and '0.18.9' for Kill Bill. This is why it is smaller and also older--  it rarely needs to be rebuilt.

However, downloading the exact version the way you did also works, and has the advantage of starting 
faster-- because it already includes the war.
 

Thanks for the link to the docs project, I didn't see that.  I was
going mostly off of http://docs.killbill.io/0.18/aws.html, with some
parts taken from your Killbill on AWS/Azure blog posts, which are from
older versions.

I'll try curling around to see why it's not working, thanks.

I should say that I'm attempting to use KillBill for a Saas
subscription + usage billing module, tied into a larger AWS chargeback
module which will post 'billing events' based on 'usage events'.
(Probably done through lambdas reading usage events off Kinesis)  I'm
assuming KillBill can handle this type of 'catalog' since it's
described on the website, but I haven't gotten to building the catalog
part yet.


Yep we support some usage models, in our terminology the 'consumable in arrear'
and 'capacity in arrear'-- see blog post


Stéphane


> Visit this group at https://groups.google.com/group/killbilling-users.
> To view this discussion on the web visit
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.

team...@gmail.com

unread,
Jun 21, 2017, 5:09:54 PM6/21/17
to Kill Bill users mailing-list, team...@gmail.com
Hi Stephane,

Thanks for the links. It seems the root of the error was using a DDL from an older blog post.
I'm now using http://docs.killbill.io/0.18/ddl.sql

For Kaui, I used the ddl here: https://raw.githubusercontent.com/killbill/killbill-admin-ui/master/db/ddl.sql

Lastly, I had a docker misconfiguration, in line
' -e KAUI_KILLBILL_URL=http://localhost:8080 \'
it seems it needed to reference the killbill docker container instead. I ended up opening port 8989 and adjusting the container tag to get this run command which works:


docker run -tid \
--name kaui \
-p 8989:8080 \
--link killbill:killbill \
-e KAUI_KILLBILL_URL=http://killbill:8080 \
-e KAUI_KILLBILL_API_KEY= \
-e KAUI_KILLBILL_API_SECRET= \
-e KAUI_CONFIG_DAO_URL=jdbc:mysql://billingdb2.us-east-1.rds.amazonaws.com:3306/kaui \
-e KAUI_CONFIG_DAO_USER=admin \
-e KAUI_CONFIG_DAO_PASSWORD=mypassword \
-e KAUI_ROOT_USERNAME=admin \
killbill/kaui:0.8.8

Reply all
Reply to author
Forward
0 new messages