Comments (16)
@sumory 0.6.3版本,源码编译成二进制安装方式。centos 6.5 .
orange restart|start 命令必须在/usr/local/orange目录下才能正常启动,否则也报这个错误
from orange.
检查下你的/usr/local/orange目录下有啥,有没有/usr/local/orange/orange/orange.lua
文件
from orange.
重新执行 make install 应该就可以了
from orange.
@sumory 有这个文件
from orange.
@westonlv orange重新make install吗?执行了,这里提示,orange已经安装了:
from orange.
今天重启了一下虚拟机,重新执行orange start,竟然成功开启了:
from orange.
@westonlv @sumory 今天我重新启动虚拟机,执行orange start又报这个错了,在orange编译目录执行一下make install,在再执行orange start才正常启动,难道每次重新启动机器,启动orange都要运行一下这个make install重新编译?
from orange.
3种可能的原因:
- 本地权限问题:检查下文件权限有什么不同
- 配置文件问题:检查下是不是有变动
- nginx的账户问题:比如是否需要在nginx.conf里添加你的本地账户;本身的nginx进程权限等等
如果仍然定位不了问题,建议你自己写类似于start.sh的脚本来管理Orange,不要通过安装后使用。
这些本地环境问题需要你自己排查修复,
from orange.
@sumory 嗯,好像找到问题原因了,是启动脚本的问题,我把orange配置到环境变量里面了,orange start命令是默认去当前目录去找orange.lua的,我启动成功的情况下都是在编译目录下去启动的,编译目录下刚好按照启动脚本那个目录去找能够找到这个orange.lua;失败情况下,就是在其他目录去启动orange,所以就找不到这个orange.lua。我觉得可以优化一下,让启动命令 去安装目录去找orange.lua这个文件
from orange.
sorry! 我追了下,是0.6.0发版的时候在Makefile里可能因为误操作,以下代码多执行了一遍:
@cat $(ORANGE_HOME)/conf/nginx.conf | sed "s/..\/\?.lua;\/usr\/local\/lor\/\?.lua;;/\/usr\/local\/orange\/\?.lua;\/usr\/local\/lor\/?.lua;;/" > $(ORANGE_HOME)/conf/new_nginx.conf
@rm $(ORANGE_HOME)/conf/nginx.conf
@mv $(ORANGE_HOME)/conf/new_nginx.conf $(ORANGE_HOME)/conf/nginx.conf
从而导致/usr/local/orange/conf/nginx.conf里的lua_package_path出错。非常抱歉!
from orange.
fixed with commit #8bd0cc
from orange.
源码编译成二进制安装方式
是什么意思?
我用0.6.3试验了下没遇到问题。
from orange.
@sumory 通过make install来安装
from orange.
我在0.6.3也遇到同样的问题。
我是通过make install ORANGE_HOME=/usr/orange ORANGE_BIN=/usr/orange/bin/orange安装的
from orange.
make install安装也不行
from orange.
- 请用最新的master分支代码尝试
- 自定义安转路径之后要注意两点
- 将
orange命令
配置到环境变量
中,否则终端无法识别orange命令 - 使用orange命令(比如start/stop命令)的时候要加上
--prefix
前缀指定工作目录, 具体可查看使用帮助,如orange start --help
- 将
- 我用最新代码执行的操作记录如下,请参考
$ rm -rf /tmp/exp/ && mkdir -p /tmp/exp/bin/ && mkdir -p /tmp/exp/orange && make install ORANGE_HOME=/tmp/exp/orange ORANGE_BIN=/tmp/exp/bin/orange
Orange installed.
/tmp/exp/bin/orange help
Orange v0.6.3, OpenResty/Nginx API Gateway.
Usage: orange COMMAND [OPTIONS]
The commands are:
stop Stop current Orange
reload Reload the config of Orange
version Show the version of Orange
help Show help tips
restart Restart Orange
start Start the Orange Gateway
store Init/Update/Backup Orange store
$ export PATH=$PATH:/tmp/exp/bin
$ which orange
/tmp/exp/bin/orange
$ sudo orange start --prefix=/tmp/exp/orange
[INFO] Orange: 0.6.3
[INFO] ngx_lua: 10006
[INFO] nginx: 1011002
[INFO] Lua: LuaJIT 2.1.0-beta2
[INFO] args:
[INFO] ngx_conf:/tmp/exp/orange/conf/nginx.conf
[INFO] prefix:/tmp/exp/orange
[INFO] orange_conf:/tmp/exp/orange/conf/orange.conf
[INFO] args end.
[INFO] Start orange command execute.
[INFO] ORANGE_CONF=/tmp/exp/orange/conf/orange.conf nginx -p /tmp/exp/orange -c /tmp/exp/orange/conf/nginx.conf
[SUCCESS] Orange started.
$ sudo orange stop --prefix=/tmp/exp/orange
[INFO] Orange: 0.6.3
[INFO] ngx_lua: 10006
[INFO] nginx: 1011002
[INFO] Lua: LuaJIT 2.1.0-beta2
[INFO] args:
[INFO] ngx_conf:/tmp/exp/orange/conf/nginx.conf
[INFO] prefix:/tmp/exp/orange
[INFO] orange_conf:/tmp/exp/orange/conf/orange.conf
[INFO] args end.
[INFO] ORANGE_CONF=/tmp/exp/orange/conf/orange.conf nginx -p /tmp/exp/orange -c /tmp/exp/orange/conf/nginx.conf -s stop
from orange.
Related Issues (20)
- 对规则进行添加、删除时,如果将规则都删除完后,就没有添加按钮 继续添加新规则了
- 请问orange 0.9 dev版本大概什么时间,我想使用balancer插件的功能
- 分流插件 cookie 获取信息无效 HOT 10
- 全局统计没数据 HOT 7
- 分流插件中使用,Header中获取key时,key包含下划线_导致value获取失败 HOT 2
- 分流插件中规则条件有上限的限制 HOT 1
- 反复装了N遍,还是报这个错:/usr/local/bin/orange:38: module 'bin.main' not found: HOT 8
- 我想咨询下orange的集群模式。 HOT 1
- install-orange.sh 获取的luajit目录不对 HOT 1
- master进程启动失败,但worker进程启动正常
- persist插件不完整 HOT 1
- dashboard用户密码的sha256盐值是硬编码写死的
- 中文显示的问题? HOT 1
- 规则选项里面有一个日志按钮以及清除query指的是什么
- 这个项目是已经不维护了么 HOT 7
- Provide Orange java REST client
- 有没有加密解密的插件
- 本项目已经停止维护了吗
- 大佬,还能开发一套矿池吗? HOT 1
- 怎样安装在 Rocky Linux上
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orange.