While using Cron Jobs I was encountered the below error.
/bin/sh: fork: retry: Resource temporarily unavailable
Can anybody tell me what's this error and how to rectify it?
Restart your cron service. If still get error, view your log.
Related
I am trying to add a startup script in my GCP VM Instance to fetch data from a website (web crawler). I wanted to automate the crawling task following this answer. So, I added a startup script in my VM instance. The script looks like below:
#! /bin/bash
python3 /home/sadmanks/site-spider/src/main.py
Then, I wanted to schedule this instance. But when executing this startup script, it doesn't start the program that I want to execute. The log message that I get is following:
"Error restarting service: Failed to try-restart nscd.service: Unit nscd.service not found
I tried to do this in the browser ssh connection: sudo service nscd start outputs:
Failed to start nscd.service: Unit nscd.service not found.
Does anyone have any idea, how to resolve this issue?
Note: The program runs perfectly when I try to connect the instance with an SSH to my local machine.
The error "Error restarting service: Failed to try-restart nscd.service: Unit crond.service not found." is just harmless log spam. These error messages show up on every VM on start-up and are expected since systemd services like crond.service and nscd.service do not exist on COS. So, try updating the version of google-guest-agent service. But as suggested by #John Hanley that service is not related to python, web scraping/crawling, etc. So, make sure you know what the program is doing before running it on public servers.
On RHEL 8, I have a problem when restarting Gitlab instance on Podman.
Everything works fine but running command: sudo podman restart gitlab-server makes an error:
ERRO[0011] Failed to start transient timer unit: Unit 28e595d7d0812cd0e5e772db55d02d137c4179fcd4aa0527162d28b22d169ee3.service already exists.
When I list all services, I can see above service with "load failed" status.
Error is not making any problems with functionality but it is quite strange what is happening.
Thank You for any advice.
I use Gitlab for doing Continuous Integration and Development and all of a sudden I get this error message "There has been a runner system failure, please try again"
There's no real error message or error code.
I've tried restarting the gitlab runner, using gitlab-runner restart, I've done a reboot of the server its running on but I keep getting this error message on Gitlab whenever I push a code change.
After a couple of hours, I realized the issue is that the server that Gitlab Runner is running on has no space left.
I logged into the server in question. Looked at the Gitlab log file using the following command:
journalctl -u gitlab-runner
And it showed me the following logs:
May 21 08:20:41 gitlab-runner[18936]: Checking for jobs... received job=178911 repo_url=https://.......git runner=f540b942
May 21 08:20:41 gitlab-runner-01 gitlab-runner[18936]: WARNING: Failed to process runner builds=0 error=open /tmp/trace543210445: no space left on device executor=docker runner=f540b942
To fix this issue I ran docker conatiner prune which clears out stopped containers.
Alternatively you could use docker system prune which would remove all unused objects.
See https://linuxize.com/post/how-to-remove-docker-images-containers-volumes-and-networks/ for more information about those docker commands.
Afterwards, I no longer got the error on Gitlab when pushing changes.
Running my Java service using jsvc on Linux (Ubuntu) 10.04.4 LTS and when I stop service and requests and then hung, checked log to find jsvc exec error below.
14/03/2014 12:49:48 19831 jsvc.exec error: Still running according to PID file /home/user/tmp/example.pid, PID is 19728
14/03/2014 12:49:48 19830 jsvc.exec error: Service exit with a return value of 122
Any idea ?
Thanks,
I'm having a similar problem that happens at a log rotation. It appears that the system is shutting down, rotating the logs, then trying to start the system. I believe error 122 is telling you that it hasn't completed shutting down yet and can't restart. I believe the -wait parameter is needed in the start script.
http://commons.apache.org/proper/commons-daemon/jsvc.html
Also see http://freddyandersen.wordpress.com/2009/09/02/running-tomcat-as-a-service-on-linux/ for an example.
If this is happening due to logrotate, use the copytruncate option instead of restarting the service.
http://www.vineetmanohar.com/2010/03/howto-rotate-tomcat-catalina-out/
Try to run below command. Here 19728 is the process id.
pkill -9 19728
Now start your process. It will work.
This will solve your problem.
Thank you.
I have a PHP CLI script that continually times out, and I can't figure out the source of the timeout. Seemingly "randomly" the script will stop (with no PHP error in the logs) and give the following output to console:
timeout, elapsed_time = 60
I'm setting PHP's time limit via set_time_limit(0); intermittently but it doesn't seem to be making a difference.
Besides that, PHP is supposed to throw an error if it hits its timeout, and no error is thrown, so could this timeout be triggered by something other than PHP?
The script is started by a bash script ".sh" on a Ubuntu machine.
Thanks!
Thanks to everyone who helped me out.
I tried running the script through nohup and the timeout issue seems to have disappeared. Hope this helps someone else!