Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Can't turn on Skywalking #2662

Closed
jinpy666 opened this issue Nov 9, 2020 · 25 comments
Closed

bug: Can't turn on Skywalking #2662

jinpy666 opened this issue Nov 9, 2020 · 25 comments
Labels
wait for update wait for the author's response in this issue/PR

Comments

@jinpy666
Copy link

jinpy666 commented Nov 9, 2020

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

@spacewander
Copy link
Member

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

@spacewander spacewander added the wait for update wait for the author's response in this issue/PR label Nov 9, 2020
@jinpy666
Copy link
Author

jinpy666 commented Nov 9, 2020

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

image
It still doesn't open

@spacewander
Copy link
Member

It still doesn't open

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

@jinpy666
Copy link
Author

jinpy666 commented Nov 9, 2020

It still doesn't open

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

image

@spacewander
Copy link
Member

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?

@jinpy666
Copy link
Author

jinpy666 commented Nov 9, 2020

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.

@spacewander
Copy link
Member

Still can't reproduce with apisix restart.

@spacewander
Copy link
Member

Any error message in your logs/error.log?

@jinpy666
Copy link
Author

jinpy666 commented Nov 9, 2020

Any error message in your logs/error.log?

image

@membphis
Copy link
Member

membphis commented Nov 9, 2020

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

@jinpy666
Copy link
Author

jinpy666 commented Nov 9, 2020

@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

@membphis
Copy link
Member

membphis commented Nov 9, 2020

it works fine at my side. :(

image

@jinpy666
Copy link
Author

jinpy666 commented Nov 9, 2020

it works fine at my side. :(

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

image
image

@membphis
Copy link
Member

membphis commented Nov 9, 2020

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

@nic-chen
Copy link
Member

nic-chen commented Nov 9, 2020

@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

@membphis
Copy link
Member

@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

@jinpy666
Copy link
Author

@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

@spacewander
Copy link
Member

@jinpy666
Have you enabled request-id plugin?

@jinpy666
Copy link
Author

@jinpy666
Have you enabled request-id plugin?

Yes

@spacewander
Copy link
Member

How you get the 500 error?

@jinpy666
Copy link
Author

How you get the 500 error?

Yes, You can import my ETCD data and get my specific settings.

@spacewander
Copy link
Member

@jinpy666
Please don't make me guess.

@jinpy666
Copy link
Author

@jinpy666
Please don't make me guess.

image
This is how I use the plugin, is there no added condition, resulting in the generated script error?If so, the form validation needs to be strengthened.

@idbeta
Copy link
Contributor

idbeta commented Nov 13, 2020

@jinpy666 any update?
BTW, if you modify config.yaml to enable skywalking, you should add other original plugins too, you can get them from config-default.yaml, otherwise, other plugins will be disabled.

@jinpy666
Copy link
Author

@jinpy666 any update?
BTW, if you modify config.yaml to enable skywalking, you should add other original plugins too, you can get them from config-default.yaml, otherwise, other plugins will be disabled.

Em.. Why not merge the two configurations, with the highest priority of config.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wait for update wait for the author's response in this issue/PR
Projects
None yet
Development

No branches or pull requests

5 participants