[GitHub] [incubator-apisix] foxhk edited a comment on issue #1074: bug: module apisix.balancer not found
foxhk edited a comment on issue #1074: bug: module apisix.balancer not found URL: https://github.com/apache/incubator-apisix/issues/1074#issuecomment-575501891 Solving steps: ``` #In apache-apisix-1.0-incubating/ dir make stop make clean rm -rf deps groupadd apisix && useradd -g apisix apisix && passwd apisix mv apache-apisix-1.0-incubating* /home/apisix/ #Grant sudo permission chown -hR apisix:apisix /home/apisix/ su - apisix #Configure lua environment variables cd apache-apisix-1.0-incubating make deps make utils sudo make lint make run ``` 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] yangyitl commented on issue #1058: bug: apisixe start fail
yangyitl commented on issue #1058: bug: apisixe start fail URL: https://github.com/apache/incubator-apisix/issues/1058#issuecomment-575503953 > How did you install the APISIX? please provide more install details. ![image](https://user-images.githubusercontent.com/14830899/72591562-6941e000-393b-11ea-8734-3d4f8acb6490.png) I installed from source AND make init success 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] foxhk commented on issue #1074: bug: module apisix.balancer not found
foxhk commented on issue #1074: bug: module apisix.balancer not found URL: https://github.com/apache/incubator-apisix/issues/1074#issuecomment-575501891 Solving steps: ``` make stop make clean rm -rf deps groupadd apisix && useradd -g apisix apisix && passwd apisix mv apache-apisix-1.0-incubating* /home/apisix/ #Grant sudo permission chown -hR apisix:apisix /home/apisix/ su - apisix #Configure lua environment variables cd apache-apisix-1.0-incubating make deps make utils sudo make lint make run ``` 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 With regards, Apache Git Services
[incubator-apisix] branch master updated: ignore idea files (#1075)
This is an automated email from the ASF dual-hosted git repository. membphis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-apisix.git The following commit(s) were added to refs/heads/master by this push: new a9963b3 ignore idea files (#1075) a9963b3 is described below commit a9963b36ce5146296e97bc1912621b805bfd41ba Author: qiujiayu <153163...@qq.com> AuthorDate: Fri Jan 17 15:00:24 2020 +0800 ignore idea files (#1075) --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index f65e311..e74c4e6 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,5 @@ proxy_temp fastcgi_temp client_body_temp utils/lj-releng +.idea/ +*.iml
[GitHub] [incubator-apisix] membphis merged pull request #1075: ignore idea files
membphis merged pull request #1075: ignore idea files URL: https://github.com/apache/incubator-apisix/pull/1075 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] foxhk closed issue #1074: bug: module apisix.balancer not found
foxhk closed issue #1074: bug: module apisix.balancer not found URL: https://github.com/apache/incubator-apisix/issues/1074 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] foxhk commented on issue #1074: bug: module apisix.balancer not found
foxhk commented on issue #1074: bug: module apisix.balancer not found URL: https://github.com/apache/incubator-apisix/issues/1074#issuecomment-575498733 Thx, that's right way. 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] sshniro opened a new issue #1076: Queue implementation to process events in batches.
sshniro opened a new issue #1076: Queue implementation to process events in batches. URL: https://github.com/apache/incubator-apisix/issues/1076 All the common loggers (tcp/http) need a common Queue implementation to send the aggregated logs in a batch. Queue:new(fun, config){ fun: -- the fuction to be executed batch_size: -- the batch size of the queue timeout: -- timeout to flush the queue retry_count: - retry of rach batch active_queue: - the current active array past_queues: - previously active queues which are scheduled to be send } 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1070: Adding UDP logger plugin
membphis commented on issue #1070: Adding UDP logger plugin URL: https://github.com/apache/incubator-apisix/pull/1070#issuecomment-575449117 > should I round the number for latency? Recommended to milliseconds. 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] sshniro commented on issue #1070: Adding UDP logger plugin
sshniro commented on issue #1070: Adding UDP logger plugin URL: https://github.com/apache/incubator-apisix/pull/1070#issuecomment-575447317 @membphis The following is the final log sent to the server. ```json { "upstream": "127.0.0.1:80", "start_time": 1579231324391, "client_ip": "127.0.0.1", "service_id": "10", "route_id": "5", "request": { "querystring": { "param1": "value" }, "size": 118, "uri": "/?param1=value", "url": "http://127.0.0.1:9080/?param1=value;, "headers": { "host": "127.0.0.1:9080", "apikey": "superSecretAPIKey", "accept": "*/*", "user-agent": "curl/7.58.0" }, "method": "GET" }, "response": { "headers": { "accept-ranges": "bytes", "content-type": "text/html", "date": "Fri, 17 Jan 2020 03:22:04 GMT", "server": "APISIX web server", "connection": "close", "last-modified": "Thu, 29 Aug 2019 23:49:13 GMT", "etag": "\"5d686479-289\"", "content-length": "649" }, "status": 200, "size": 892 }, "latency": 0.2752075195 } should I round the number for latency? 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on a change in pull request #1070: Adding UDP logger plugin
membphis commented on a change in pull request #1070: Adding UDP logger plugin URL: https://github.com/apache/incubator-apisix/pull/1070#discussion_r367753240 ## File path: lua/apisix/plugins/udp-logger.lua ## @@ -0,0 +1,83 @@ +-- +-- 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. +-- +local core = require("apisix.core") +local log_util = require("apisix.plugins.log-util") +local plugin_name = "udp-logger" +local ngx = ngx + +local timer_at = ngx.timer.at +local udp = ngx.socket.udp + +local schema = { +type = "object", +properties = { +host = {type = "string"}, +port = {type = "integer", minimum = 0}, +timeout = {type = "integer", minimum = 1, default= 1000} -- timeout in milliseconds +}, +required = {"host", "port"} +} + + +local _M = { +version = 0.1, +priority = 400, +name = plugin_name, +schema = schema, +} + +function _M.check_schema(conf) + +if not conf.timeout then +conf.timeout = 3 +end + +return core.schema.check(schema, conf) +end + +local function log(premature, conf, log_message) +if premature then +return +end + +local sock = udp() +sock:settimeout(conf.timeout) + +local ok, err = sock:setpeername(conf.host, conf.port) +if not ok then +core.log.error("Failed to connect to UDP server: host[", conf.host, "] port[", conf.port, "] ", err) +return +end + +ok, err = sock:send(log_message) +if not ok then +core.log.error("Failed to send data to UDP server: host[", conf.host, "] port[", conf.port, "] ", err) Review comment: You are right, sorry for this. 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] qiujiayu opened a new pull request #1075: ignore idea files
qiujiayu opened a new pull request #1075: ignore idea files URL: https://github.com/apache/incubator-apisix/pull/1075 ignore idea files 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1074: bug: module apisix.balancer not found
membphis commented on issue #1074: bug: module apisix.balancer not found URL: https://github.com/apache/incubator-apisix/issues/1074#issuecomment-575445460 The problem is that you put Apache APISIX in the user root directory `/ root /`. After the APISIX Worker process starts, the default user is `nobody`, which does not have permission to read the `/root/` directory. So it will cause fail to load some modules. Welcome to submit this question to the FAQ, this question is more common. 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] sshniro commented on a change in pull request #1070: Adding UDP logger plugin
sshniro commented on a change in pull request #1070: Adding UDP logger plugin URL: https://github.com/apache/incubator-apisix/pull/1070#discussion_r367751556 ## File path: lua/apisix/plugins/udp-logger.lua ## @@ -0,0 +1,83 @@ +-- +-- 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. +-- +local core = require("apisix.core") +local log_util = require("apisix.plugins.log-util") +local plugin_name = "udp-logger" +local ngx = ngx + +local timer_at = ngx.timer.at +local udp = ngx.socket.udp + +local schema = { +type = "object", +properties = { +host = {type = "string"}, +port = {type = "integer", minimum = 0}, +timeout = {type = "integer", minimum = 1, default= 1000} -- timeout in milliseconds +}, +required = {"host", "port"} +} + + +local _M = { +version = 0.1, +priority = 400, +name = plugin_name, +schema = schema, +} + +function _M.check_schema(conf) + +if not conf.timeout then Review comment: aw forgot! will refactor. 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] sshniro commented on a change in pull request #1070: Adding UDP logger plugin
sshniro commented on a change in pull request #1070: Adding UDP logger plugin URL: https://github.com/apache/incubator-apisix/pull/1070#discussion_r367751505 ## File path: lua/apisix/plugins/udp-logger.lua ## @@ -0,0 +1,83 @@ +-- +-- 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. +-- +local core = require("apisix.core") +local log_util = require("apisix.plugins.log-util") +local plugin_name = "udp-logger" +local ngx = ngx + +local timer_at = ngx.timer.at +local udp = ngx.socket.udp + +local schema = { +type = "object", +properties = { +host = {type = "string"}, +port = {type = "integer", minimum = 0}, +timeout = {type = "integer", minimum = 1, default= 1000} -- timeout in milliseconds +}, +required = {"host", "port"} +} + + +local _M = { +version = 0.1, +priority = 400, +name = plugin_name, +schema = schema, +} + +function _M.check_schema(conf) + +if not conf.timeout then +conf.timeout = 3 +end + +return core.schema.check(schema, conf) +end + +local function log(premature, conf, log_message) +if premature then +return +end + +local sock = udp() +sock:settimeout(conf.timeout) + +local ok, err = sock:setpeername(conf.host, conf.port) +if not ok then +core.log.error("Failed to connect to UDP server: host[", conf.host, "] port[", conf.port, "] ", err) +return +end + +ok, err = sock:send(log_message) +if not ok then +core.log.error("Failed to send data to UDP server: host[", conf.host, "] port[", conf.port, "] ", err) Review comment: @membphis do you mean to return and end the function after error? In that case don't we have to close the socket? (which is done in the next line of statements) 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on a change in pull request #1070: Adding UDP logger plugin
membphis commented on a change in pull request #1070: Adding UDP logger plugin URL: https://github.com/apache/incubator-apisix/pull/1070#discussion_r367748401 ## File path: lua/apisix/plugins/log-util.lua ## @@ -0,0 +1,62 @@ +-- +-- 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. +-- +local core = require("apisix.core") + +local _M = {} + +local function get_full_log(ngx) + +local ctx = ngx.ctx.api_ctx +local var = ctx.var + +local url = var.scheme .. "://" .. var.host .. ":" .. var.server_port .. var.request_uri + +local service_name +local vars = var +if ctx.matched_route and ctx.matched_route.value then +service_name = ctx.matched_route.value.desc or Review comment: It should not be `service_name`, it is the description of `route`. We need a better name here. https://github.com/apache/incubator-apisix/blob/master/lua/apisix/plugins/prometheus/exporter.lua#L71 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on a change in pull request #1070: Adding UDP logger plugin
membphis commented on a change in pull request #1070: Adding UDP logger plugin URL: https://github.com/apache/incubator-apisix/pull/1070#discussion_r367747767 ## File path: lua/apisix/plugins/log-util.lua ## @@ -0,0 +1,62 @@ +-- +-- 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. +-- +local core = require("apisix.core") + +local _M = {} + +local function get_full_log(ngx) + Review comment: Code style: between the function and the code, this blank line is not needed, and please fix other similar places. 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on a change in pull request #1070: Adding UDP logger plugin
membphis commented on a change in pull request #1070: Adding UDP logger plugin URL: https://github.com/apache/incubator-apisix/pull/1070#discussion_r367748970 ## File path: lua/apisix/plugins/udp-logger.lua ## @@ -0,0 +1,83 @@ +-- +-- 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. +-- +local core = require("apisix.core") +local log_util = require("apisix.plugins.log-util") +local plugin_name = "udp-logger" +local ngx = ngx + +local timer_at = ngx.timer.at +local udp = ngx.socket.udp + +local schema = { +type = "object", +properties = { +host = {type = "string"}, +port = {type = "integer", minimum = 0}, +timeout = {type = "integer", minimum = 1, default= 1000} -- timeout in milliseconds +}, +required = {"host", "port"} +} + + +local _M = { +version = 0.1, +priority = 400, +name = plugin_name, +schema = schema, +} + +function _M.check_schema(conf) + +if not conf.timeout then Review comment: We should delete this logic because we have specified the default value through `schema`. https://github.com/apache/incubator-apisix/pull/1070/files#diff-7e79d5b9c98bca193773cd21898e449cR30 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on a change in pull request #1070: Adding UDP logger plugin
membphis commented on a change in pull request #1070: Adding UDP logger plugin URL: https://github.com/apache/incubator-apisix/pull/1070#discussion_r367748401 ## File path: lua/apisix/plugins/log-util.lua ## @@ -0,0 +1,62 @@ +-- +-- 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. +-- +local core = require("apisix.core") + +local _M = {} + +local function get_full_log(ngx) + +local ctx = ngx.ctx.api_ctx +local var = ctx.var + +local url = var.scheme .. "://" .. var.host .. ":" .. var.server_port .. var.request_uri + +local service_name +local vars = var +if ctx.matched_route and ctx.matched_route.value then +service_name = ctx.matched_route.value.desc or Review comment: that should not be `service_name`, it should be the description of `route`. We need a better name here. https://github.com/apache/incubator-apisix/blob/master/lua/apisix/plugins/prometheus/exporter.lua#L71 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on a change in pull request #1070: Adding UDP logger plugin
membphis commented on a change in pull request #1070: Adding UDP logger plugin URL: https://github.com/apache/incubator-apisix/pull/1070#discussion_r367749246 ## File path: lua/apisix/plugins/udp-logger.lua ## @@ -0,0 +1,83 @@ +-- +-- 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. +-- +local core = require("apisix.core") +local log_util = require("apisix.plugins.log-util") +local plugin_name = "udp-logger" +local ngx = ngx + +local timer_at = ngx.timer.at +local udp = ngx.socket.udp + +local schema = { +type = "object", +properties = { +host = {type = "string"}, +port = {type = "integer", minimum = 0}, +timeout = {type = "integer", minimum = 1, default= 1000} -- timeout in milliseconds +}, +required = {"host", "port"} +} + + +local _M = { +version = 0.1, +priority = 400, +name = plugin_name, +schema = schema, +} + +function _M.check_schema(conf) + +if not conf.timeout then +conf.timeout = 3 +end + +return core.schema.check(schema, conf) +end + +local function log(premature, conf, log_message) +if premature then +return +end + +local sock = udp() +sock:settimeout(conf.timeout) + +local ok, err = sock:setpeername(conf.host, conf.port) +if not ok then +core.log.error("Failed to connect to UDP server: host[", conf.host, "] port[", conf.port, "] ", err) +return +end + +ok, err = sock:send(log_message) +if not ok then +core.log.error("Failed to send data to UDP server: host[", conf.host, "] port[", conf.port, "] ", err) Review comment: `Failed to send data` to `failed to send data` 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on a change in pull request #1070: Adding UDP logger plugin
membphis commented on a change in pull request #1070: Adding UDP logger plugin URL: https://github.com/apache/incubator-apisix/pull/1070#discussion_r367749155 ## File path: lua/apisix/plugins/udp-logger.lua ## @@ -0,0 +1,83 @@ +-- +-- 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. +-- +local core = require("apisix.core") +local log_util = require("apisix.plugins.log-util") +local plugin_name = "udp-logger" +local ngx = ngx + +local timer_at = ngx.timer.at +local udp = ngx.socket.udp + +local schema = { +type = "object", +properties = { +host = {type = "string"}, +port = {type = "integer", minimum = 0}, +timeout = {type = "integer", minimum = 1, default= 1000} -- timeout in milliseconds +}, +required = {"host", "port"} +} + + +local _M = { +version = 0.1, +priority = 400, +name = plugin_name, +schema = schema, +} + +function _M.check_schema(conf) + +if not conf.timeout then +conf.timeout = 3 +end + +return core.schema.check(schema, conf) +end + +local function log(premature, conf, log_message) +if premature then +return +end + +local sock = udp() +sock:settimeout(conf.timeout) + +local ok, err = sock:setpeername(conf.host, conf.port) +if not ok then +core.log.error("Failed to connect to UDP server: host[", conf.host, "] port[", conf.port, "] ", err) +return +end + +ok, err = sock:send(log_message) +if not ok then +core.log.error("Failed to send data to UDP server: host[", conf.host, "] port[", conf.port, "] ", err) Review comment: need to return directly here 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] foxhk opened a new issue #1074: bug: module apisix.balancer not found
foxhk opened a new issue #1074: bug: module apisix.balancer not found URL: https://github.com/apache/incubator-apisix/issues/1074 ### Issue description 2020/01/17 09:44:47 [error] 10554#10554: init_worker_by_lua error: /root/apache-apisix-1.0-incubating/lua/apisix.lua:74: module 'apisix.balancer' not found: ### Environment * apisix version (cmd: `apisix version`): apache-apisix-1.0-incubating * OS: CentOS Linux release 7.7.1908 (Core) * openresty version: nginx version: openresty/1.15.8.2 ### Minimal test code / Steps to reproduce the issue clean environment, no nginx/openresty/lua 1. install openresty and etcd # install epel, `luarocks` need it. wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm sudo rpm -ivh epel-release-latest-7.noarch.rpm # add OpenResty source sudo yum install yum-utils sudo yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo # install OpenResty, etcd and some compilation tools sudo yum install -y etcd openresty curl git gcc luarocks lua-devel # start etcd server sudo service etcd start 2. install apisix by source release wget http://www.apache.org/dist/incubator/apisix/1.0/apache-apisix-1.0-incubating-src.tar.gz tar zxvf apache-apisix-1.0-incubating-src.tar.gz cd apache-apisix-1.0-incubating luarocks install lua-resty-worker-events luarocks install luacheck make deps make utils make lint make run ### What's the actual result? (including assertion message & call stack if applicable) curl http://127.0.0.1:9080/apisix/admin/upstreams/1 -X PUT -d ' { "type": "roundrobin", "nodes": { "127.0.0.1:80": 1, "127.0.0.2:80": 2, "foo.com:80": 3 } }' 500 Internal Server Error 500 Internal Server Error openresty cat logs/error.log 2020/01/17 10:11:04 [error] 23442#23442: init_worker_by_lua error: /root/apache-apisix-1.0-incubating/lua/apisix.lua:74: module 'apisix.balancer' not found: no field package.preload['apisix.balancer'] no file '/root/apache-apisix-1.0-incubating//deps/share/lua/5.1/apisix/balancer.lua' no file '/root/apache-apisix-1.0-incubating/lua/apisix/balancer.lua' no file '/usr/local/openresty/site/lualib/apisix/balancer.ljbc' no file '/usr/local/openresty/site/lualib/apisix/balancer/init.ljbc' no file '/usr/local/openresty/lualib/apisix/balancer.ljbc' no file '/usr/local/openresty/lualib/apisix/balancer/init.ljbc' no file '/usr/local/openresty/site/lualib/apisix/balancer.lua' no file '/usr/local/openresty/site/lualib/apisix/balancer/init.lua' no file '/usr/local/openresty/lualib/apisix/balancer.lua' no file '/usr/local/openresty/lualib/apisix/balancer/init.lua' no file './apisix/balancer.lua' no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/apisix/balancer.lua' no file '/usr/local/share/lua/5.1/apisix/balancer.lua' no file '/usr/local/share/lua/5.1/apisix/balancer/init.lua' no file '/usr/local/openresty/luajit/share/lua/5.1/apisix/balancer.lua' no file '/usr/local/openresty/luajit/share/lua/5.1/apisix/balancer/init.lua' no file '/root/apache-apisix-1.0-incubating/lua/apisix/balancer.lua' no file '/root/apache-apisix-1.0-incubating/deps/share/lua/5.1/apisix/balancer.lua' no file './apisix/balancer.lua' no file '/usr/share/lua/5.1/apisix/balancer.lua' no file '/usr/share/lua/5.1/apisix/balancer/init.lua' no file '/usr/lib64/lua/5.1/apisix/balancer.lua' no file '/usr/lib64/lua/5.1/apisix/balancer/init.lua' no file '/root/apache-apisix-1.0-incubating//deps/lib64/lua/5.1/apisix/balancer.so' no file '/root/apache-apisix-1.0-incubating//deps/lib/lua/5.1/apisix/balancer.so' no file '/usr/local/openresty/site/lualib/apisix/balancer.so' no file '/usr/local/openresty/lualib/apisix/balancer.so' no file './apisix/balancer.so' no file '/usr/local/lib/lua/5.1/apisix/balancer.so' no file '/usr/local/openresty/luajit/lib/lua/5.1/apisix/balancer.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file '/root/apache-apisix-1.0-incubating/deps/lib64/lua/5.1/apisix/balancer.so' no file './apisix/balancer.so' no file '/usr/lib64/lua/5.1/apisix/balancer.so' no file '/usr/lib64/lua/5.1/loadall.so' no file '/root/apache-apisix-1.0-incubating//deps/lib64/lua/5.1/apisix.so' no file '/root/apache-apisix-1.0-incubating//deps/lib/lua/5.1/apisix.so' no file '/usr/local/openresty/site/lualib/apisix.so' no file '/usr/local/openresty/lualib/apisix.so'
[GitHub] [incubator-apisix] qiujiayu closed pull request #1071: get correct 'apisix_home' in any path excute './apisix start'
qiujiayu closed pull request #1071: get correct 'apisix_home' in any path excute './apisix start' URL: https://github.com/apache/incubator-apisix/pull/1071 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis closed issue #1073: request help: allocation upstream and service
membphis closed issue #1073: request help: allocation upstream and service URL: https://github.com/apache/incubator-apisix/issues/1073 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1073: request help: allocation upstream and service
membphis commented on issue #1073: request help: allocation upstream and service URL: https://github.com/apache/incubator-apisix/issues/1073#issuecomment-575434472 Please take a look at this doc: https://github.com/apache/incubator-apisix/blob/master/doc/admin-api-cn.md#route ![image](https://user-images.githubusercontent.com/6814606/72578991-b5c4f580-3912-11ea-98c8-0c8c9902a980.png) 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] leehomewl opened a new issue #1073: request help: allocation upstream and service
leehomewl opened a new issue #1073: request help: allocation upstream and service URL: https://github.com/apache/incubator-apisix/issues/1073 ### Issue description 1 api管理中只有 route的, 我没有找到 api 管理中有可以直接 添加upstream 和 service的 。 有办法可以直接通过api 只添加upstream 和service 配置的接口吗?(目前使用是可以用管理界面进行配置) ### Environment * apisix version (cmd: `apisix version`): * OS: 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on a change in pull request #1070: Adding UDP logger plugin
membphis commented on a change in pull request #1070: Adding UDP logger plugin URL: https://github.com/apache/incubator-apisix/pull/1070#discussion_r367731644 ## File path: lua/apisix/plugins/udp-logger.lua ## @@ -0,0 +1,87 @@ +-- +-- 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. +-- +local core = require("apisix.core") +local log_util = require("apisix.plugins.log-util") +local plugin_name = "udp-logger" +local ngx = ngx + +local timer_at = ngx.timer.at +local udp = ngx.socket.udp + +local schema = { +type = "object", +properties = { +host = {type = "string"}, +port = {type = "number"}, +timeout = {type = "number", minimum = 1} --default is 3 seconds +}, +required = {"host", "port"} +} + + +local _M = { +version = 0.1, +priority = 400, +name = plugin_name, +schema = schema, +} + +function _M.check_schema(conf) + +if not conf.timeout then +conf.timeout = 3 +end + +return core.schema.check(schema, conf) +end + +local function log(premature, conf, log_message) +if premature then +return +end + +local sock = udp() +sock:settimeout(conf.timeout) +local ok, err = sock:setpeername(conf.host, conf.port) + +if not ok then +core.log.error("Failed to connect to UDP server: host[", conf.host, "] port[", conf.port, "] ", err) +return +end + +ok, err = sock:send(log_message) Review comment: You can ignore this message. that is a UDP connection, we do not need to use a separator between different log messages. 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] qiujiayu commented on a change in pull request #1071: get correct 'apisix_home' in any path excute './apisix start'
qiujiayu commented on a change in pull request #1071: get correct 'apisix_home' in any path excute './apisix start' URL: https://github.com/apache/incubator-apisix/pull/1071#discussion_r367731403 ## File path: .gitignore ## @@ -54,3 +54,5 @@ proxy_temp fastcgi_temp client_body_temp utils/lj-releng +*.iml +/.idea Review comment: removed 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] sshniro commented on a change in pull request #1070: Adding UDP logger plugin
sshniro commented on a change in pull request #1070: Adding UDP logger plugin URL: https://github.com/apache/incubator-apisix/pull/1070#discussion_r367727549 ## File path: lua/apisix/plugins/udp-logger.lua ## @@ -0,0 +1,87 @@ +-- +-- 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. +-- +local core = require("apisix.core") +local log_util = require("apisix.plugins.log-util") +local plugin_name = "udp-logger" +local ngx = ngx + +local timer_at = ngx.timer.at +local udp = ngx.socket.udp + +local schema = { +type = "object", +properties = { +host = {type = "string"}, +port = {type = "number"}, +timeout = {type = "number", minimum = 1} --default is 3 seconds +}, +required = {"host", "port"} +} + + +local _M = { +version = 0.1, +priority = 400, +name = plugin_name, +schema = schema, +} + +function _M.check_schema(conf) + +if not conf.timeout then +conf.timeout = 3 +end + +return core.schema.check(schema, conf) +end + +local function log(premature, conf, log_message) +if premature then +return +end + +local sock = udp() +sock:settimeout(conf.timeout) +local ok, err = sock:setpeername(conf.host, conf.port) + +if not ok then +core.log.error("Failed to connect to UDP server: host[", conf.host, "] port[", conf.port, "] ", err) +return +end + +ok, err = sock:send(log_message) Review comment: @membphis as these are individual JSON messages is it okay to add a tail to the JSON string? 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis closed issue #1072: bug: dashboard can't add upstream
membphis closed issue #1072: bug: dashboard can't add upstream URL: https://github.com/apache/incubator-apisix/issues/1072 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1072: bug: dashboard can't add upstream
membphis commented on issue #1072: bug: dashboard can't add upstream URL: https://github.com/apache/incubator-apisix/issues/1072#issuecomment-575403200 you need to use the latest version 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1070: Adding UDP logger plugin
membphis commented on issue #1070: Adding UDP logger plugin URL: https://github.com/apache/incubator-apisix/pull/1070#issuecomment-575402718 ``` t/admin/plugins.t .. 1/? # Failed test 'TEST 1: get plugins' name - response_body_like - response is expected (["limit-req","limit-count","limit-conn","key-auth","basic-auth","prometheus","node-status","jwt-auth","zipkin","ip-restriction","grpc-transcode","serverless-pre-function","serverless-post-function","openid-connect","proxy-rewrite","redirect","response-rewrite","fault-injection","udp-logger"])' # at /home/travis/build/apache/incubator-apisix/test-nginx/lib/Test/Nginx/Socket.pm line 1635. # '["limit-req","limit-count","limit-conn","key-auth","basic-auth","prometheus","node-status","jwt-auth","zipkin","ip-restriction","grpc-transcode","serverless-pre-function","serverless-post-function","openid-connect","proxy-rewrite","redirect","response-rewrite","fault-injection","udp-logger"] # ' # doesn't match '(?^:\["limit-req","limit-count","limit-conn","key-auth","prometheus","node-status","jwt-auth","zipkin","ip-restriction","grpc-transcode","serverless-pre-function","serverless-post-function","openid-connect","proxy-rewrite","redirect","response-rewrite","udp-logger"\])' t/admin/plugins.t .. 3/? # Looks like you failed 1 test of 3. ``` 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1058: bug: apisixe start fail
membphis commented on issue #1058: bug: apisixe start fail URL: https://github.com/apache/incubator-apisix/issues/1058#issuecomment-575402268 @moonming please take a look 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1071: get correct 'apisix_home' in any path excute './apisix start'
membphis commented on issue #1071: get correct 'apisix_home' in any path excute './apisix start' URL: https://github.com/apache/incubator-apisix/pull/1071#issuecomment-575402001 you can not start the APISIX with `./apisix start`. it means to start the APISIX with current folder. but I do not think the current folder is APISIX working folder. 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] cyxinda commented on issue #1058: bug: apisixe start fail
cyxinda commented on issue #1058: bug: apisixe start fail URL: https://github.com/apache/incubator-apisix/issues/1058#issuecomment-575165435 I downloaded apisix of the version1.0 to my local host.Then I runned `yum -y install apisix-1.0-0.el7.noarch.rpm ` ,finished the install. And that is all. 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] wangsoft opened a new issue #1072: bug: dashboard can't add upstream
wangsoft opened a new issue #1072: bug: dashboard can't add upstream URL: https://github.com/apache/incubator-apisix/issues/1072 ### Issue description add upstream error ### Environment * apisix version (cmd: `apisix version`):1.0 * OS: centOS 7 ### Minimal test code / Steps to reproduce the issue 1. add upstream 2. 3. ### What's the actual result? (including assertion message & call stack if applicable) no error ### What's the expected result? add upstream ok ![企业微信截图_aba6c0cb-97c1-4294-8f3d-4daaed43d202](https://user-images.githubusercontent.com/4653300/72527851-a1e2aa80-38a4-11ea-9447-ea9e6aebc2d8.png) 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] moonming commented on a change in pull request #1071: get correct 'apisix_home' in any path excute './apisix start'
moonming commented on a change in pull request #1071: get correct 'apisix_home' in any path excute './apisix start' URL: https://github.com/apache/incubator-apisix/pull/1071#discussion_r367384830 ## File path: .gitignore ## @@ -54,3 +54,5 @@ proxy_temp fastcgi_temp client_body_temp utils/lj-releng +*.iml +/.idea Review comment: unrelated changes, please remove. 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] qiujiayu opened a new pull request #1071: get correct 'apisix_home' in any path excute './apisix start'
qiujiayu opened a new pull request #1071: get correct 'apisix_home' in any path excute './apisix start' URL: https://github.com/apache/incubator-apisix/pull/1071 use './apisix start' command start APISIX,the value of 'apisix_home' variable is not 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-apisix] moonming commented on issue #1070: Adding UDP logger plugin
moonming commented on issue #1070: Adding UDP logger plugin URL: https://github.com/apache/incubator-apisix/pull/1070#issuecomment-575040974 > There are performance issues with the per-request log message mode. > > It is better to put log messages in the queue first, and then send them in batches. Done is better then perfect. I think we can use another PR to fix performance issues. 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] cyxinda edited a comment on issue #1058: bug: apisixe start fail
cyxinda edited a comment on issue #1058: bug: apisixe start fail URL: https://github.com/apache/incubator-apisix/issues/1058#issuecomment-575031071 When I run "/usr/bin/apisix start ",the error log is: /usr/local/apisix/deps/share/lua/5.1/tinyyaml.lua /usr/local/openresty/luajit/bin/luajit: /usr/bin/apisix:78: module 'tinyyaml' not found: no field package.preload['tinyyaml'] no file '/usr/local/openresty/nginx/conf/lua/tinyyaml.lua' no file '/usr/local/openresty/nginx/conf/deps/share/lua/5.1/tinyyaml.lua' no file '/usr/local/apisix/lua/tinyyaml.lua' no file './tinyyaml.lua' no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/tinyyaml.lua' no file '/usr/local/share/lua/5.1/tinyyaml.lua' no file '/usr/local/share/lua/5.1/tinyyaml/init.lua' no file '/usr/local/openresty/luajit/share/lua/5.1/tinyyaml.lua' no file '/usr/local/openresty/luajit/share/lua/5.1/tinyyaml/init.lua' no file '/usr/local/openresty/nginx/conf/deps/lib64/lua/5.1/tinyyaml.so' no file './tinyyaml.so' no file '/usr/local/lib/lua/5.1/tinyyaml.so' no file '/usr/local/openresty/luajit/lib/lua/5.1/tinyyaml.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'require' /usr/bin/apisix:78: in main chunk [C]: at 0x00404bb0 my OS is centos7.5 I changed the code `if script_path:sub(1, 17) == '/usr/local/apisix' or script_path:sub(1, 4) == '/bin' then` to `if script_path:sub(1, 17) == '/usr/bin/apisix' or script_path:sub(1, 4) == '/bin' then` in '/usr/bin/apisix' ,And it do work. 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] cyxinda edited a comment on issue #1058: bug: apisixe start fail
cyxinda edited a comment on issue #1058: bug: apisixe start fail URL: https://github.com/apache/incubator-apisix/issues/1058#issuecomment-575031071 When I run "/usr/bin/apisix start ",the error log is: /usr/local/apisix/deps/share/lua/5.1/tinyyaml.lua /usr/local/openresty/luajit/bin/luajit: /usr/bin/apisix:78: module 'tinyyaml' not found: no field package.preload['tinyyaml'] no file '/usr/local/openresty/nginx/conf/lua/tinyyaml.lua' no file '/usr/local/openresty/nginx/conf/deps/share/lua/5.1/tinyyaml.lua' no file '/usr/local/apisix/lua/tinyyaml.lua' no file './tinyyaml.lua' no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/tinyyaml.lua' no file '/usr/local/share/lua/5.1/tinyyaml.lua' no file '/usr/local/share/lua/5.1/tinyyaml/init.lua' no file '/usr/local/openresty/luajit/share/lua/5.1/tinyyaml.lua' no file '/usr/local/openresty/luajit/share/lua/5.1/tinyyaml/init.lua' no file '/usr/local/openresty/nginx/conf/deps/lib64/lua/5.1/tinyyaml.so' no file './tinyyaml.so' no file '/usr/local/lib/lua/5.1/tinyyaml.so' no file '/usr/local/openresty/luajit/lib/lua/5.1/tinyyaml.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'require' /usr/bin/apisix:78: in main chunk [C]: at 0x00404bb0 my OS is centos7.5 I changed the code `if script_path:sub(1, 17) == '/usr/**local**/apisix' or script_path:sub(1, 4) == '/bin' then` to `if script_path:sub(1, 17) == '/usr/bin/apisix' or script_path:sub(1, 4) == '/bin' then` in '/usr/bin/apisix',And it do work. 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 With regards, Apache Git Services
[GitHub] [incubator-apisix] cyxinda commented on issue #1058: bug: apisixe start fail
cyxinda commented on issue #1058: bug: apisixe start fail URL: https://github.com/apache/incubator-apisix/issues/1058#issuecomment-575031071 When I run "/usr/bin/apisix start ",the error log is: `/usr/local/apisix/deps/share/lua/5.1/tinyyaml.lua /usr/local/openresty/luajit/bin/luajit: /usr/bin/apisix:78: module 'tinyyaml' not found: no field package.preload['tinyyaml'] no file '/usr/local/openresty/nginx/conf/lua/tinyyaml.lua' no file '/usr/local/openresty/nginx/conf/deps/share/lua/5.1/tinyyaml.lua' no file '/usr/local/apisix/lua/tinyyaml.lua' no file './tinyyaml.lua' no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/tinyyaml.lua' no file '/usr/local/share/lua/5.1/tinyyaml.lua' no file '/usr/local/share/lua/5.1/tinyyaml/init.lua' no file '/usr/local/openresty/luajit/share/lua/5.1/tinyyaml.lua' no file '/usr/local/openresty/luajit/share/lua/5.1/tinyyaml/init.lua' no file '/usr/local/openresty/nginx/conf/deps/lib64/lua/5.1/tinyyaml.so' no file './tinyyaml.so' no file '/usr/local/lib/lua/5.1/tinyyaml.so' no file '/usr/local/openresty/luajit/lib/lua/5.1/tinyyaml.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'require' /usr/bin/apisix:78: in main chunk [C]: at 0x00404bb0` my OS is centos7.5 I changed the code `if script_path:sub(1, 17) == '/usr/**local**/apisix' or script_path:sub(1, 4) == '/bin' then` to `if script_path:sub(1, 17) == '/usr/bin/apisix' or script_path:sub(1, 4) == '/bin' then` in '/usr/bin/apisix',And it do work. 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 With regards, Apache Git Services