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 2020/12/16 07:06:46 UTC
[GitHub] [apisix-dashboard] Caelebs opened a new issue #1058: 'schema-sync.sh' generates jsonschema data for apisix error
Caelebs opened a new issue #1058:
URL: https://github.com/apache/apisix-dashboard/issues/1058
# Bug report
[After modifying the plugin schema or creating a custom plugin in Apache APISIX, why can't I find it on the dashboard?](https://github.com/apache/apisix-dashboard/blob/master/docs/FAQ.md#4-after-modifying-the-plugin-schema-or-creating-a-custom-plugin-in-apache-apisix-why-cant-i-find-it-on-the-dashboard)
I added a custom plug-in, according to the requirements in the FAQ.md document, I need to manually operate to synchronize data in the dashboard, But when I execute the command given in the document, An error occurred and the file `schema.json` was not generated.
The error message output is as follows
```
[root@TEST13 apisix-dashboard-1210]# api/build-tools/schema-sync.sh /mnt/apisix-1210/apisix/
++ pwd
+ pwd=/mnt/apisix-dashboard-1210
+ [[ -n /mnt/apisix-1210/apisix/ ]]
+ [[ -d /mnt/apisix-1210/apisix/ ]]
+ path=/mnt/apisix-1210/apisix/
+ [[ -d /mnt/apisix-1210/apisix//apisix ]]
+ cp -R /mnt/apisix-1210/apisix// ./api/build-tools/apisix/
+ cd ./api/build-tools/
+ lua schema-sync.lua
lua: ./apisix/plugins/error-log-logger.lua:19: module 'ngx.errlog' not found:
no field package.preload['ngx.errlog']
no file './ngx/errlog.lua'
no file '/usr/share/lua/5.1/ngx/errlog.lua'
no file '/usr/share/lua/5.1/ngx/errlog/init.lua'
no file '/usr/lib64/lua/5.1/ngx/errlog.lua'
no file '/usr/lib64/lua/5.1/ngx/errlog/init.lua'
no file './ngx/errlog.so'
no file '/usr/lib64/lua/5.1/ngx/errlog.so'
no file '/usr/lib64/lua/5.1/loadall.so'
no file './ngx.so'
no file '/usr/lib64/lua/5.1/ngx.so'
no file '/usr/lib64/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
./apisix/plugins/error-log-logger.lua:19: in main chunk
[C]: in function 'require'
schema-sync.lua:135: in main chunk
[C]: ?
+ rm -rf ./api/build-tools/apisix/
+ echo 'sync success:'
sync success:
+ echo /mnt/apisix-dashboard-1210/api/conf/schema.json
/mnt/apisix-dashboard-1210/api/conf/schema.json
```
- OS: [e.g. macOS, Windows] CentOS Linux release 7.6.1810 (Core)
- Browser (if applies) [e.g. Chrome, Safari, Edge] Chrome/78.0.3904.108
- Version: [e.g. 2.0-rc3] apisix v2.1 && apisix-dashboard v2.1.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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] Caelebs closed issue #1058: 'schema-sync.sh' generates jsonschema data for apisix error
Posted by GitBox <gi...@apache.org>.
Caelebs closed issue #1058:
URL: https://github.com/apache/apisix-dashboard/issues/1058
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [apisix-dashboard] Caelebs commented on issue #1058: 'schema-sync.sh' generates jsonschema data for apisix error
Posted by GitBox <gi...@apache.org>.
Caelebs commented on issue #1058:
URL: https://github.com/apache/apisix-dashboard/issues/1058#issuecomment-745870904
So awkward, I checked the .history log and found that I pulled the master code, so this `error-log-logger` plugin appeared.
After Switch to version 2.1, the command execution returned successfully.
thanks
@nic-chen
```
[root@TEST13 apisix-dashboard-1210]# api/build-tools/schema-sync.sh /mnt/apisix-2.1/apisix/
++ pwd
+ pwd=/mnt/apisix-dashboard-1210
+ [[ -n /mnt/apisix-2.1/apisix/ ]]
+ [[ -d /mnt/apisix-2.1/apisix/ ]]
+ path=/mnt/apisix-2.1/apisix/
+ [[ -d /mnt/apisix-2.1/apisix//apisix ]]
+ cp -R /mnt/apisix-2.1/apisix// ./api/build-tools/apisix/
+ cd ./api/build-tools/
+ lua schema-sync.lua
+ cd ../../
+ rm -rf ./api/build-tools/apisix/
+ echo 'sync success:'
sync success:
+ echo /mnt/apisix-dashboard-1210/api/conf/schema.json
/mnt/apisix-dashboard-1210/api/conf/schema.json
```
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [apisix-dashboard] nic-chen commented on issue #1058: 'schema-sync.sh' generates jsonschema data for apisix error
Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #1058:
URL: https://github.com/apache/apisix-dashboard/issues/1058#issuecomment-745818643
@Caelebs
Apache APISIX 2.1 doesn't have the `error-log-logger` plugin.
you could download in on:
https://github.com/apache/apisix/releases/tag/2.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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org