Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kongfig 1.5.3 doesn't work with Kong 1.0.3 Error: http://localhost:8001/apis: 404 Not Found #157

Open
alex-vasilchenko-md opened this issue Feb 15, 2019 · 7 comments

Comments

@alex-vasilchenko-md
Copy link

Hi! I get this issue:

kongfig dump --host localhost:8001 > config.yml
Error: http://localhost:8001/apis: 404 Not Found
Error: http://localhost:8001/apis: 404 Not Found
at /Users/alex/.npm-packages/lib/node_modules/kongfig/lib/adminApi.js:139:25
at process.internalTickCallback (internal/process/next_tick.js:77:7)

kongfig version is 1.5.3
Kong version is 1.0.3

http://localhost:8001/apis returns 404 but if I call it without /apis it works.

@seonixx
Copy link

seonixx commented Feb 20, 2019

@alex-vasilchenko-md did you manage to resolve this?

@alex-vasilchenko-md
Copy link
Author

alex-vasilchenko-md commented Feb 20, 2019

Well, @seonixx , I'm not good at node :) I saw the root of the issue - and I tried a dirty fix really quick to get rid of "/apis" in endpoints paths.
But since version 1.x Kong API changed quite a lot and proper fix requires more work. Not sure that kongfig supports breaking changes of 0.13.x version when Kong introduced separate"service" object: there is no such object here https://docs.konghq.com/0.12.x/admin-api/ but since next version it's there https://docs.konghq.com/0.13.x/admin-api/#service-object

So I assume it would take some work to add proper compatibility. There is a new tool that is currently in active development: https://github.com/Maples7/kong-config-manager/

https://github.com/liyuntao/kong-init - this tool didn't work for me for Kong 1.0.3 too.

https://github.com/romanovskyj/gongfig - this tool is nice and I like it very much. It worked for my simple setup.

I found there was discussion on new Kong versions support here: #132

@shuu56
Copy link

shuu56 commented Feb 20, 2019

@alex-vasilchenko-md

I also encountered a similar error.
dump was possible by modifying the file under "kongfig/lib".

Change: "apis" to "services"

File:
node_modules/kongfig/lib/adminApi.js
node_modules/kongfig/lib/router.js
node_modules/kongfig/lib/actions.js
node_modules/kongfig/lib/mapConsumers.js
node_modules/kongfig/lib/syncConfigs.js
node_modules/kongfig/lib/core.js
node_modules/kongfig/lib/reducers/index.js

I am not good at nodejs, so I am not confident of the correction content.

@alex-vasilchenko-md
Copy link
Author

I didn't make it to the point when dump and then apply worked properly with my dirty fix. @shuu56 , please let us know if your fix worked well.

@shuu56
Copy link

shuu56 commented Feb 20, 2019

@alex-vasilchenko-md

I also failed to import.
When exporting, mandatory information (id of service, route etc.) defined in service was not taken.
It seems that import failed because those information was missing.

It is difficult for me to renovate, because it is necessary to link Service Id and Route, so I will give up this time.

I'm sorry.
I wish I could help you out.

@guushamann
Copy link

have the same error

apis not found, which is correct because the apis route is removed from kong in 1.03

@robert-ovens
Copy link

I've loved kongfig and kudos to the creators. There are more DS tools around we are currently investigating deck as we migrate from 0.14 to 1.x Kong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants