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:
us...@infra.apache.org


Reply via email to