Open PurdeysBane opened 4 years ago
Could you specify the config file path.
Thanks but I already tried that and it didn't help.
Further information: It also fails to run from Windows Task scheduler unless running as the current logged in user i.e. it seems that it only works when running from an interactive session
@PurdeysBane Try running /path/to/bash with -c "/path/to/gitea --option1 --option2"
. If command line doesn't work (Windows command prompt parser can be a b*tch), try creating a bash script:
#!/bin/bash
exec /path/to/gitea --option1 --option2 ...
And run it with /path/to/bash /path/to/your/script
Note: you may want to test all this from.... command line first. 😁
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Steps to reproduce:
Download PsTools (from SysInternals)
run:
PsExec.exe -i -s cmd.exe
To open a Command Prompt as Local System Account. Then run a dump command.
gitea.exe dump -V -c "D:\Gitea\custom\conf\app.ini"
Even with the verbose flag, nothing is shown in the command prompt, and no dump file is created.
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
So...?
@rogeriorc which version of your gitea instance?
Hi, @lunny !
Version 1.11.0 windows amd64 running on a Windows Server 2019 Standard (x64).
Thanks!
@rogeriorc Please notice that you cannot run dump
while Gitea is running.
@guillep2k the docs say:
Backup Command (dump)
Switch to the user running Gitea: su git
. Run ./gitea dump -c /path/to/app.ini
in the Gitea installation directory. There should be some output similar to the following:
It works when I'm use a user account, even the administrator account.
@rogeriorc That's right, however the dump
command doesn't produce consistent results if the instance is running, because it's just a succession of SELECT ... FROM ...
statements.
Anyway, be aware that we strongly discourage running Gitea as System
(or root
in *nix systems) for security reasons.
Back to your problem, the Local System
account has the peculiarity of not having a proper user profile. Maybe that's what's causing your inconvenience.
@guillep2k @rogeriorc I think this is related to logger cannot get default file name. It fixed after changed value for [log.file] FILE_NAME = gitea.log
[x]
):Description
I am trying to run gitea.exe dump -R from a Windows service. The exe appears to run but immediately returns with exit code 0 without doing anything. It does not create a log file (even if I increase the log level to trace in the app.ini file)
If I run the command line from a command prompt it works as expected. Any idea why gitea is exiting without doing anything?
Screenshots