You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/03/22 17:17:23 UTC

[GitHub] [apisix] flash520 opened a new issue #6688: 不能设置上游,eureka未初始化

flash520 opened a new issue #6688:
URL: https://github.com/apache/apisix/issues/6688


   ### Description
   
   在路由中配置使用 eureka 服务发现,配置过程中未提示错误,但在请求路由时,出现如下错误
   [error] 49#49: *1459 [lua] init.lua:520: http_access_phase(): **failed to set upstream: discovery eureka is uninitialized**, client: 192.168.1.94, server: _, request: "POST /movie/DescribeVideoList HTTP/1.1", host: "apisix.dev.xxx.cn"
   
   apisix config.yaml配置文件如下
   ```
   apisix:
     node_listen: 9080              # APISIX listening port
     enable_ipv6: false
   
     allow_admin:                  # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
       - 0.0.0.0/0              # We need to restrict ip access rules for security. 0.0.0.0/0 is for test.
   
     admin_key:
       - name: "admin"
         key: edd1c9f034335f136f87ad84b625c8f1
         role: admin                 # admin: manage all configuration data
                                     # viewer: only can view configuration data
       - name: "viewer"
         key: 4054f7cf07e344346cd3f287985e76a2
         role: viewer
     
     enable_control: true
     control:
       ip: "0.0.0.0"
       port: 9092
   
     discovery:                       # service discovery center
       eureka:
         host:                        # it's possible to define multiple eureka hosts addresses of the same eureka cluster.
           - "http://admin:admin@10.42.1.54:7000" # Access address of Eureka Server started by Spring Boot
         prefix: "/eureka/"
   
   etcd:
     host:                           # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
       - "http://10.42.1.220:2379"     # multiple etcd address
     prefix: "/apisix"               # apisix configurations prefix
     timeout: 30                     # 30 seconds
   
   plugin_attr:
     prometheus:
       export_addr:
         ip: "0.0.0.0"
         port: 9091
   ```
   路由配置如下:
   ```
   {
     "uri": "/movie/DescribeVideoList",
     "name": "xx列表",
     "methods": [
       "POST"
     ],
     "upstream": {
       "timeout": {
         "connect": 6,
         "send": 6,
         "read": 6
       },
       "type": "roundrobin",
       "scheme": "http",
       "discovery_type": "eureka",
       "pass_host": "pass",
       "service_name": "CLASS-MOVIE",
       "keepalive_pool": {
         "idle_timeout": 60,
         "requests": 1000,
         "size": 320
       }
     },
     "status": 1
   }
   ```


-- 
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] flash520 commented on issue #6688: Cannot set upstream, eureka is not initialized

Posted by GitBox <gi...@apache.org>.
flash520 commented on issue #6688:
URL: https://github.com/apache/apisix/issues/6688#issuecomment-1075825396


   ok, thx


-- 
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] juzhiyuan commented on issue #6688: Cannot set upstream, eureka is not initialized

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #6688:
URL: https://github.com/apache/apisix/issues/6688#issuecomment-1081351599


   > service found to belong to the top-level directive domain
   
   I am personally not sure if this works 😅 but we could design an onboarding flow.


-- 
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] tokers commented on issue #6688: Cannot set upstream, eureka is not initialized

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #6688:
URL: https://github.com/apache/apisix/issues/6688#issuecomment-1075793746


   @flash520 `discovery` is not the sub-field of `apisix`.


-- 
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] navendu-pottekkat commented on issue #6688: Cannot set upstream, eureka is not initialized

Posted by GitBox <gi...@apache.org>.
navendu-pottekkat commented on issue #6688:
URL: https://github.com/apache/apisix/issues/6688#issuecomment-1081380800


   @juzhiyuan Could you explain a bit more about the flow you are proposing? We already have the documentation right?


-- 
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] juzhiyuan commented on issue #6688: Cannot set upstream, eureka is not initialized

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #6688:
URL: https://github.com/apache/apisix/issues/6688#issuecomment-1081319487


   > > Hi, @flash520, I'd like to know if there have any improvement we can do to avoid such cases 😄
   > 
   > Our documentation already covers, https://github.com/apache/apisix/blob/master/docs/en/latest/discovery.md#configuration-for-eureka
   > 
   > Or we need to provide more detailed documentation (for each case).
   
   Yes, our markdown files contain that information. I want to know more about why users will miss this part, and how to help them onboard easily and smoothly :) 


-- 
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] juzhiyuan commented on issue #6688: Cannot set upstream, eureka is not initialized

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #6688:
URL: https://github.com/apache/apisix/issues/6688#issuecomment-1081319826


   Also cc @navendu-pottekkat, @hf400159, and @avinal, we should consider a workflow on leading developers to onboard smoothly.


-- 
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] tzssangglass commented on issue #6688: Cannot set upstream, eureka is not initialized

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #6688:
URL: https://github.com/apache/apisix/issues/6688#issuecomment-1081316163


   > Hi, @flash520, I'd like to know if there have any improvement we can do to avoid such cases 😄
   
   Our documentation already covers, https://github.com/apache/apisix/blob/master/docs/en/latest/discovery.md#configuration-for-eureka
   
   Or we need to provide more detailed documentation (for each case).


-- 
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] flash520 commented on issue #6688: Cannot set upstream, eureka is not initialized

Posted by GitBox <gi...@apache.org>.
flash520 commented on issue #6688:
URL: https://github.com/apache/apisix/issues/6688#issuecomment-1081349853


   @juzhiyuan From the error log prompted by the current system, it seems confusing. I have some suggestions. For example, the system will give a clear prompt for the supported configuration instructions in the prompt message. Just like the problem encountered this time, you can directly prompt: service found to belong to the top-level directive domain


-- 
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] juzhiyuan commented on issue #6688: Cannot set upstream, eureka is not initialized

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #6688:
URL: https://github.com/apache/apisix/issues/6688#issuecomment-1081402712


   Actually no. Documentation is one important entry to learn and use Apache APISIX for developers:
   
   1. Follow the documentation (step 1, 2, 3) to know, learn and use something (e.g., Route).
   2. For this issue, flash502 wants to configure Discovery but failed due to the wrong position in yaml. Then how to avoid these cases?
   
   (not serious, more like a brainstorm)


-- 
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] navendu-pottekkat commented on issue #6688: Cannot set upstream, eureka is not initialized

Posted by GitBox <gi...@apache.org>.
navendu-pottekkat commented on issue #6688:
URL: https://github.com/apache/apisix/issues/6688#issuecomment-1081404758


   I see. We can brainstorm and document how a user would use our documentation to achieve something.


-- 
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] flash520 closed issue #6688: Cannot set upstream, eureka is not initialized

Posted by GitBox <gi...@apache.org>.
flash520 closed issue #6688:
URL: https://github.com/apache/apisix/issues/6688


   


-- 
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] juzhiyuan commented on issue #6688: Cannot set upstream, eureka is not initialized

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #6688:
URL: https://github.com/apache/apisix/issues/6688#issuecomment-1077355788


   Hi, @flash520, I'd like to know if there have any improvement we can do to avoid such cases 😄
   
   Usually, we will search the Apache APISIX Website[1] or search codes directly. 😅 I just searched Apache APISIX Docs, and it says I should update the `discovery` field in the `conf` file, see https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L304
   
   Do you have any other suggestions? 
   
   [1] https://apisix.apache.org/


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