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/11/21 00:11:18 UTC

[GitHub] [apisix-dashboard] nic-chen opened a new issue #842: feat: support run `manager api` as OS service

nic-chen opened a new issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842


   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [ ] Question or discussion
   - [ ] Bug
   - [ ] Requirements
   - [x] Feature or performance improvement
   - [ ] Other
   
   
   ___
   ### Requirements or improvement
   - Please describe your requirements or improvement suggestions.
   


----------------------------------------------------------------
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] membphis commented on issue #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842#issuecomment-744015632


   @nic-chen @tokers It depends on building the package for the specific OS, eg: ubuntu, centos.  
   
   I think we can remove milestone `2.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:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on issue #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842#issuecomment-835097756


   > Hi guys, do we have to document the features introduced in #1667?
   > 
   > I forgot to add it into the respective PR😅
   
   sure, please add it, thanks.😄


-- 
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] juzhiyuan commented on issue #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842#issuecomment-834919253


   ya, if there have features introduced, then we should update the document.


-- 
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] bisakhmondal commented on issue #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842#issuecomment-806070292


   Hii everyone, I have opened a draft PR. Though it is not fully complete, I would love to have this reviewed by you all.
   Currently, the config is facing a write permission error to write logs in `error.log` file
   Here's the last log in reverse ordering
   
   ```-- Logs begin at Mon 2021-03-15 21:16:03 IST, end at Wed 2021-03-24 23:52:48 IST. --
   Mar 24 23:42:50 turing systemd[1]: Stopped Manager-API service.
   Mar 24 23:42:45 turing systemd[1]: manager-api.service: Failed with result 'exit-code'.
   Mar 24 23:42:45 turing systemd[1]: manager-api.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
   Mar 24 23:42:45 turing manager-api[377717]:         /home/bisakh/Desktop/OSS/apisix-dashboard/api/cmd/manager/main.go:27 +0x2b
   Mar 24 23:42:45 turing manager-api[377717]: main.main()
   Mar 24 23:42:45 turing manager-api[377717]:         /home/bisakh/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800
   Mar 24 23:42:45 turing manager-api[377717]: github.com/spf13/cobra.(*Command).Execute(...)
   Mar 24 23:42:45 turing manager-api[377717]:         /home/bisakh/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852 +0x2fe
   Mar 24 23:42:45 turing manager-api[377717]: github.com/spf13/cobra.(*Command).ExecuteC(0xc0004f2c80, 0xc000000180, 0xc000031f78, 0x407d85)
   Mar 24 23:42:45 turing manager-api[377717]:         /home/bisakh/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:762 +0x47c
   Mar 24 23:42:45 turing manager-api[377717]: github.com/spf13/cobra.(*Command).execute(0xc0004f2c80, 0xc0001181b0, 0x0, 0x0, 0xc0004f2c80, 0xc0001181b0)
   Mar 24 23:42:45 turing manager-api[377717]:         /home/bisakh/Desktop/OSS/apisix-dashboard/api/cmd/managerapi.go:76 +0xbb
   Mar 24 23:42:45 turing manager-api[377717]: github.com/apisix/manager-api/cmd.NewManagerAPICommand.func1(0xc0004f2c80, 0x1721268, 0x0, 0x0, 0x0, 0x0)
   Mar 24 23:42:45 turing manager-api[377717]:         /home/bisakh/Desktop/OSS/apisix-dashboard/api/internal/log/zap.go:39
   Mar 24 23:42:45 turing manager-api[377717]: github.com/apisix/manager-api/internal/log.InitLogger(...)
   Mar 24 23:42:45 turing manager-api[377717]:         /home/bisakh/Desktop/OSS/apisix-dashboard/api/internal/log/zap.go:43 +0x3f
   Mar 24 23:42:45 turing manager-api[377717]: github.com/apisix/manager-api/internal/log.GetLogger(0x0, 0x3)
   Mar 24 23:42:45 turing manager-api[377717]:         /home/bisakh/Desktop/OSS/apisix-dashboard/api/internal/log/zap.go:103 +0x208
   Mar 24 23:42:45 turing manager-api[377717]: github.com/apisix/manager-api/internal/log.fileWriter(0x0, 0x0, 0x0)
   Mar 24 23:42:45 turing manager-api[377717]: goroutine 1 [running]:
   Mar 24 23:42:45 turing manager-api[377717]: panic: couldn't open sink "/home/bisakh/Desktop/OSS/apisix-dashboard/output/logs/error.log": open /home/bisakh/Desktop/OSS/apisix-dashboard/output/logs/error.log: permission denied
   Mar 24 23:42:45 turing systemd[1]: Started Manager-API service.
   Mar 24 23:42:45 turing systemd[1]: Starting Manager-API service...
   Mar 24 23:42:45 turing systemd[1]: Stopped Manager-API service.
   Mar 24 23:42:45 turing systemd[1]: manager-api.service: Scheduled restart job, restart counter is at 74.
   Mar 24 23:42:40 turing systemd[1]: manager-api.service: Failed with result 'exit-code'.
   ```
   is this issue regarding `writer, _, err := zap.Open(logPath)` for not providing any permission/umask explicitly.
   
   It would be great if you guys could provide any sort of guide/help. Thank you.


-- 
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] tokers commented on issue #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842#issuecomment-743959014


   You mean systemd and supervisord?


----------------------------------------------------------------
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] juzhiyuan commented on issue #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842#issuecomment-743961037


   Ya, would this issue be resolved in M2.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:
users@infra.apache.org



[GitHub] [apisix-dashboard] bisakhmondal commented on issue #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842#issuecomment-803632857


   Hello guys, can I give it a try to demonize the manager_api which includes making the necessary change in the main program (terminating on SIGTERM, SIGKILL & reloading configurations on SIGHUP) & create it as a systemd service in Linux?
   Thank you.


-- 
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] juzhiyuan commented on issue #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842#issuecomment-743956526


   in 2.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:
users@infra.apache.org



[GitHub] [apisix-dashboard] bisakhmondal commented on issue #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842#issuecomment-808154327


   hii @nic-chen thanks for the heads up,
   its working perfectly now,
   latest logs in reverse order
   ```
   -- Logs begin at Mon 2021-03-15 21:16:03 IST, end at Fri 2021-03-26 17:12:41 IST. --
   Mar 26 17:12:09 turing manager-api[571177]: Logfile : /home/bisakh/Desktop/OSS/apisix-dashboard/output/logs/error.log
   Mar 26 17:12:09 turing manager-api[571177]: Loglevel: warn
   Mar 26 17:12:09 turing manager-api[571177]: Listen  : 127.0.0.1:9000
   Mar 26 17:12:09 turing manager-api[571177]: GitHash : efdb869
   Mar 26 17:12:09 turing manager-api[571177]: Version : 2.4
   Mar 26 17:12:09 turing manager-api[571177]: The manager-api is running successfully!
   Mar 26 17:12:09 turing systemd[1]: Started Manager-API service.
   Mar 26 17:12:09 turing systemd[1]: Starting Manager-API service...
   ```
   it was causing by 
   `PermissionsStartOnly=true`  which was overriding user & group info to provide syslog access over the generated logs(stdout & stderr).
   so putting 
   ```
   User=<>
   Group=<>
   ```
   after syslog initialization (which was put before the statement by me earlier), solves it. 
   Thanks, pushing the changes soon.


-- 
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] juzhiyuan edited a comment on issue #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
juzhiyuan edited a comment on issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842#issuecomment-743961037


   Not sure, I mean would this issue be resolved in M2.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:
users@infra.apache.org



[GitHub] [apisix-dashboard] juzhiyuan commented on issue #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842#issuecomment-806288203


   cc @starsz @nic-chen to help when you have time.


-- 
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 #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842#issuecomment-744115083


   > @nic-chen @tokers It depends on building the package for the specific OS, eg: ubuntu, centos.
   > 
   > I think we can remove milestone `2.3`.
   
   OK


----------------------------------------------------------------
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 #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842#issuecomment-803683822


   > Hello guys, can I give it a try to demonize the manager_api which includes making the necessary change in the main program (terminating on SIGTERM, SIGKILL & reloading configurations on SIGHUP) & create it as a systemd service in Linux?
   > Thank you.
   
   sure, PR is welcome!


-- 
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 #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842#issuecomment-808076065


   hi @bisakhmondal 
   Need to confirm, is the owner of the logs directory and running manager-api the same user?
   


-- 
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] imjoey closed issue #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
imjoey closed issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842


   


-- 
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] juzhiyuan commented on issue #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842#issuecomment-761730554


   any plan?


----------------------------------------------------------------
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] bisakhmondal commented on issue #842: feat: support run `manager api` as OS service

Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on issue #842:
URL: https://github.com/apache/apisix-dashboard/issues/842#issuecomment-834729757


   Hi guys, do we have to document the features introduced in #1667?
   I forgot to add it into the respective PR😅


-- 
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