CentOS 5 :: Bash Script Under Cron Produces Broken Pipe

Apr 20, 2011

I have script which does file locking via flock and then writing it's pid into that file. It perfectly works being run by hand in terminal, running under cron on Debian, but somehow fails being run under cron on Centos 5.6. Script part and straced outputs are below.

bash code:

#setting lock
mylog "setting lockfile $LOCKFILE"
exec 200<> $LOCKFILE

[code]....

View 4 Replies


ADVERTISEMENT

Server :: Bash Scripting Sending Write Error - Broken Pipe

Apr 19, 2010

I move a page from a server in SuSe to Debian and this script was working well but when I move the page to a Debian base server it is sending in the logs the following message:

cat: write error: Broken pipe, referer: [URL]

The cgi does the following, read a db file plain text that repeat each 15 lines an information where to look the seraching info. if it is there sends to the output the 15 lines block. but it was not sending errors in suse distro, does anybody knows why the cat's line are sending "cat: write error: Broken pipe," if I am not writing or making a pipe with ">" to none file.

View 8 Replies View Related

Programming :: Handle A Broken Pipe Exception (SIGPIPE) In FIFO Pipe?

Mar 2, 2011

I've written a simple server in linux used fork to create a FIFO pipe.The server create two FIFO pipe.One for server read data from client and write data to client.Then another pipe for client read data from server and write data to server.When the server read data from a client used server-pipe and then write data to client.But ,if the client no read open the pipe,the server side write will be crashed because of a broken-pipe SIGPIPE. How to check whether the read side is opened?Or,how to catch the SIGPIPE,and then my server will still execute on,not crashed!!

View 5 Replies View Related

Server :: Pipe 'echo' To 'netcat' - Sometime It Seems To Broken

Sep 2, 2010

I am running somes instances of Redis. I want to get Redis stats with following command:

Code:

$ echo "info" | nc <server_IP> <port>

but sometime it returns nothing. The first thing come to my mind is broken pipe or something like this. I always get the result if telnet to Redis and typing 'info' command. I also try pipe viewer to monitor the progress of data but it didn't help:

Code:

$ echo "info" | pv | nc <server_IP> <port>

View 2 Replies View Related

Networking :: Error - Java.net.SocketException: Broken Pipe

Jul 15, 2010

We are facing broken pipe exception while connecting to SMPP gateway through TCP/IP.on RHEL4 It is coming till we restart the application. Below is the exception we are getting. java.net.SocketException: Broken pipe

View 1 Replies View Related

Server :: Error: Write Failed: Broken Pipe

Apr 11, 2010

I connect to our server by ssh, default ssh client on Debian system.when I run a command that has large output on stdout (on shell) my connection is lost and I get error: "Write failed: Broken pipe"Unfortunate on our server there is limitation for connection per hour!

View 2 Replies View Related

Programming :: Python Script Gives Error - Broken Pipe

Jul 21, 2011

I am building a python script which works same as SMTP protocol. I have build separate functions in that for each command of SMTP, and after this i have integrated all those functions in a new function named as send_mail(so that i don't have to execute every function separately for every command). Now, when i execute the script for the first time it runs successfully, but for the second time it gives the error of "BROKEN PIPE". I really can't make out how the socket is getting closed.

View 5 Replies View Related

Fedora Networking :: Net Worked HP Printer Will Not Print-broken Pipe

Apr 10, 2009

my net worked HP printer will not print-broken pipe - this started after I had to switch off the printer at the mains in order to attend to a paper jam. Now it will not print apart from a test page. I am using Fedora 10 and the device info is "hp:/net/Officejet_Pro_L7500?ip=192.168.0.4"

View 5 Replies View Related

Server :: Apache2 EnableSendfile And Error - Broken Pipe: Core_output_filter

Mar 2, 2010

I have installed a LAMP server (Debian Lenny + Apache2 + PHP Version 5.3.1-0.dotdeb.1). On this machine, my web application (PHP + MySQL) exists in 2 flavours:

- Dev
- Prod

In /etc/apache2/sites-available, I have ims & ims-dev, one for each instance. Their contents are identical in terms of settings, except for the paths (dev/prod):

Code:

<VirtualHost *:80>
ServerAdmin admin@domain.com
ServerName ims.domain.com
ServerAlias ims.domain.com

[code]....

why this difference when the settings are strictly identical? Do I need to add EnableSendfile off in my conf files to stop that?

View 14 Replies View Related

Debian Programming :: Broken Pipe Error When Try Playing YouTube Playlist

Nov 16, 2014

I wrote y bash script that opens YouTube playlist using youtube-dl and VLC applications: the output of youtube-dl is the input of VLC. The only problem is VLC needs to be closed after each playlist item unless I get the error message of the operating system:

"ERROR: unable to write data: [Errno 32] Broken pipe".

I understand the reason but I don't know how to resolve it: it is possible to close previous STDIN of VLC without killing the entire VLC process so that a new youtube-dl instance can connect to the same VLC instance? In short this is my question. The problem is detailed here: Downloading and playing videos and subtitles.

View 0 Replies View Related

Fedora :: Error - Courier-imap Standard Output: Broken Pipe

Jul 22, 2010

I'm following the "The Perfect Server - Fedora12 x86_64 [ISPConfig 3]" instructions and I am encountering an error when trying to build the rpm for courier-imap (from page 4 of the HOWTO).

The command I run is:

Code:

rpmbuild -ta courier-imap-4.6.0.tar.bz2

The error is below:

Code:

INFO: LOGIN, user=confmdtest, ip=[127.0.0.1], port=[0], protocol=SMAP1
INFO: LOGOUT, user=confmdtest, ip=[127.0.0.1], headers=0, body=0, rcvd=26, sent=610, time=0
sort: fflush failed: standard output: Broken pipe

[code]....

RPM build errors: Bad exit status from /var/tmp/rpm-tmp.85697 (%build)

View 3 Replies View Related

Programming :: BASH: Get PID Of First Command In Pipe

Aug 11, 2010

I understand that $! is the PID of a command. For example:

Code: #!/bin/bash
myprogram &
echo "PID of myprogram is $!"

I'd like to send the output of "myprogram" to both console and to a log file using the "tee" command but I also want to store the PID of "myprogam". Something like this:

Code: #!/bin/bash
myprogram | tee ./logfile &
echo "PID of myprogram is $!"

The problem is that $! is now the PID of "tee" rather than the PID of "myprogram".

View 3 Replies View Related

General :: Understanding How Pipe Works In Bash

Aug 21, 2010

I don't quite understand how pipes work in bash. I know that it takes an output from one command as the input in another command. What an output is I can get because it's what the command prints out to the screen. But how do I know what input a command will take? Here is an example I thought would work:

Which gem | rm
Unfortunately it didn't.
Which gem prints out "/usr/bin/gem" so that must be the output right? I thought that was given to rm so it would be "rm /usr/bin/gem" but I was wrong. How do I know what input a command takes?

View 4 Replies View Related

General :: Flow Control In Bash Pipe?

Jul 25, 2010

Two processes are communicating through a pipe: A | B. A is writing data faster than B is reading it in. Is there any way to have A limit its writing rate to match B's reading rate?

AFAIK the pipe will get full, and will make A's writing block, waiting for B to read in more data. But is there a way to limit A's writing rate before the pipe fills up? (In a way it's like having a pipe with a really small capacity, but as far as I know pipe capacity is a constant compiled into the kernel.)

Code:

EXAMPLE FOR CLARIFICATION

Right now the command is printing out the following in 1-second intervals:

But with flow control it should print out (again in 1-second intervals):

...since "date" would block on the writing loop due to the slow reading loop.

View 4 Replies View Related

Debian :: Can't Upgrade Anything - Dpkg-deb: Subprocess Paste Killed By Signal (Broken Pipe) Errors Were Encountered While Processing

Apr 23, 2010

Unpacking replacement ffmpeg ... dpkg: error processing /var/cache/apt/archives/ffmpeg_5%3a0.5.1+svn20100411-0.0_i386.deb (--unpack): trying to overwrite '/usr/share/ffmpeg/libx264-ipod640.ffpreset', which is also in package libavcodec52 4:0.5.1-3 dpkg-deb: subprocess paste killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/ffmpeg_5%3a0.5.1+svn20100411-0.0_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

View 9 Replies View Related

CentOS 5 :: Setup A Cron In /var/spool/cron/root

Feb 16, 2010

I have set up a cron in /var/spool/cron/root

*/15 * * * * /usr/bin/phplist.sh

I can see in /var/log/cron that it is running every 15 minutes but it has no effect. It is not doing the commands in the bash script.

If I run /usr/bin/phplist.sh right in the shell it works great.

View 3 Replies View Related

Ubuntu :: Pipe Bash Script To Zenity's Progress Feature?

Feb 22, 2010

Example from zenity:

Code:
#!/bin/sh
(

[code].....

View 1 Replies View Related

CentOS 5 :: Upgrading From 5.3 To 5.4 Via Yum Produces Perl Errors

Oct 26, 2009

When using YUM UPDATE from the prompt more than 230 items are scheduled for update however when the download process has completed I receive errors regarding Perl dependences such as:

file /usr/lib/perl5/5.8.8/List/Util.pm from install of perl-5.8.8-27.el5.x86_64 conflicts with file from package perl-5.8.8-18.el5_3.1.i386

I am unsure how to overcome this. It occurs on two different servers.

View 7 Replies View Related

CentOS 5 :: MIME Lite Installation Always Produces Error

Mar 18, 2009

I'm still a newbie when it comes to *nixes so these might be easy for some of you here is my problem I tried installing MIME::Lite using CPAN but it always produces an error so it doesn't continue, any other way to install it...

View 1 Replies View Related

Ubuntu :: SSH "Write Failed: Broken Pipe" For Some Users

May 10, 2010

I am having a truly bizarre problem when trying to set up my sheeva plug as a backup server. I have four users (one for each member of my family) that I want to give permission to ssh in (well, sftp in but they're essentially the same) and backup to an external harddrive.

My user works perfectly well and has done since I got the plug. So does a transmission user I set up to run the transmission daemon. With the other three users, however, I get the following error after SSH asks for the user's password:

Code:

Write failed: Broken pipe

This happens whether I try locally or over my network. I haven't been able to find a solution to it at all. I've made sure that /bin/bash was set as the shell and that the home directory is writeable with the correct permissions (ls -al /home):

Code:

drwxr-xr-x 7 root root 4096 Dec 21 19:25 .
drwxr-xr-x 21 root root 4096 Dec 17 19:27 ..

[code]...

The alternative for me would be to use netatalk and AFP but the problem is that there is no native support for AFP and so things like d�ja dup backup may not be able to mount the afp drive...

View 4 Replies View Related

Software :: Put Ssh Into Remote Machine - Error Write Failed: Broken Pipe (After Logged Into That Machine)

Jul 18, 2011

Whenever I put ssh into remote machine am getting the following messages. Write Failed: Broken Pipe (After logged into that machine ) Read Socket Failed: Connection reset by peer (While trying to log in ) Also known_hosts file is changed frequently.

View 1 Replies View Related

Ubuntu Networking :: Ssh "Connection Reset By Peer" - Write Failed: Broken Pipe

Feb 9, 2010

which cropped up today after no changes to the system: I can successfully ssh into my ubuntu 64-bit 9.10 machine (via OS X with iTerm), but after about 30 seconds, the connection drops with the message "Connection reset by peer Connection to xx.xx.xx.xx closed".

If I then try to immediately ssh back in I get: "Write failed: Broken pipe". If I try to immediately ping the machine instead, I cannot ping it until the ~10th try. Eventually I can log back in again, only to be kicked off after between 5 and 60 seconds. I called the network people and their are no known issue right now with networking. The networking on the ubuntu machine is otherwise fine, it seems. In the /var/log/auth.log file, it simple says:

Quote:
Feb 9 14:19:20 harriet sshd[4134]: Accepted password for xxx from xx.xx.xx.xx port 55105 ssh2
Feb 9 14:19:20 harriet sshd[4134]: pam_unix(sshd:session): session opened for user xxx by (uid=0)
Feb 9 14:19:28 harriet sshd[4046]: pam_unix(sshd:session): session closed for user xxx

The solution I come across to a similar problem is to add a "ClientAwakeInterval" number to sshdconfig, but this (as expected) doesn't fix my problem.

View 1 Replies View Related

Debian :: Upgrade From Sarge To Lenny (via Etch) Has Broken Cron?

Sep 20, 2010

I've been upgrading a bunch of our servers from sarge to etch and then to lenny, on two of these servers, cron has broken, cronjobs will not run. On another two (that have no significant differences from the others) cron is unaffected I created a simple job to run while I was testing

*/1 * * * * root /usr/local/mailtest-1 in the script is echo test mail from busted server | mail -s "test mail from your busted server" [URL]. and that runs fine if I run it manually, I've added it into /etc/crontab and crontab -e but haven't got a single mail from it. The cron service is running

I tried apt-get remove --purge and then a re-install but it doesn't seem to have worked. All the logs have stopped rotating as well so I'm starting to think that maybe it's not a fault with cron but with some other service that it depends on. However, I've not been able to figure out what that might be.

View 5 Replies View Related

Networking :: PING - Pipe 2 Versus Pipe 3

Apr 10, 2009

I'm doing ping between 2 RH servers through a VPN site2site tunnel and in some times I got in the result pipe 2 and another pipe 3 as I mark it in blue color below.

e.g.

64 bytes from 192.168.1.10: icmp_seq=0 ttl=128 time=0.229 ms
64 bytes from 192.168.1.10: icmp_seq=1 ttl=128 time=0.287 ms
64 bytes from 192.168.1.10: icmp_seq=2 ttl=128 time=0.278 ms

[code]....

What's the difference between pipe 2 and pipe 3 and what's the meaning of it?

View 1 Replies View Related

Programming :: BASH Add Cron Job To Run Hourly

Mar 25, 2010

I have an rsync script I wrote that I have tested and it works perfectly when I run it manually. Now I am working on a server setup script and I have gotten my setup script to create the rsync script in /etc/cron.hourly and restart crond. To spite the fact that the script is in /etc/cron.hourly and I have restarted crond, the script does not run. With that said, how can I script adding the rsync script to run hourly as a cron job?

View 9 Replies View Related

CentOS 5 :: Grep The Line And Pipe That Into The Sed?

Sep 22, 2010

I need to simply replace a 2 lines, or one and I'll run each command separately, in a eps file. I know I can grep the line and pipe that into the sed but I would like to keep this in a sed command. I can use sed /s and get it if I copy the section out of the file and paste it. Really just trying to rewrite the boundingbox coord's in eps files.

sed -i 's/%%BoundingBox: 00 00 88 487/%%BoundingBox: 24 315 288 487/g;s/%%HiResBoundingBox: 00 00 88 487/%%HiResBoundingBox: 26 315 288 487/g' someeps.eps

View 2 Replies View Related

Ubuntu :: Rsync Bash Script Different In Cron?

Feb 19, 2010

I've got a bash script that uses rsync via SSH to back up data from a remote webserver.
This script works fine when I run it myself but when it runs as a cron job I get the following error:

Code:
2010/02/20 08:15:01 [6786] Unexpected remote arg: user@www.server.com:~/www
2010/02/20 08:15:01 [6786] rsync error: syntax or usage error (code 1) at main.c(1219)

[code]....

View 9 Replies View Related

Ubuntu :: Bash Script Works Partially In Cron?

Sep 24, 2010

I have a script that pops up a jpg file several times a day as a reminder. The script is called up by crontab and it works perfectly.The issue is that I want the script to also perform a system "beep" in addition to popping up the jpg file. When I test it on the command line everything works but when I run it in cron the jpg file pops up but the beep doesn't beep. I'm thinking the problem is in the "echo -e \a" part. I must be missing something.Here is my script:

#!/bin/bash
echo -e \a
sleep01; echo -e \a

[code]....

View 8 Replies View Related

Ubuntu Servers :: Bash Script Error - Cron Job

Nov 13, 2010

Code:
#!/bin/sh
chown -Rc steven:users "/home/steven"
I have more lines in the script but each line does the same error. This is run in a cron job but it always returns.

Code:
chown: cannot access `/home/steven
': No such file or directory
But it is a valid directory I have even tried adding an / and even a space on the end and still same error.

View 7 Replies View Related

Ubuntu :: Cron Ignores Bash Script Variables

May 4, 2011

I have a personal server and a dynamic IP address, so I wrote a script to check the currently assigned IP address and compare it to the one stored in a file from the last check, and visit the update URL if it's different.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved