Amazing. Will try that now.

Thanks!

On Fri, Oct 26, 2012 at 4:01 PM, Bap <old_ho...@a1.org.uk> wrote:

> Quoting Charles-Axel Dein <charlesaxel.d...@gmail.com>:
>
>  Hi,
>>
>> I'm trying to have MySQL and Redis run on two different ports. Since I
>> want
>> to parallelize builds, I'm using this command to find an unused,
>> unprivileged port:
>>
>> export MYSQL_PORT=$( (netstat  -atn | awk '{printf "%s\n%s\n", $4, $4}' |
>> grep -oE '[0-9]*$'; seq 32768 61000) | sort -n | uniq -u | head -n 1)
>> export REDIS_PORT=$( (netstat -atn | awk '{printf "%s\n%s\n", $4, $4}' |
>> grep -oE '[0-9]*$'; seq 32768 61000) | sort -n | uniq -u | grep -v
>> $MYSQL_PORT | head -n 1)
>>
>> Yet I'm always getting all sorts of :
>>
>> uniq: write error: Broken pipe
>> grep: writing output: Broken pipe
>>
>> I tried running those commands on the machine with the jenkins user, they
>> work perfectly.
>>
>> Any idea?
>>
>> Thanks!
>>
>> Charles
>>
>
> Have you seen https://wiki.jenkins-ci.org/**display/JENKINS/Port+**
> Allocator+Plugin<https://wiki.jenkins-ci.org/display/JENKINS/Port+Allocator+Plugin>?
>
> May make your job a bit easier :-)
>
>

Reply via email to