sh: rrdtool: not found; no .pngs visible on dashboard

57 views
Skip to first unread message

Ken Johnson

unread,
Feb 10, 2015, 12:59:25 PM2/10/15
to mail...@googlegroups.com

in /var/mailserv/admin/log/mongrel.log, five errors:

"sh: rrdtool: not found"

and the mem, cpu, mail, swap, and mail_block .png files used on the dashboard are not present.

"which rrdtool" gives

/usr/local/bin/rrdtool

It seems likely that some ruby module wants to run rrdtool to generated the .png files; and the path is wrong or missing.

Has anyone else already fixed this problem, or do you have more ruby experience than me and have pointers about where to look?

Thanks,

Ken





David Gnojek

unread,
Feb 16, 2015, 9:24:13 AM2/16/15
to mail...@googlegroups.com
Hi Ken,

Which branch and when did you install?

There had been a problem with ruby-rrd module and showing dashboard graphs ended up with the error you wrote above in mailserv55 and mailserv-devel(56) until Nov2014. After that I replaced ruby-rrd with standard system rrdtools and since that graphs are showed correctly. I did a test installation of mailserv55 to make me sure and the dashboard graphs works fine today.
here is a complete git patch related to dashboard graphs:
https://github.com/mailserv/mailserv/commit/5ae79fec332f8889ece5372133ed7d67a6b6d05d

Cheers

David



--
You received this message because you are subscribed to the Google Groups "mailserv" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mailserv+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kenneth Johnson

unread,
Feb 16, 2015, 5:21:49 PM2/16/15
to mail...@googlegroups.com
David,

Thank you for your helpful and friendly response.  It was on my list to follow up here, but other demands on my time have proved urgent.

I installed the devel branch on OpenBSD 5.6 release version on 2 Feb 2015.  A brute-force application of grep lead me to /var/mailserv/admin/lib/rrdmon.rb, which uses a system call to run rrdtool.  Evidently the shell invoked by the system call does not have the standard paths.  Replacing 'rrdtool' with '/usr/local/bin/rrdtool' in that file makes the images appear on the dashboard.  The images appear correct, as far as I can tell.  As far as I know, I have not taken any steps that would change the default behavior of that system call.

I have observed the same symptom ("sh: rrdtool: not found") on another installation, which I understand to be branch 5.5 on OpenBSD 5.5, installed about 20 Jan 2015.  Modifying rrdmon.rb to use the complete path to rrdtool fixed the " ..not found" errors, but the graphs still are not correct.  mongrel log file messages on this 5.5 system suggest that these libraries:

'libfontconfig.so.9.0'
'libfreetype.so.22.0'
'libpixman-1.so.32.4'
'libpthread-stubs.so.2.0'
'libX11.so.16.0'
'libxcb.so.3.0'
'libxcb-render.so.1.0'
'libxcb-shm.so.1.0'
'libXext.so.13.0'
'libXrender.so.6.0'
 
are missing (cannot be loaded by rrdtool), which may well account for it.  I have not fully diagnosed that problem.  It may go unsolved as we are considering updating that system to OpenBSD 5.6 and the devel branch.

Let me know if I can supply additional information that would be helpful to you.

Ken



--
You received this message because you are subscribed to a topic in the Google Groups "mailserv" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mailserv/yHBR0lDI1cc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mailserv+u...@googlegroups.com.

David Gnojek

unread,
Feb 23, 2015, 11:33:55 AM2/23/15
to mail...@googlegroups.com

thanks for info Ken,
I tried to install booth mailser55 and mailserv56devel but was not able to reproduce the problem till now.
+ For OS I use stable release of OBSD55/OBSD56. I downloaded and installed from  f.e. here http://ftp.openbsd.dk/pub/OpenBSD/5.5/i386/install55.iso (or for 56 http://ftp.openbsd.dk/pub/OpenBSD/5.6/i386/install56.iso)
Mailserv is developed only for stable OBSD version which are released every Mays and Novembers

Most likely the problem can be you installed on some nightly build of OBSD. can't be?
if yes, can you try to install once again from scratch with the mentioned versions?

Cheers
David




Kenneth Johnson

unread,
Feb 23, 2015, 12:51:45 PM2/23/15
to mail...@googlegroups.com
David,

I thought I used the OpenBSD stable release from Nov 2014.  I am downloading from the link you provided above, (or for 56 http://ftp.openbsd.dk/pub/OpenBSD/5.6/i386/install56.iso) and I will compare it to the install CD that I used.

Kenneth Johnson

unread,
Feb 23, 2015, 2:06:25 PM2/23/15
to mail...@googlegroups.com
David,

The dates, times, and contents of the files on the two 5.6 install CDs are the same.  I will explore other possibilities.

Kenneth Johnson

unread,
Feb 23, 2015, 3:44:03 PM2/23/15
to mail...@googlegroups.com
David,

I reviewed the install log file from the 5.6/5.6-devel system, (I used script during the install) and found no obvious problems.  ps -e -p on the two mongrel processes shows a path of:  "PATH=/sbin:/bin:/usr/sbin:/usr/bin" for each.  Adding this code to rrdmon.rb:

system <<-eos
  echo $PATH 1>&2
eos

puts this output into mongrel.log:

/sbin:/bin:/usr/sbin:/usr/bin

So my question is:  Do your mongrel processes have different paths?  or is your rrdtool in a different location than mine, which is /usr/local/bin/?

Thanks,

Ken

David Gnojek

unread,
Mar 4, 2015, 5:04:05 AM3/4/15
to mail...@googlegroups.com
I have the same path like yours PATH=/sbin:/bin:/usr/sbin:/usr/bin for booth mongrel process

global echo $PATH looks like this: /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin

rrdtool I have same as well in /usr/local/bin/

cron runs rrdmon.rb every 5 mins  and use defined path in the header as well. pls check which PATH is written in your crontab -e
my crontab  has this PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin in the header

Cheers
David

David Gnojek

unread,
Mar 4, 2015, 5:40:18 AM3/4/15
to mail...@googlegroups.com
I have the same path like yours PATH=/sbin:/bin:/usr/sbin:/usr/bin for booth mongrel process

global echo $PATH looks like this: /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin

rrdtool I have same as well in /usr/local/bin/

cron runs rrdmon-pool every 5 mins  and use defined path in the header as well. pls check which PATH is written in your crontab -e
my crontab  has this PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin in the header

Cheers

Kenneth Johnson

unread,
Mar 6, 2015, 2:11:20 PM3/6/15
to mail...@googlegroups.com
From your description, the path in the crontab is probably the issue.  Offhand, I don't know why mine would be different, but this seems to focus the problem.  Thanks.

I'll check.  I'll get back here Saturday.

Kenneth Johnson

unread,
Mar 7, 2015, 7:37:12 PM3/7/15
to mail...@googlegroups.com
Crontab -l for root, with some other cron jobs omitted on the 5.6/5.6-devel system.

# crontab -l
SHELL=/bin/sh

PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
#minute hour    mday    month   wday    command
# ...
# Collect System stats
#
*/5     *       *       *       *       /var/mailserv/scripts/rrdmon-poll >/dev/null 2>&1

This looks like it should work to put /usr/local/bin into the cron job's path.

I'll dig into it further.

Sander Lusterson

unread,
Mar 24, 2015, 10:21:13 AM3/24/15
to mail...@googlegroups.com

Hi all,

I am not 100% sure whether this is related to the same issue, but in a fresh 5.5 installation the dashboard is only showing squares inside the graphs for description of the axes. I have attached a pic to this post.

Using OBSD 5.5 i386, the only package from the x-group that was installed was xbase, and I responded no during the installer whether an xorg server is going to be installed.

During installation of MailServe, I found a font related error message:

Fontconfig error: Cannot load default config file

install.log-You may wish to update your font path for /usr/local/share/ghostscript/fonts
install
.log:Fontconfig error: Cannot load default config file
install
.log-The following new rcscripts were installed: /etc/rc.d/avahi_daemon /

(There was also an error with highline, as they dropped ruby 1.8 support with 1.7, but manually installing the gem and running the rake command fixed the issue and I was able to add an admin).

Did I do something wrong during installation? From the Homepage, it appears that only the three listed packages are required?! Should I add all the X related packages?

Thanks a lot! I'd love to get this running.

Cheers
SAnder

Kenneth Johnson

unread,
Apr 5, 2015, 4:37:44 PM4/5/15
to mail...@googlegroups.com
David,

I'm still using the same OBSD 5.6, and a devel install from the end of last year.

For me, rrdmon-poll has the right paths to run rrdtool, consistent with the setup in the root crontab.

But /var/mailserv/admin/lib/rrdmon.rb runs in the mongrel context, it does not have the right paths to run rrdtool, and when it tries it fails.  I don't understand why that works for you.  I think the most straightforward solution for me is to explicitly specify the path to rrdtool in rrdmon.rb; that solves the problem with no risks of side effects.

David Gnojek

unread,
Apr 24, 2015, 9:31:32 AM4/24/15
to mail...@googlegroups.com
Hi Sander,
thanks you found this bugs. I tried to investigate little bit.

1) Rrdtools
indeed when I installed OBSD56 just with Xbase, then there was missing /etc/fonts/fonts.conf and rrdtools failed
with following error and PNG's was with squares instead of proper text  (# Fontconfig error: Cannot load default config file, (process:20378): Pango-WARNING **: failed ......)

To fix it. I had to download and unpack xetc56.tgz into system which covers the fonts.conf. then renewed data in rrdtools by running manually /var/mailserv/scripts/rrdmon-poll to see the result.
Adding this requirement for the xetcXX.tgz in to the installation instructions

2) Highline
patched  by installing latest version which works
 /usr/local/bin/gem install highline -v 1.6.21

Cheers
David

GrahamM

unread,
Jun 9, 2015, 7:38:16 AM6/9/15
to mail...@googlegroups.com

I did a clean install of the 5.6 branch of mailserv on OBSD56 (amd64), and I've encountered the issues with RRD, and with non-rendered fonts. The font issue was fixed by ensuring that xfonts56.tgz was installed, so it might be worth updating the installation instructions. I haven't entirely fixed the RRD issues, as I'm having some issue tracking down where it is called from!

Thanks,

Graham

Ole Schelde

unread,
Jul 18, 2015, 7:15:45 AM7/18/15
to mail...@googlegroups.com
I have made a clean install of the 5.6 branch of mailserv on a new OBSD56 (amd64), and I've also encountered the issues with RRD. 

The .png files on the Dashboard does not show text.

I have verified that the script rrdmon-poll runs every 5 minutes, and it update the rrd data files in /var/spool/rrd, but the image files in /var/mailserv/app/public/images/rrd/daily/ are not updated and the files that are there show squares instead of text.

Regards,
Ole






David Gnojek

unread,
Aug 11, 2015, 12:10:07 PM8/11/15
to mail...@googlegroups.com
Hi,

my appologize for delay, there is necessary to install mailserv with xfonts56 as well.  I have updated  documentation already. 
Patched as well a problem with gem rdoc during installation. 
Now it works.

Cheers

David



Reply all
Reply to author
Forward
0 new messages