sailershen edited a comment on issue #3843:
URL: https://github.com/apache/apisix/issues/3843#issuecomment-803732635


   Thx for help.
   
   
   ```
   curl http://127.0.0.1:9080/apisix/admin/stream_routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f2' -X PUT -d '
   {
       "upstream": {
           "nodes": {
               "172.16.10.241:6500": 1,
               "172.16.10.242:6500": 1
           },
           "type": "roundrobin"
       }
   }'
   ```
   
   or 
   
   ```
   curl http://127.0.0.1:9080/apisix/admin/stream_routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f2' -X PUT -d '
   {
       "remote_addr": "127.0.0.1",
       "upstream": {
           "nodes": {
               "172.16.10.241:6500": 1,
               "172.16.10.242:6500": 1
           },
           "type": "roundrobin"
       }
   }'
   ```
   
   it's still failed.
   ```
   telnet 127.0.0.1 6500
   Trying 127.0.0.1...
   Connected to 127.0.0.1.
   Escape character is '^]'.
   Connection closed by foreign host.
   ```
   
   In error.log:
   ```
   2021/03/22 11:16:06 [error] 9411#9411: *17645914 lua entry thread aborted: 
runtime error: /usr/local/apisix/apisix/stream/router/ip_port.lua:33: attempt 
to index local 'route' (a boolean value)
   stack traceback:
   coroutine 0:
           /usr/local/apisix/apisix/stream/router/ip_port.lua: in function 
'match_opts'
           /usr/local/apisix/apisix/stream/router/ip_port.lua:62: in function 
'match'
           /usr/local/apisix/apisix/init.lua:737: in function 
'stream_preread_phase'
           preread_by_lua(nginx.conf:69):2: in main chunk while prereading 
client data, client: 172.26.5.10, server: 0.0.0.0:6500
   ```


-- 
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.

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


Reply via email to