apisix icon indicating copy to clipboard operation
apisix copied to clipboard

bug: Can't turn on Skywalking

Open jinpy666 opened this issue 6 years ago • 25 comments

Issue description

Environment

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

Minimal test code / Steps to reproduce the issue

I opened Skyworking in config.yaml and restarted the service, which did not take effect

What's the expected result?

image image

jinpy666 avatar Nov 09 '20 01:11 jinpy666

The plugins should be the same indent level as the apisix.

spacewander avatar Nov 09 '20 02:11 spacewander

The plugins should be the same indent level as the apisix.

image It still doesn't open

jinpy666 avatar Nov 09 '20 02:11 jinpy666

It still doesn't open

You should show the error message instead of saying it doesn't work.

spacewander avatar Nov 09 '20 02:11 spacewander

It still doesn't open

You should show the error message instead of saying it doesn't work.

image

jinpy666 avatar Nov 09 '20 02:11 jinpy666

Can't reproduce in my side.

 ¥ curl 127.0.0.1:9080/apisix/admin/plugins/list -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1'
["skywalking"]

My configuration:

apisix:
  admin_key:
    -
      name: "admin"
      key: edd1c9f034335f136f87ad84b625c8f1 # using fixed API token has security risk, please
                                            # update it when you deploy to production environment
      role: admin
plugins:
  - skywalking

Have you restarted APISIX after changing the configuration?

spacewander avatar Nov 09 '20 02:11 spacewander

Can't reproduce in my side.

 ¥ curl 127.0.0.1:9080/apisix/admin/plugins/list -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1'
["skywalking"]

My configuration:

apisix:
  admin_key:
    -
      name: "admin"
      key: edd1c9f034335f136f87ad84b625c8f1 # using fixed API token has security risk, please
                                            # update it when you deploy to production environment
      role: admin
plugins:
  - skywalking

Have you restarted APISIX after changing the configuration?

image It's been restarted.I'm using the latest release:v2.0.

jinpy666 avatar Nov 09 '20 02:11 jinpy666

Still can't reproduce with apisix restart.

spacewander avatar Nov 09 '20 03:11 spacewander

Any error message in your logs/error.log?

spacewander avatar Nov 09 '20 03:11 spacewander

Any error message in your logs/error.log?

image

jinpy666 avatar Nov 09 '20 03:11 jinpy666

@jinpy666 you can provide your conf/config.yaml file, we can make a check

membphis avatar Nov 09 '20 15:11 membphis

@jinpy666 you can provide your conf/config.yaml file, we can make a check

[root@master conf]# apisix version
2.0
[root@master conf]# pwd
/usr/local/apisix/conf
[root@master conf]# cat config.yaml 
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# If you want to set the specified configuration value, you can set the new
# in this file. For example if you want to specify the etcd address:
#
# etcd:
#     host:
#       - "http://127.0.0.1:2379"
#
apisix:
  admin_key:
    -
      name: "admin"
      key: edd1c9f034335f136f87ad84b625c8f1 # using fixed API token has security risk, please
                                            # update it when you deploy to production environment
      role: admin
plugins:
  - skywalking

jinpy666 avatar Nov 09 '20 15:11 jinpy666

it works fine at my side. :(

image

membphis avatar Nov 09 '20 15:11 membphis

it works fine at my side. :(

image Why is this not available in Dashboard? Don't support UI operations?

image image

jinpy666 avatar Nov 09 '20 15:11 jinpy666

@nic-chen do you have any idea about this? how to get the plugin list from manager-api?

membphis avatar Nov 09 '20 22:11 membphis

@nic-chen do you have any idea about this? how to get the plugin list from manager-api?

List by jsonschema. I will try in my local, and figure it out

nic-chen avatar Nov 09 '20 23:11 nic-chen

@jinpy666 https://github.com/apache/apisix-dashboard/pull/754

we update the JSONSchema file: https://github.com/apache/apisix-dashboard/pull/754/files#diff-5fadf7c6b5b550d0a97075c3ddeaf29028204cd60da2660c6a1e1c72b4bbd0ed

you can use it to replace the file api/conf/schema.json or output/conf/schema.json in your work folder.

if you have any question, please let us know

membphis avatar Nov 10 '20 01:11 membphis

@jinpy666 apache/apisix-dashboard#754

we update the JSONSchema file: https://github.com/apache/apisix-dashboard/pull/754/files#diff-5fadf7c6b5b550d0a97075c3ddeaf29028204cd60da2660c6a1e1c72b4bbd0ed

you can use it to replace the file api/conf/schema.json or output/conf/schema.json in your work folder.

if you have any question, please let us know

I rebuilt based on the latest branch and can see the plugin and set it up, but 500 errors will appear.

[root@master logs]# tail error.log 
        /usr/local/apisix/apisix/script.lua:52: in function 'run'
        /usr/local/apisix/apisix/init.lua:487: in function 'http_access_phase'
        access_by_lua(nginx.conf:168):2: in main chunk, client: 10.211.55.2, server: , request: "GET /test HTTP/1.1", host: "centos-linux:9080"
2020/11/10 14:28:40 [error] 16584#16584: *2140379 lua entry thread aborted: runtime error: [string "route#327557467250622747"]:14: attempt to index upvalue 'request_id' (a nil value)
stack traceback:
coroutine 0:
        [string "route#327557467250622747"]: in function 'phase_func'
        /usr/local/apisix/apisix/script.lua:52: in function 'run'
        /usr/local/apisix/apisix/init.lua:487: in function 'http_access_phase'
        access_by_lua(nginx.conf:168):2: in main chunk, client: 10.211.55.2, server: , request: "GET /test HTTP/1.1", host: "centos-linux:9080"
[root@master logs]# 

etcd.zip This is my ETCD DB

jinpy666 avatar Nov 10 '20 07:11 jinpy666

@jinpy666 Have you enabled request-id plugin?

spacewander avatar Nov 10 '20 08:11 spacewander

@jinpy666 Have you enabled request-id plugin?

Yes

jinpy666 avatar Nov 10 '20 08:11 jinpy666

How you get the 500 error?

spacewander avatar Nov 10 '20 08:11 spacewander