Questions tagged [error-handling]

Use this tag for questions on how to handle errors generated in shell scripts.

Filter by
Sorted by
Tagged with
0
votes
1answer
28 views

Tar: File changed as we read it/ file removed before we read it Errors

I'm trying to create an automated backup script using the tar command: tar -czg /home/user/BackupArchiv/snapshots/snapshot_2020-10-12 -f /home/user/BackupArchiv/backup_2020-10-12/backupfull.tar.gz /...
-4
votes
2answers
84 views

Is it possible to pipe only on error? [closed]

If there is any error then 2>&1 and pipe (|) to another program, otherwise do not 2>&1 and do not pipe
0
votes
0answers
17 views

Kazam not opening at all. Linux mint 20

I reinstalled it several times but no success at opening it at all! Here is the terminal output: $ kazam WARNING Kazam - Failed to correctly detect operating system. Traceback (most recent call last): ...
3
votes
1answer
59 views

subshell not propagating error, bash 4.4

I have this in a github workflow - run: bash --version - name: run postgres run: | set -e shopt -s inherit_errexit export ID=$(docker run \ ...
0
votes
1answer
18 views

Error: “/bin/sh: 1: /usr/local/lib/node_modules/wasm-opt/out/wasm-opt: not found” returns with exit status 0!

So I borked an installation of a bin, and when I try to run the command (wasm-opt input_file.wasm) I get this: /bin/sh: 1: /usr/local/lib/node_modules/wasm-opt/out/wasm-opt: not found But that ...
0
votes
0answers
11 views

systemd-sysusers: Failed to check if group nobody already exists

I'm using Debian Buster. On several of my devices I find these red alerts in the systemd journal, even on a fresh installed Buster without additional installed software: Oct 01 09:18:41 harley systemd-...
0
votes
0answers
12 views

Uncorrectable Error in Hard Disk

My understanding is T10-DIFF/DIX( also known as T10-PI) was proposed to prevent silent data corruption. And of the hard disk/SSD vendors have already implemented/adopted this solution as part of their ...
1
vote
1answer
41 views

Search for a string in all searched files gives /bin/grep: Argument list too long error

I tried the below command to search for in all files user /var sudo find . -type f | xargs sudo grep 202007602 | tee /tmp/202007602.log Output: grep: ./www/html/jenkins/workspace/node_modules/xpath/...
2
votes
0answers
15 views

Script configuration issues

My purpose is to allow user A to run a specific script owned by user B but with user B’s profile loaded. This is on a Solaris maachine. I have users A and B, I set this line: in the sudoers file, so ...
0
votes
0answers
27 views

mutt macro to save attachment fails when file already exists

My .muttrc includes macro attach s <save-entry><bol>/myDir/<enter><shell-escape>chmod\ -R\ a+r\ /myDir/.<enter> When I hit s, this saves an attachment into /myDir. But ...
0
votes
1answer
17 views

how to suppress error message in Unix for apache

I know that we can suppress error message when the command is ls ls /usr/tbin/httpd || /home/app/httpd/bin/apachectl 2>/dev/null However, i want to suppress No such file or directory for the below ...
0
votes
0answers
9 views

How to resolve dpkg error in terminal while installing python

I face this problem while installing python3.7 in raspberry pi 3. I had attached the terminal commands and errors below. Kindly have a look at it and hep me to resolve this
0
votes
0answers
122 views

KDE-Neon doesn't start anymore. ACPI region does not cover t sponse buffer. failed to add display topology, DTM TA is not initialized

I was using the User Edition of KDE-Neon without issues for some time but now I got this error and I am clueless. I am very thankful about every response. I was searching for similar problems on ...
-7
votes
1answer
41 views

apt-get update error [duplicate]

root@kali:~# apt-get update Get:1 https://mirror.karneval.cz/pub/linux/kali kali-rolling InRelease [30.5 kB] Reading package lists... Done E: Release file for https://http.kali.org/kali/dists/...
2
votes
0answers
31 views

Why does trap not get triggered when a sourcing a file that does not exist?

#!/bin/bash set -eEuo pipefail set -x function deploy_cleanup(){ echo "---Cleaning up---" echo "hello" } trap deploy_cleanup ERR whoami source euaueoaue Outputs: + ...
5
votes
2answers
416 views

How to continue cascaded pipeline commands after a failure

I am running a command and manipulating the output with my own script, but I don't want the main command to stop when my script fails. For example: a-command | tee logfile.txt | myscript when my ...
0
votes
1answer
112 views

Problem running commands with 'sudo' in Bash script

I have an installation script which appears to work fine and doesn't output any errors, but when running a command with one of the newly installed packages, I'm told I don't have permission to access ...
2
votes
0answers
26 views

If my Mac shut down because of a problem, how do I find the error report? [closed]

Sometimes my computer shuts down, and I get the "Your computer shut down because of a problem" alert. My question is, where can I find the error message resulting in this? Like if an application quits ...
1
vote
1answer
83 views

cron: send errors to syslog, instead of MTA

I don't have MTA installed on my desktop. Whenever there is a problem with a cronjob script, I see this in my logs: CRON: (CRON) info (No MTA installed, discarding output) A script that was ...
0
votes
1answer
42 views

What does the error line prefix `W: ` mean, like from apt-get or other, similar command's?

It seem common knowledge that this is a warning message, but is this accurate? And if so, then where is it documented? (I've already searched the man pages for dpkg and apt-get and the web. I ...
0
votes
0answers
20 views

Running commands remotely and script not exiting on error

I have a simple script which takes the first argument as a hostname and tries to connect to it and run some commands then saves the output locally. But whenever I pass an invalid hostname and it ...
0
votes
1answer
45 views

How to capture error of failed command with message using tee command

I want to capture and write my error to log file along with custom message. Consider the command : $(find $val -type f -delete) || echo "error in deleting files" |tee -a log.txt This command writes ...
0
votes
2answers
61 views

Shell script runs with bash but not with sh. Why and how to fix it?

I have the following shell script that sums up all the arguments passed to it (space separated): sum=0 for arg in "$@"; do (( sum += arg )) done echo $sum I have saved it as SumAll.sh. So, its ...
0
votes
0answers
7 views

Problem with drivers nvidia

I installed Debian Buster Xfce in an all-in-one PC. The installation don't show any missing firmware, but when finished and started session can't use wifi, wireless driver missing. So I installed ...
1
vote
0answers
187 views

How to find out if xtigervncviewer wasn't able to establish a connection?

If I use xtigervncviewer to try to connect to a host which doesn't run a VNC server, it prints the following expected error to stderr: $ xtigervncviewer -AlertOnFatalError=0 localhost TigerVNC ...
1
vote
3answers
684 views

Errors when trying to upgrade Linux kernel

I've gone to upgrade my machine as I do every day and I've received the following errors: $ sudo apt-get update && sudo apt-get upgrade Hit:1 http://ftp.uk.debian.org/debian buster InRelease ...
0
votes
1answer
66 views

How to stop a (Perl) script on Unix exiting when it encounters errors? [closed]

I have a Perl script inherited from a colleague which processes some data for me. On our old server it will run and return several expected error messages before generating an output file for me. It ...
0
votes
1answer
98 views

docker-compose up -d quiet option to suppres up-to-date

I want to update a docker container in crontab and only get an email if something gets wrong, so I call 12 4 * * * cd /var/docker-services/mycontainer/; docker-compose pull -q && docker-...
0
votes
2answers
32 views

Bash: no output of while loop and any better solution?

I am new to bash scripting and the part of my script below doesn't give me any output. check="" while [ "$check"=="" ] do read -p "Signature Correct?(Yes/No): " check if [ "$check" != "Y" || "$...
0
votes
0answers
20 views

Linux MInt (intermittent) ACPI startup error

When I press the power button on my Linux Mint machine, one of two things (unpredictably) happens: Everything goes as it should and I eventually end up on my Desktop I get stuck on a black screen ...
1
vote
1answer
45 views

hiding a file from sudo rm -rf * (or skipping)

I am trying to hide one new file from a script that contains 'sudo rm -rf *' - I am wondering if I can do this without redoing the script/ if this is possible or not. I have tried the following: $ ...
0
votes
1answer
11 views

fastcgi php nginx errorlog messed up

I have a strange problem, the errorlog of my nginx server is somehow messed up: PHP errors seem to be all written in one line and repeating itself recursively. This way the llog grows a few GB within ...
1
vote
1answer
96 views

Piping errors to my function causes command to be ignored after 1 failure

Context: I have a Bash Script that copies files function log () { read IN if [ "$IN" == "" ]; then : else echo "$datetime"$'\t'"$IN" | tee -a logfile fi } function ...
1
vote
1answer
163 views

Can't login to Kali after upgrade

I'm running Kali from VMware. I upgraded my Kali, and after rebooting I can't login. When I restart I'm login automatically via tty1 , and receiving the following error: uname : loadlocale.c:129 : ...
0
votes
0answers
34 views

Bash inconsistent behavior between echo / assigning a variable with `set -e` and subshell [duplicate]

#!/usr/bin/env bash set -euxo pipefail echo $(echo "$THIS_VAR_DOES_NOT_EXIST" | cat) echo "WTF" Running this script produces: ./wtf.sh ++ cat ./wtf.sh: line 4: THIS_VAR_DOES_NOT_EXIST: unbound ...
0
votes
0answers
53 views

Error downloading files from Google Drive and other errors with Google products

I'm running Linux Mint 19.2 Cinnamon and when I try to download a file from Google Drive (wheter it's my Drive or not) I always get an error that looks somewhat like this: I've tried anything: ...
0
votes
0answers
60 views

Ubuntu 19.10 has experienced an internal error

I faced this error after booting the system. And this error continues to persist, and leads to system crash eventually.
-3
votes
1answer
102 views

Run ./configure script as user under Alpine Linux

I’m trying to compile a program from source under Alpine Linux. When I run ./configure under root everything goes well, but when I do the same as a normal user I get: ./configure: This script ...
0
votes
1answer
138 views

Trying to install RuneLite on Manjaro, got this error trying to build

So I was trying to install RuneLite on Manjaro, and at first it built, but it wouldn't launch. I checked the faq on their github and it they said that it had to do with a bug with JDK 10+, and to just ...
3
votes
1answer
58 views

command substitution does not respect err_exit sometimes

I have a weird situation where inserting any command that succeeds in the line above makes command substitution ($(I mean this)) not work as expected — it does not exit, even though the command fails ...
0
votes
2answers
85 views

What’s the difference between providing input to a command via an argument to that command and providing input through a shell redirection operator?

When I use my shell’s redirection operator to provide a (non-existent) filename to the grep command, the error message about that file not existing is displayed by my shell. But when I provide that ...
2
votes
0answers
3k views

Couldn't get pcap handle, exiting

I got an error when i use wash tool to display the networks around me that has wps enabled. But i had an unexpected error while i'm trying to run that. root@Shadow:~# wash --interface wlan0 [X] ...
1
vote
1answer
41 views

How to prevent Pulseaudio failover on sink error

If I play music through a USB sound card in ALSA, and accidentally unplug the USB cable, then it stops playing automatically, making it easy to detect the problem and fix it: $ mpv --audio-device=...
0
votes
0answers
303 views

EADDRINUSE on every port in Node/Express.js event after restart linux

I am running node with express.js over it on Linux. It was working but now when I start my server the followng error is displayed: Error: listen EADDRINUSE: address already in use 0.0.0.0:1223. ...
0
votes
0answers
16 views

Attempting to write PHP array to file in Linux PHP interactive shell produces Uncaught Error and empty file

After executing the following commands: [root@server test]# php -v PHP 7.2.25 (cli) (built: Dec 17 2019 22:57:09) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-...
0
votes
0answers
520 views

What does the error “undefined reference to 'dlopen'” mean?

When I want to compile my c-file I get these messages: undefined reference to 'dlopen' undefined reference to 'dlsym' In some other posts about this topic the solution was to add -ldl to the linker ...
2
votes
1answer
219 views

How can a command within a pipeline abort the pipeline?

Given the pipeline a | b | c how might I alter b so that it aborts the pipeline if b generates an error or matches a particular pattern in the input stream?
0
votes
2answers
297 views

How to troubleshoot a bash script called by a python script called by a program?

I have to troubleshoot this bash script called by a python script called by a program, all run in Ubuntu 18.04. The python script and the program are black boxes. The only information I have is that ...
0
votes
1answer
23 views

How does ALSA handle errors in isochronous USB data

USB transfers fixed data rate digital audio data using its isochronous mode. To ensure the fixed data rate, this mode has no provision for retries of faulty transmissions. How does ALSA handle ...
0
votes
2answers
197 views

Using an array of strings with spaces in bash - error messages “curl: could not resolve host”

I am attempting to write a script in bash that monitors certain aspects of a server, and sends a message to slack if it notices that something is wrong. However, I am running into a strange set of ...

1
2 3 4 5 6