apisix icon indicating copy to clipboard operation
apisix copied to clipboard

bug: cannot add stream_proxy config

Open wenbinye opened this issue 6 years ago • 3 comments

Issue description

Cannot add stream_proxy config

Environment

  • apisix version (cmd: apisix version): 2.0
  • OS: CentOS 8

Minimal test code / Steps to reproduce the issue

  1. add in conf/config.yaml
apisix:
  stream_proxy:
    tcp: [ 6370 ]
  1. run apisix init,errors displayed:
lua: ./bin/apisix:613: attempt to index a nil value (local 'base')
stack traceback:
        ./bin/apisix:613: in upvalue 'merge_conf'
        ./bin/apisix:615: in upvalue 'merge_conf'
        ./bin/apisix:615: in upvalue 'merge_conf'
        ./bin/apisix:659: in upvalue 'read_yaml_conf'
        ./bin/apisix:825: in field '?'
        ./bin/apisix:1165: in main chunk
        [C]: in ?

What's the actual result? (including assertion message & call stack if applicable)

nginx.conf was not generate. if change conf/config-default.yaml add same config, apisix init will run successfully:

apisix:
  stream_proxy:
    tcp: [ 6370 ]

What's the expected result?

wenbinye avatar Nov 16 '20 05:11 wenbinye

@wenbinye your issue title should be "bug: cannot add stream_proxy config".

idbeta avatar Nov 16 '20 06:11 idbeta

I can not reproduce your problem in my env, could you provide more information? Like how do you install APISIX, apache-apisix-2.0-src.tgz or docker?

idbeta avatar Nov 16 '20 06:11 idbeta

Should be solved by https://github.com/apache/apisix/pull/2476 Feel free to reopen it if it could be reproduced in the master branch.

spacewander avatar Nov 16 '20 06:11 spacewander