You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "kayx23 (via GitHub)" <gi...@apache.org> on 2023/09/11 08:42:19 UTC

[GitHub] [apisix-docker] kayx23 opened a new issue, #498: failed to fetch `/usr/local/apisix/conf/apisix.yaml`: No such file or directory, context: ngx.timer

kayx23 opened a new issue, #498:
URL: https://github.com/apache/apisix-docker/issues/498

   ## Description
   
   Following the [doc on Docker Hub](https://hub.docker.com/r/apache/apisix) to start APISIX in standalone mode:
   
   ```shell
   docker run -d --name apache-apisix \
     -p 9080:9080 \
     -e APISIX_STAND_ALONE=true \
     apache/apisix
   ```
   
   Observed the following logs being repeatedly generated:
   
   ```text
   2023/09/11 08:29:39 [error] 42#42: *399 [lua] config_yaml.lua:73: failed to fetch /usr/local/apisix/conf/apisix.yaml attributes: cannot obtain information from file '/usr/local/apisix/conf/apisix.yaml': No such file or directory, context: ngx.timer
   2023/09/11 08:29:39 [error] 45#45: *403 [lua] config_yaml.lua:73: failed to fetch /usr/local/apisix/conf/apisix.yaml attributes: cannot obtain information from file '/usr/local/apisix/conf/apisix.yaml': No such file or directory, context: ngx.timer
   2023/09/11 08:29:39 [error] 41#41: *407 [lua] config_yaml.lua:73: failed to fetch /usr/local/apisix/conf/apisix.yaml attributes: cannot obtain information from file '/usr/local/apisix/conf/apisix.yaml': No such file or directory, context: ngx.timer
   2023/09/11 08:29:40 [warn] 42#42: *6 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 42#42: *7 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 42#42: *8 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 42#42: *9 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 42#42: *10 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 42#42: *11 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 42#42: *12 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 42#42: *13 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 42#42: *14 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 42#42: *15 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 42#42: *16 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 42#42: *17 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 45#45: *20 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 45#45: *21 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 45#45: *22 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 45#45: *23 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 45#45: *24 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 45#45: *25 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 45#45: *26 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 45#45: *27 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 45#45: *28 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 45#45: *29 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 45#45: *30 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 45#45: *31 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 41#41: *34 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   2023/09/11 08:29:40 [warn] 41#41: *35 [lua] config_yaml.lua:127: wait for more time, context: ngx.timer
   ```
   
   ## Environments
   
   * Host: debian
   * APISIX docker image: debian v3.5.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-docker] kayx23 commented on issue #498: failed to fetch `/usr/local/apisix/conf/apisix.yaml`: No such file or directory, context: ngx.timer

Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #498:
URL: https://github.com/apache/apisix-docker/issues/498#issuecomment-1713595295

   Another way is to mount the file `apisix.yaml` at container start up, with a working config (e.g. a route) inside the file.
   
   If you mount an empty file, you _could_ get the following:
   
   ```text
   /usr/local/openresty//luajit/bin/luajit ./apisix/cli/apisix.lua init
   /usr/local/openresty//luajit/bin/luajit: /usr/local/apisix/deps/share/lua/5.1/tinyyaml.lua:756: bad argument #1 to 'sfind' (string expected, got nil)
   stack traceback:
           [C]: in function 'sfind'
           /usr/local/apisix/deps/share/lua/5.1/tinyyaml.lua:756: in function 'parsedocuments'
           /usr/local/apisix/deps/share/lua/5.1/tinyyaml.lua:818: in function 'parse'
           /usr/local/apisix/apisix/cli/file.lua:321: in function 'read_yaml_conf'
           /usr/local/apisix/apisix/cli/ops.lua:174: in function </usr/local/apisix/apisix/cli/ops.lua:157>
           /usr/local/apisix/apisix/cli/ops.lua:976: in function 'execute'
           ./apisix/cli/apisix.lua:40: in main chunk
           [C]: at 0x56493d0c23d0
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-docker] Revolyssup commented on issue #498: failed to fetch `/usr/local/apisix/conf/apisix.yaml`: No such file or directory, context: ngx.timer

Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on issue #498:
URL: https://github.com/apache/apisix-docker/issues/498#issuecomment-1714917192

   @kayx23 These are just yaml parsing warnings present that go away once a valid configuration is given. I think since these are warning logs and not error logs, it's fine to have them. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-docker] kayx23 closed issue #498: failed to fetch `/usr/local/apisix/conf/apisix.yaml`: No such file or directory, context: ngx.timer

Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 closed issue #498: failed to fetch `/usr/local/apisix/conf/apisix.yaml`: No such file or directory, context: ngx.timer
URL: https://github.com/apache/apisix-docker/issues/498


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-docker] kayx23 commented on issue #498: failed to fetch `/usr/local/apisix/conf/apisix.yaml`: No such file or directory, context: ngx.timer

Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #498:
URL: https://github.com/apache/apisix-docker/issues/498#issuecomment-1713469248

   The repetitive logging would only stop when a working configuration is present in `apisix.yaml` it seems.
   
   For example, it won't stop logging warning and errors with just the creation of the file:
   
   ```shell
   sudo docker exec apache-apisix bash -c "echo '#END' > /usr/local/apisix/conf/apisix.yaml"
   ```
   
   It would stop when a working config is present:
   
   ```shell
   docker exec -i apache-apisix sh -c 'cat > /usr/local/apisix/conf/apisix.yaml <<_EOC_
   routes:
     -
       id: httpbin
       uri: /*
       upstream:
         nodes:
           "httpbin.org": 1
         type: roundrobin
       plugin_config_id: 1
   
   plugin_configs:
     -
       id: 1
       plugins:
         response-rewrite:
           body: "Hello APISIX\n"
       desc: "response-rewrite"
   #END
   _EOC_'
   ```
   
   APISIX is usable, however, just with a very polluted log.
   
   Please evaluate if this is something to fix for. If not, feel free to close.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org