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 2021/05/13 09:53:58 UTC
[GitHub] [apisix] han6565 opened a new issue #4243: request help: how can I create systemd file
han6565 opened a new issue #4243:
URL: https://github.com/apache/apisix/issues/4243
### Issue description
I want create a systemd file , start failed .
The file like this :
---------------------------------------------------
[Unit]
Description=apisix
Conflicts=apisix.service
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/apisix/bin/apisix start
ExecStop=/usr/local/apisix/bin/apisix stop
ExecReload=/usr/local/apisix/bin/apisix restart
Restart=on-failure
RestartSec=1s
PrivateTmp=true
---------------------------------------------------
then start apisix(systemctl start apisix),start failed
May 13 17:29:18 xxxxxx: Starting apisix...
May 13 17:29:18 xxxxxx: /usr/local/openresty/luajit/bin/luajit /usr/local/apisix/apisix/cli/apisix.lua start
May 13 17:29:18 xxxxxx: /usr/local/openresty/luajit/bin/luajit: /usr/local/apisix/apisix/cli/apisix.lua:31: module 'apisix.cli.env' not found:
May 13 17:29:18 xxxxxx: no field package.preload['apisix.cli.env']
the apisix in the path "/usr/local/apisix",and I can start it in that path.but the systemctl cannot start
### Environment
Request help without environment information will be ignored or closed.
* apisix version (cmd: `apisix version`):2.5
* OS (cmd: `uname -a`):centos 7.7
* OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):openresty/1.19.3.1
* etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):3.4
* apisix-dashboard version, if have:
* luarocks version, if the issue is about installation (cmd: `luarocks --version`):3.4
--
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] han6565 commented on issue #4243: request help: systemctl start apisix failed,how can start by systemctl
Posted by GitBox <gi...@apache.org>.
han6565 commented on issue #4243:
URL: https://github.com/apache/apisix/issues/4243#issuecomment-840972956
> > I think you need to set `$PWD` to `/usr/local/apisix`
>
> Yes that would be better. Adding `WorkingDirectory=/usr/local/apisix` could make it work.
```
WorkingDirectory=/usr/local/apisix
ExecStart=/usr/local/apisix/bin/apisix start
```
It's worked,thank's your help
--
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] han6565 closed issue #4243: request help: systemctl start apisix failed,how can start by systemctl
Posted by GitBox <gi...@apache.org>.
han6565 closed issue #4243:
URL: https://github.com/apache/apisix/issues/4243
--
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] Yiyiyimu commented on issue #4243: request help: systemctl start apisix failed,how can start by systemctl
Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #4243:
URL: https://github.com/apache/apisix/issues/4243#issuecomment-840933594
> I think you need to set `$PWD` to `/usr/local/apisix`
Yes that would be better. Adding `WorkingDirectory=/usr/local/apisix` could make it 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:
users@infra.apache.org
[GitHub] [apisix] Yiyiyimu commented on issue #4243: request help: systemctl start apisix failed,how can start by systemctl
Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #4243:
URL: https://github.com/apache/apisix/issues/4243#issuecomment-840861422
Hi @han6565 Actually that's the error when you run apisix in non apisix dir. You could try if #4246 could fix the problem
--
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] spacewander commented on issue #4243: request help: systemctl start apisix failed,how can start by systemctl
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4243:
URL: https://github.com/apache/apisix/issues/4243#issuecomment-840924642
@han6565
I think you need to set `$PWD` to `/usr/local/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:
users@infra.apache.org