Re: Problems w/Mozilla 1.7.3 on Solaris 9 - UPDATE

2005-01-05 Thread Matthias Kurz
On Mon, Jan 03, 2005, Doug Summers wrote:

 Doug Summers wrote:
 Using OpenPKG 2.2.2, compiled from source...
 Installed to /openpkg, which is symlinked to /usr/local...
 
 After compiling and installing Mozilla 1.7.3 (from release/2.2/SRC/PLUS) 
 it won't run, giving me this error:

Oh, i did not see the won't run

 [EMAIL PROTECTED] /usr/local/RPM/PKG # mozilla
 couldn't set locale correctly

Just a warning, should not lead to a crash.

[...]
 After tweaking the /openpkg/bin/mozilla startup script to not try to set 
 the LANG variable the locale errors go away, but now Mozilla gives me 
 this (as any user including root):
 
 mozilla -v
 mozilla: process still not running (not available remotely)
 mozilla: running new process
 mozilla: exec: /openpkg/lib/mozilla/mozilla /dev/null 21 


Try the following script e.g. with mozilla -l /tmp/mozilla.log and
look in the logfile.

8--8---8--8---
#!/bin/sh
##
##  mozilla -- Mozilla Browser Startup Control Utility
##  Copyright (c) 2000-2003 The OpenPKG Project http://www.openpkg.org/
##  Copyright (c) 2000-2003 Ralf S. Engelschall [EMAIL PROTECTED]
##  Copyright (c) 2000-2003 Cable  Wireless http://www.cw.com/
##
##  Permission to use, copy, modify, and distribute this software for
##  any purpose with or without fee is hereby granted, provided that
##  the above copyright notice and this permission notice appear in all
##  copies.
##
##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
##  SUCH DAMAGE.
##

#   configuration
mozilla_dir=/opkg/lib/mozilla
mozilla_bin=/opkg/lib/mozilla/mozilla
xsel_bin=/opkg/bin/xsel
wmctrl_bin=/opkg/bin/wmctrl

#   option parsing
opt_v=no
opt_w=no
opt_t=no
opt_r=
opt_l=/dev/null
while [ .$1 != . ]; do
case $1 in
-m|-mail|--mail ) opt_m=yes; shift ;;
-v|--verbose) opt_v=yes; shift ;;
-w|--window ) opt_w=yes; shift ;;
-t|--tab) opt_t=yes; shift ;;
-r|-remote|--remote ) opt_r=$2; shift; shift ;;
-l|--log) opt_l=$2; shift; shift ;;
-* ) echo $0:ERROR: invalid option \$1\ 12; exit 1 ;;
* ) break ;;
esac
done
if [ $# -eq 0 ]; then
set -- 
fi

(echo \n; date; echo \n) $opt_l

verbose () {
if [ .$opt_v = .yes ]; then
echo mozilla: $* 12
fi
}

#   establish Mozilla environment
MOZILLA_FIVE_HOME=$mozilla_dir
export MOZILLA_FIVE_HOME
LANG=en_US.ISO8859-1
export LANG

#   special case of direct remote option
if [ .$opt_r != . ]; then
verbose exec: $mozilla_bin -remote \$opt_r\
exec $mozilla_bin -remote $opt_r
fi

#   special case of direct email option
if [ .$opt_m != . ]; then
$mozilla_bin -remote ping() $opt_l 21
if [ $? -eq 0 ]; then
verbose $mozilla_bin -remote \xfeDoCommand(openInbox)\
$mozilla_bin -remote xfeDoCommand(openInbox)
else
verbose exec: $mozilla_bin -mail
exec $mozilla_bin -mail
fi
fi

#   determine Mozilla run-time status
$mozilla_bin -remote ping() $opt_l 21
if [ $? -eq 0 ]; then
verbose process already running (available remotely)
restart=no
else
verbose process still not running (not available remotely)
restart=yes
fi

#   open one or more URLs
first=yes
for url in $@; do
#   determine URL to open
if [ .`echo .$url | grep '@'` != . ]; then
#   expand at-sign into X11 selection buffer
xsel=`($xsel_bin --paste) 2$opt_l`
url=`echo $url | sed -e s;@;$xsel;`
fi
if [ .$url = . ]; then
#   expand an empty URL into the internal blank page
url=about:blank
else
#   expand special URL constructs
case $url in
auto:* )
url=`echo $url | sed -e 's;^auto:;;'`
case $url in
http://* | https://* | ftp://* | file://* ) ;;
www.* ) url=http://$url; ;;
ftp.* ) url=ftp://$url; ;;
*.tar.gz | *.tgz ) url=ftpsearch:$url ;;
* * ) url=google:$url ;;
[0-9]* ) url=rfc:$url ;;
* ) url=leo:$url ;;
esac
;;
esac
case $url in
http://* | https://* | ftp://* | file://* )
: # URL is 

mysqld_safe and ulimit

2005-01-05 Thread Dimitri Aivaliotis
Hello,

I'm new to OpenPKG, but I like what I see so far.

I've got a question about the right way to handle the following situation:

In my mysql error log, I get the following message:

Warning: setrlimit couldn't increase number of open files to more than
1024 (request: 5010)

The MySQL docs recommend that I set the ulimit in mysqld_safe.  I see
the option for this in that file: --open-files.  So, I figure I can
change this in etc/rc.d/rc.mysql:

49cd /openpkg
50 /openpkg/bin/mysqld_safe /dev/null 21 51 
--mysqld=mysqld 52 --open-files=6144 53 --pid-file=   
  54 --err-log= 

But it doesn't seem to do any good.  I still get the same mysql error
message.  My OS file limit is set much higher, and I don't have enough
open processes that they would all be used already.

An  and cpu time   (seconds, -t)  unlimited
file size   (512-blocks, -f)  390625
data seg size   (kbytes, -d)  524288
stack size  (kbytes, -s)  65536
core file size  (512-blocks, -c)  unlimited
max memory size (kbytes, -m)  unlimited
locked memory   (kbytes, -l)  unlimited
max user processes  (-u)  7390
open files  (-n)  1024
virtual mem size(kbytes, -v)  unlimited
sbsize   (bytes, -b)  unlimited shows that:

open files(-n) 6144

Does anyone have any hints as to how I can solve this problem?

BTW,

in etc/rc.d/rc.mysql:

--err-log= 

was

--err-log= 

Before I changed it.  mysql_log_err is not defined, so I took this to
be a bug and corrected it.

My mysql version is: mysql-4.0.21-2.2.1
OpenPKG version: openpkg-2.2.0-2.2.0

Thanks,

- Dimitri
__
The OpenPKG Projectwww.openpkg.org
User Communication List  openpkg-users@openpkg.org


Re: mysqld_safe and ulimit

2005-01-05 Thread Dimitri Aivaliotis
On Wed, 5 Jan 2005 13:08:36 +0100, Michael van Elst [EMAIL PROTECTED] wrote:
 On Wed, Jan 05, 2005 at 12:25:30PM +0100, Dimitri Aivaliotis wrote:
 
  Warning: setrlimit couldn't increase number of open files to more than
  1024 (request: 5010)
 
 MySQL can only set a 'soft limit' for the number of open files that
 must not be above the 'hard limit'.
 
 The 'hard limits' can be displayed with 'ulimit -Ha' and can be
 changed only by root with e.g. 'ulimit -H -n 1'.

Ah...thank you.

 
 To get larger 'hard limits' for ordinary users you may configure
 these in /etc/security/limits.conf and tell PAM to use the
 pam_limits.so module in /etc/pam.d/.
 

Ok.  I've now got:

*   hardnofiles 1

in /etc/security/limits.conf

and pam_limits.so is already in /etc/pam.d/system-auth

 There is another system wide limit for open files. You can
 query it with 'cat /proc/sys/fs/file-max' and also change
 it with something like 'echo 12345 /proc/sys/fs/file-max'.
 This must be larger than the 'hard limit' you want to set :)
 

This is already at 104856.

su'ing to openpkg-r still doesn't indicate the higher hard limit.  My
/etc/pam.d/su file has:

sessionrequired /lib/security/pam_stack.so service=system-auth

and in system-auth:

session required  /lib/security/pam_limits.so

A restart of MySQL indicates the same error.

What am I missing here?

- Dimitri
__
The OpenPKG Projectwww.openpkg.org
User Communication List  openpkg-users@openpkg.org


Re: mysqld_safe and ulimit

2005-01-05 Thread Dimitri Aivaliotis
On Wed, 5 Jan 2005 15:47:48 +0100, Michael van Elst [EMAIL PROTECTED] wrote:
 On Wed, Jan 05, 2005 at 02:03:58PM +0100, Dimitri Aivaliotis wrote:
 
  *   hardnofiles 1
  What am I missing here?
 
 The attribute is 'nofile' without the s :)
 

I feel stupid. :)

It works now.  Thank you very much.

- Dimitri
__
The OpenPKG Projectwww.openpkg.org
User Communication List  openpkg-users@openpkg.org