Giter VIP home page Giter VIP logo

Comments (16)

zz0412 avatar zz0412 commented on May 26, 2024 1

@sumory 0.6.3版本,源码编译成二进制安装方式。centos 6.5 .
orange restart|start 命令必须在/usr/local/orange目录下才能正常启动,否则也报这个错误

from orange.

sumory avatar sumory commented on May 26, 2024

检查下你的/usr/local/orange目录下有啥,有没有/usr/local/orange/orange/orange.lua文件

from orange.

westonlv avatar westonlv commented on May 26, 2024

重新执行 make install 应该就可以了

from orange.

workcheng avatar workcheng commented on May 26, 2024

@sumory 有这个文件
image

from orange.

workcheng avatar workcheng commented on May 26, 2024

@westonlv orange重新make install吗?执行了,这里提示,orange已经安装了:
image

from orange.

workcheng avatar workcheng commented on May 26, 2024

今天重启了一下虚拟机,重新执行orange start,竟然成功开启了:
image

image

from orange.

workcheng avatar workcheng commented on May 26, 2024

@westonlv @sumory 今天我重新启动虚拟机,执行orange start又报这个错了,在orange编译目录执行一下make install,在再执行orange start才正常启动,难道每次重新启动机器,启动orange都要运行一下这个make install重新编译?

from orange.

sumory avatar sumory commented on May 26, 2024

3种可能的原因:

  • 本地权限问题:检查下文件权限有什么不同
  • 配置文件问题:检查下是不是有变动
  • nginx的账户问题:比如是否需要在nginx.conf里添加你的本地账户;本身的nginx进程权限等等

如果仍然定位不了问题,建议你自己写类似于start.sh的脚本来管理Orange,不要通过安装后使用。

这些本地环境问题需要你自己排查修复,

from orange.

workcheng avatar workcheng commented on May 26, 2024

@sumory 嗯,好像找到问题原因了,是启动脚本的问题,我把orange配置到环境变量里面了,orange start命令是默认去当前目录去找orange.lua的,我启动成功的情况下都是在编译目录下去启动的,编译目录下刚好按照启动脚本那个目录去找能够找到这个orange.lua;失败情况下,就是在其他目录去启动orange,所以就找不到这个orange.lua。我觉得可以优化一下,让启动命令 去安装目录去找orange.lua这个文件

from orange.

sumory avatar sumory commented on May 26, 2024

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.

sumory avatar sumory commented on May 26, 2024

fixed with commit #8bd0cc

from orange.

sumory avatar sumory commented on May 26, 2024

源码编译成二进制安装方式是什么意思?
我用0.6.3试验了下没遇到问题。

from orange.

zz0412 avatar zz0412 commented on May 26, 2024

@sumory 通过make install来安装

from orange.

weitangli avatar weitangli commented on May 26, 2024

我在0.6.3也遇到同样的问题。
我是通过make install ORANGE_HOME=/usr/orange ORANGE_BIN=/usr/orange/bin/orange安装的

from orange.

weitangli avatar weitangli commented on May 26, 2024

make install安装也不行

from orange.

sumory avatar sumory commented on May 26, 2024
  • 请用最新的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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.