Skip to content

Appending configuration to conf/config.yaml not working #12124

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

Open
jpgu07 opened this issue Apr 4, 2025 · 7 comments
Open

Appending configuration to conf/config.yaml not working #12124

jpgu07 opened this issue Apr 4, 2025 · 7 comments
Assignees
Labels
question label for questions asked by users

Comments

@jpgu07
Copy link

jpgu07 commented Apr 4, 2025

Description

Hi, thanks for taking care of this.

I'm following this tutorial step by step but at the end I'm getting the following error.

2025/04/04 14:26:40 [error] 50#50: *65140 [lua] init.lua:539: handle_upstream(): failed to set upstream: discovery consul is uninitialized, client: 192.168.65.1, server: _, request: "GET /consul/web/ HTTP/1.1", host: "127.0.0.1:9080"

I'm using the master branch and MACOS so I used the arm64 docker-compose file.

Please confirm if you're able to reproduce it and how can it be fixed, thank you a lot.

Environment

  • APISIX version (run apisix version): 3.12.0-debian
  • Operating system (run uname -a): Darwin mac-1.home 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:23 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T8122 arm64
@dosubot dosubot bot added the question label for questions asked by users label Apr 4, 2025
@kayx23
Copy link
Member

kayx23 commented Apr 7, 2025

Please try following this doc which is more updated: https://docs.api7.ai/apisix/how-to-guide/service-discovery/consul-integration

@jpgu07
Copy link
Author

jpgu07 commented Apr 7, 2025

Hi @kayx23 , thanks for answering. I followed this link instructions to the T but just found another blocker

 docker exec apisix-quickstart apisix reload
/usr/local/openresty//luajit/bin/luajit ./apisix/cli/apisix.lua reload
/usr/local/openresty//luajit/bin/luajit: 324:1: did not find expected <document start>
stack traceback:
        [C]: in function 'error'
        /usr/local/apisix/deps/share/lua/5.1/lyaml/init.lua:306: in function 'error'
        /usr/local/apisix/deps/share/lua/5.1/lyaml/init.lua:325: in function 'parse'
        /usr/local/apisix/deps/share/lua/5.1/lyaml/init.lua:496: in function 'load'
        /usr/local/apisix/apisix/cli/file.lua:252: in function 'read_yaml_conf'
        /usr/local/apisix/apisix/cli/ops.lua:174: in function 'init'
        /usr/local/apisix/apisix/cli/ops.lua:960: in function </usr/local/apisix/apisix/cli/ops.lua:958>
        /usr/local/apisix/apisix/cli/ops.lua:1003: in function 'execute'
        ./apisix/cli/apisix.lua:41: in main chunk
        [C]: at 0xaaaac40c8d10

@kayx23
Copy link
Member

kayx23 commented Apr 7, 2025

Can you provide reproducible steps

@jpgu07
Copy link
Author

jpgu07 commented Apr 7, 2025

I just went step by step on the tutorial you linked, starting by the Getting Started section to install api-six and then moving to the consul section. Nothing else.

Please be aware I'm in MAC Os using ARM.

Thank you.

@kayx23
Copy link
Member

kayx23 commented Apr 7, 2025

In the APISIX container, could you remove the ... at line 324 of conf/config.yaml and try reloading again? Should work after that.

I think there was some changes to the content of conf/config.yaml file - how it is initialized - that the doc I linked has not considered for. Good that it is caught. Will see if this is a doc issue or something engineering should fix.

@kayx23 kayx23 self-assigned this Apr 7, 2025
@kayx23
Copy link
Member

kayx23 commented Apr 8, 2025

I've confirmed with engineering that the ... in the config.yaml is an issue that should be fixed, perhaps in the next release. For the time being, please manually edit config.yaml, remove ... and append the service discovery configuration before reloading. Hope this helps and feel free to report back if any other issues.

@Revolyssup
Copy link
Contributor

@jpgu07 If manually removing ... worked for you then maybe we can rename this issue to a more appropriate one
"Appending configuration to conf/config.yaml not working"

@jpgu07 jpgu07 changed the title help request: consul integration not working Appending configuration to conf/config.yaml not working Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question label for questions asked by users
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants