Error while communicating with the Kill Bill server: Error 400: Invalid catalog for tenant : 1

1,071 views
Skip to first unread message

Zebradots Web Solutions

unread,
Apr 14, 2017, 10:19:47 AM4/14/17
to killbill...@googlegroups.com
First, we begin by installing a new instance of Killbill and Kaui. We have
tried these combinations:

* Killbill 0.18.2 + Kaui 0.8.1
* Killbill 0.18.6 + Kaui 0.8.7

We then immediately create the new tenant with:

curl -v \
-X POST \
-u admin:password \
-H 'Content-Type: application/json' \
-H 'X-Killbill-CreatedBy: admin' \
-d '{"apiKey": "bob", "apiSecret": "lazar"}' \
"http://127.0.0.1:8080/1.0/kb/tenants"

This new tenant automatically has a sample catalog available (which is
great!) but we want to override it with a new one. So we navigate to
Catalog > Existing Plans > Enable Advanced Configuration (Upload XML) and
attempt to upload a different catalog. This results in "Error while
communicating with the Kill Bill server: Error 400: Invalid catalog for
tenant : 1". (Note: The catalog XML was validated with
killbill-catalog-0.18.X-load-tool.jar and was somehow successfully
uploaded in the past, so it is known to work.)

Since there are no subscriptions or invoices yet, we then try to remove
all catalog data from the database to start fresh, using this command:

echo "use killbill; delete from tenant_kvs;" | docker exec -i db mysql
-h localhost -uroot -proot

However, this does not help -- the same error above is returned when the
catalog XML is uploaded. Other posts mention clearing the cache, but do
not indicate how to do so. What steps are we missing?

And as a follow-up question: If future changes to the catalog are needed,
how would they be uploaded since this error seems to always be the result
if one already exists?

Thanks for any insight.

stephane brossier

unread,
Apr 14, 2017, 12:37:36 PM4/14/17
to ad...@zebradots.com, killbill...@googlegroups.com
If you don't want Kb to create use the default test catalog upon tenant creation you need specify the following query parameter: 'useGlobalDefault=false':

curl -v \
    -X POST \
    -u admin:password \
    -H 'Content-Type: application/json' \
    -H 'X-Killbill-CreatedBy: admin' \
    -d '{"apiKey": "bob", "apiSecret": "lazar"}' \
    'http://127.0.0.1:8080/1.0/kb/tenants?useGlobalDefault=false'

Note that if you are using the KAUI tenant screen to create your tenant, it will do that automatically for you. 

At this point, you have a tenant with no default catalog and you can then proceed with uploading XML catalog or use use UI to add 'simple'Plans.

Stéphane



--
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.
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/e676de13a07d3d513a7cbf74e8177780.squirrel%40help.zebradots.com.
For more options, visit https://groups.google.com/d/optout.

Zebradots Web Solutions

unread,
Apr 17, 2017, 9:43:58 AM4/17/17
to stephane brossier, killbill...@googlegroups.com
> If you don't want Kb to create use the default test catalog upon tenant
> creation you need specify the following query parameter:
> 'useGlobalDefault=false':

Thank you, this is exactly the information we were looking for.
>> 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/e676de13a07d3d513a7cbf74e81777
>> 80.squirrel%40help.zebradots.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>


--
Create a new website instantly in under 10 minutes at www.zebradots.com!

Reply all
Reply to author
Forward
0 new messages