Logging to Papertrail with PM2 - node.js

I'm trying to get my node app logs to show up on papertrail using pm2 as my process manager.
As of now, I have the pm2 logging to a file defined in my process.json. I want to set it up where I keep a local copy of my logs as well as send them to papertrail so I can see them without ssh.
I followed the papertrail start guide and added the output to /etc/rsyslog.conf and on papertrail's console, i see the following:
Sep 28 16:35:47 ip-172-31-16-83 sudo: ubuntu : TTY=pts/0 ; PWD=/home/ubuntu/api-nodejs ; USER=root ; COMMAND=/usr/bin/nano /etc/rsyslog.conf
Sep 28 16:35:47 ip-172-31-16-83 sudo: pam_unix(sudo:session): session opened for user root by ubuntu(uid=0)
Sep 28 16:36:03 ip-172-31-16-83 sudo: pam_unix(sudo:session): session closed for user root
Sep 28 16:36:05 ip-172-31-16-83 sudo: ubuntu : TTY=pts/0 ; PWD=/home/ubuntu/api-nodejs ; USER=root ; COMMAND=/usr/bin/nano /etc/rsyslog.conf
Sep 28 16:36:05 ip-172-31-16-83 sudo: pam_unix(sudo:session): session opened for user root by ubuntu(uid=0)
Sep 28 16:36:23 ip-172-31-16-83 sudo: pam_unix(sudo:session): session closed for user root
Sep 28 16:36:27 ip-172-31-16-83 sudo: ubuntu : TTY=pts/0 ; PWD=/home/ubuntu/api-nodejs ; USER=root ; COMMAND=/usr/sbin/service rsyslog restart
Sep 28 16:36:27 ip-172-31-16-83 sudo: pam_unix(sudo:session): session opened for user root by ubuntu(uid=0)
Sep 28 16:36:27 ip-172-31-16-83 rsyslogd: [origin software="rsyslogd" swVersion="7.4.4" x-pid="12850" x-info="http://www.rsyslog.com"] exiting on signal 15.
Sep 28 16:36:27 ip-172-31-16-83 rsyslogd: [origin software="rsyslogd" swVersion="7.4.4" x-pid="12939" x-info="http://www.rsyslog.com"] start
Sep 28 16:36:27 ip-172-31-16-83 rsyslogd-2307: warning: ~ action is deprecated, consider using the 'stop' statement instead [try http://www.rsyslog.com/e/2307 ]
Sep 28 16:36:27 ip-172-31-16-83 rsyslogd: rsyslogd's groupid changed to 104
Sep 28 16:36:27 ip-172-31-16-83 rsyslogd: rsyslogd's userid changed to 101
Sep 28 16:36:27 ip-172-31-16-83 sudo: pam_unix(sudo:session): session closed for user root
Anyone got some experience with pm2 and paprtrail? Is PM2 completely bypassing rsyslog and is there a way for me to pipe pm2's log to papertrail another way?

I suggest you to make a pm2 module that listen for logs event (which is log:out or log:err) with pm2 bus api and send them where you want them to go.

Related

cron.hourly script is only run manually

It does not seem that file I put to /etc/cron.hourly does not seem to work
It's called cron_hourly_homepage, so it does not seem that its filename issue. Ownership seems alright as well: -rwxr-xr-x
run-parts --test /etc/cron.hourly sees this file, run-parts --report /etc/cron.hourly can run it as well
Would like to get it fixed, so no crontab recommendations are necessary :D
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-12-27 20:20:40 GMT; 1 day 23h ago
Docs: man:cron(8)
Main PID: 401 (cron)
Tasks: 1 (limit: 4915)
CPU: 9.213s
CGroup: /system.slice/cron.service
└─401 /usr/sbin/cron -f
Dec 29 17:19:01 raspberrypi CRON[9255]: (CRON) info (No MTA installed, discarding output)
Dec 29 17:19:01 raspberrypi CRON[9255]: pam_unix(cron:session): session closed for user root
Dec 29 18:17:01 raspberrypi CRON[9427]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Dec 29 18:17:01 raspberrypi CRON[9428]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
It is common to forget cron scripts are running without a shell and no environment context.
Please see this answer

My python script as in cron job in docker container fail to writefiles

I have a simple python script that runs a sql query and converts the query results into csv (and parquet) leveraging pandas.to_csv(path/to/csv-file) (and pandas.to_parquet(path/to/parquet-file)
I'm using Docker Desktop in Windows 10. I have WSL installed -which I believe Docker Desktop somehow connects to that.
My python script 'main.py`:
import vertica_python as vp
import pandas as pd
from datetime import datetime as dt
connection_settings = {
'host': 'host.host',
'port': 5433,
'user': "user",
'password': "password",
'database': 'db'
}
def pull_data_vertica():
sql_file = "sample.sql"
with open(sql_file) as f:
query = f.read()
connection = vp.connect(**connection_settings)
temp = pd.read_sql(query, connection)
connection.close()
_pre = "/app/data_from_vertical_"
_dt = dt.now().strftime('%Y-%m-%d-%H-%M')
csv_out = _pre + _dt + '.csv'
temp.to_csv(csv_out)
parquet_out = _pre + _dt + '.parquet'
temp.to_parquet(parquet_out)
return csv_out, parquet_out
if __name__ == "__main__":
a, b = pull_data_vertica()
The Dcokerfile is as following:
FROM ubuntu:latest
RUN apt-get update
RUN apt-get install -y build-essential python3.8 python3-pip python3-dev cron vim busybox
WORKDIR /app
RUN pip3 -q install pip --upgrade
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
RUN rm requirements.txt
COPY crontab /etc/cron.d/crontab
RUN chmod 0644 /etc/cron.d/crontab
COPY script/main.py main.py
COPY script/sample.sql sample.sql
RUN chmod 0644 /app/main.py
RUN /usr/bin/crontab /etc/cron.d/crontab
CMD ["cron", "-f"]
here is my crontab:
* * * * * /usr/bin/python3 /app/main.py
I docker build the image, then docker run it in detached mode, and by docker exe ... bash I get into the container bash.
In there, I can manually execute my main.py and everything works. However, the cron job seems to be failing to produce the csv file, i.e., no file is written. I also don't have access to any log file to check if there is any issue with the cron job.
notes:
I see cron is the main process in the container (using top).
I did try to put the corntab content in a .sh script and execute that but all is the same with above: the .sh alone runs perfectly and files are written, however in the cronjob nothing happens.
I added shebang #!/usr/bin/env python3 on top of main.py script.
Update:
I installed busybox and modified the last line of Dockerfile to the following:
CMD busybox syslogd && cron -f
then in the container, I found the content /var/log/messages as following:
Oct 28 02:11:59 0ad085300c89 syslog.info syslogd started: BusyBox v1.30.1
Oct 28 02:11:59 0ad085300c89 cron.info cron[9]: (CRON) INFO (pidfile fd = 3)
Oct 28 02:11:59 0ad085300c89 cron.err cron[9]: Error: bad username; while reading /etc/cron.d/crontab
Oct 28 02:11:59 0ad085300c89 cron.info cron[9]: (*system*crontab) ERROR (Syntax error, this crontab file will be ignored)
Oct 28 02:11:59 0ad085300c89 cron.info cron[9]: (CRON) INFO (Running #reboot jobs)
Oct 28 02:12:01 0ad085300c89 authpriv.err CRON[10]: pam_env(cron:session): Unable to open env file: /etc/default/locale: No such file or directory
Oct 28 02:12:01 0ad085300c89 authpriv.info CRON[10]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 28 02:12:01 0ad085300c89 cron.info CRON[11]: (root) CMD (/usr/bin/python3 /app/main.py pull^M)
Oct 28 02:12:02 0ad085300c89 cron.info CRON[10]: (CRON) info (No MTA installed, discarding output)
Oct 28 02:12:02 0ad085300c89 authpriv.info CRON[10]: pam_unix(cron:session): session closed for user root
Oct 28 02:12:31 0ad085300c89 cron.info crontab[37]: (root) LIST (root)
Oct 28 02:13:01 0ad085300c89 authpriv.err CRON[40]: pam_env(cron:session): Unable to open env file: /etc/default/locale: No such file or directory
Oct 28 02:13:01 0ad085300c89 authpriv.info CRON[40]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 28 02:13:01 0ad085300c89 cron.info CRON[41]: (root) CMD (/usr/bin/python3 /app/main.py pull^M)
Oct 28 02:13:01 0ad085300c89 cron.info CRON[40]: (CRON) info (No MTA installed, discarding output)
Oct 28 02:13:01 0ad085300c89 authpriv.info CRON[40]: pam_unix(cron:session): session closed for user root
Oct 28 02:14:01 0ad085300c89 authpriv.err CRON[59]: pam_env(cron:session): Unable to open env file: /etc/default/locale: No such file or directory
Oct 28 02:14:01 0ad085300c89 authpriv.info CRON[59]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 28 02:14:01 0ad085300c89 cron.info CRON[60]: (root) CMD (/usr/bin/python3 /app/main.py pull^M)
Oct 28 02:14:01 0ad085300c89 cron.info CRON[59]: (CRON) info (No MTA installed, discarding output)
Oct 28 02:14:01 0ad085300c89 authpriv.info CRON[59]: pam_unix(cron:session): session closed for user root
Oct 28 02:15:01 0ad085300c89 authpriv.err CRON[81]: pam_env(cron:session): Unable to open env file: /etc/default/locale: No such file or directory
Oct 28 02:15:01 0ad085300c89 authpriv.info CRON[81]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 28 02:15:01 0ad085300c89 cron.info CRON[82]: (root) CMD (/usr/bin/python3 /app/main.py pull^M)
Oct 28 02:15:02 0ad085300c89 cron.info CRON[81]: (CRON) info (No MTA installed, discarding output)
Oct 28 02:15:02 0ad085300c89 authpriv.info CRON[81]: pam_unix(cron:session): session closed for user root
I am not sure I clearly get what cron is upset for but hope it helps.
Update 2:
Thanks to #jabbson 's comment I updfate the following:
absolute path to output file: /app/... instead of ./..
crontab is * * * * * root /usr/bin/python3 /app/main.py pull >> /app/exec.log 2>&1
here is the new /var/log/messages content:
Oct 28 03:10:36 898c63c3a4e6 syslog.info syslogd started: BusyBox v1.30.1
Oct 28 03:10:36 898c63c3a4e6 cron.info cron[10]: (CRON) INFO (pidfile fd = 3)
Oct 28 03:10:36 898c63c3a4e6 cron.info cron[10]: (CRON) INFO (Running #reboot jobs)
Oct 28 03:11:01 898c63c3a4e6 authpriv.info CRON[20]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 28 03:11:01 898c63c3a4e6 authpriv.info CRON[21]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 28 03:11:01 898c63c3a4e6 cron.info CRON[22]: (root) CMD (/usr/bin/python3 /app/main.py pull >> /app/exec.log 2>&1^M)
Oct 28 03:11:01 898c63c3a4e6 cron.info CRON[23]: (root) CMD (root /usr/bin/python3 /app/main.py pull >> /app/exec.log 2>&1^M)
Oct 28 03:11:01 898c63c3a4e6 cron.info CRON[20]: (CRON) info (No MTA installed, discarding output)
Oct 28 03:11:01 898c63c3a4e6 cron.info CRON[21]: (CRON) info (No MTA installed, discarding output)
Oct 28 03:11:01 898c63c3a4e6 authpriv.info CRON[21]: pam_unix(cron:session): session closed for user root
Oct 28 03:11:01 898c63c3a4e6 authpriv.info CRON[20]: pam_unix(cron:session): session closed for user root
Oct 28 03:12:01 898c63c3a4e6 authpriv.info CRON[25]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 28 03:12:01 898c63c3a4e6 authpriv.info CRON[26]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 28 03:12:01 898c63c3a4e6 cron.info CRON[27]: (root) CMD (/usr/bin/python3 /app/main.py pull >> /app/exec.log 2>&1^M)
Oct 28 03:12:01 898c63c3a4e6 cron.info CRON[28]: (root) CMD (root /usr/bin/python3 /app/main.py pull >> /app/exec.log 2>&1^M)
Oct 28 03:12:01 898c63c3a4e6 cron.info CRON[25]: (CRON) info (No MTA installed, discarding output)
Oct 28 03:12:01 898c63c3a4e6 cron.info CRON[26]: (CRON) info (No MTA installed, discarding output)
Oct 28 03:12:01 898c63c3a4e6 authpriv.info CRON[25]: pam_unix(cron:session): session closed for user root
Oct 28 03:12:01 898c63c3a4e6 authpriv.info CRON[26]: pam_unix(cron:session): session closed for user root
Oct 28 03:13:01 898c63c3a4e6 authpriv.info CRON[32]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 28 03:13:01 898c63c3a4e6 authpriv.info CRON[33]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 28 03:13:01 898c63c3a4e6 cron.info CRON[34]: (root) CMD (root /usr/bin/python3 /app/main.py pull >> /app/exec.log 2>&1^M)
Oct 28 03:13:01 898c63c3a4e6 cron.info CRON[35]: (root) CMD (/usr/bin/python3 /app/main.py pull >> /app/exec.log 2>&1^M)
Oct 28 03:13:01 898c63c3a4e6 cron.info CRON[33]: (CRON) info (No MTA installed, discarding output)
Oct 28 03:13:01 898c63c3a4e6 cron.info CRON[32]: (CRON) info (No MTA installed, discarding output)
Oct 28 03:13:01 898c63c3a4e6 authpriv.info CRON[32]: pam_unix(cron:session): session closed for user root
Oct 28 03:13:01 898c63c3a4e6 authpriv.info CRON[33]: pam_unix(cron:session): session closed for user root
AND NOTHING!!!!!! no log file in /app
Tried the same in Mac OS and it works in there. So this is not related to dataframe.to_csv (or dataframe.to_parquet) but I assume related to Docker Desktop on Windows and Docker Daemon.
I appreciate if you could kindly assist me with this issue.
Thanks,

vsftpd: OK LOGIN but getting repeated password prompt

I am trying to set up vsftpd on a Centos 7 server. We have a bunch of linux users with /usr/sbin/nologin shells just for the purpose of FTP. I also created a regular user testuser with a bash shell.
Anonymous logins are disabled. When I try to login to the FTP server through Chrome I get a password prompt. When I submit the password prompt I just get another password prompt, over and over. However, the contents of vsftpd's log file are as followed:
Wed Aug 5 10:32:05 2020 [pid 30282] CONNECT: Client "my.ip.goes.here"
Wed Aug 5 10:32:05 2020 [pid 30282] FTP response: Client "my.ip.goes.here", "220 SUP GUY"
Wed Aug 5 10:32:05 2020 [pid 30282] FTP command: Client "my.ip.goes.here", "USER anonymous"
Wed Aug 5 10:32:05 2020 [pid 30282] [anonymous] FTP response: Client "my.ip.goes.here", "331 Please specify the password."
Wed Aug 5 10:32:05 2020 [pid 30282] [anonymous] FTP command: Client "my.ip.goes.here", "PASS <password>"
Wed Aug 5 10:32:07 2020 [pid 30281] [anonymous] FAIL LOGIN: Client "my.ip.goes.here"
Wed Aug 5 10:32:08 2020 [pid 30282] [anonymous] FTP response: Client "my.ip.goes.here", "530 Login incorrect."
Wed Aug 5 10:32:08 2020 [pid 30282] FTP command: Client "my.ip.goes.here", "QUIT"
Wed Aug 5 10:32:08 2020 [pid 30282] FTP response: Client "my.ip.goes.here", "221 Goodbye."
Wed Aug 5 10:32:08 2020 [pid 30285] CONNECT: Client "my.ip.goes.here"
Wed Aug 5 10:32:08 2020 [pid 30285] FTP response: Client "my.ip.goes.here", "220 SUP GUY"
Wed Aug 5 10:32:08 2020 [pid 30285] FTP command: Client "my.ip.goes.here", "USER testuser"
Wed Aug 5 10:32:08 2020 [pid 30285] [testuser] FTP response: Client "my.ip.goes.here", "331 Please specify the password."
Wed Aug 5 10:32:08 2020 [pid 30285] [testuser] FTP command: Client "my.ip.goes.here", "PASS <password>"
Wed Aug 5 10:32:08 2020 [pid 30284] [testuser] OK LOGIN: Client "my.ip.goes.here"
As you can see, the last line is OK LOGIN which is funny because the browser sure isn't acting like I logged in successfully.
Here's my vsftpd.conf:
anonymous_enable=NO
local_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=YES
listen_ipv6=NO
pam_service_name=vsftpd
tcp_wrappers=YES
ssl_enable=NO
pasv_enable=YES
pasv_address=my.server.ip.here
pasv_min_port=49152
pasv_max_port=65535
ftpd_banner=SUP GUY
chroot_local_user=YES
chroot_list_enable=NO
allow_writeable_chroot=NO
write_enable=NO
userlist_enable=NO
log_ftp_protocol=YES
dual_log_enable=YES
Here's my /etc/pam.d/vsftpd file:
#%PAM-1.0
session optional pam_keyinit.so force revoke
auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
auth required pam_nologin.so
auth include password-auth
account include password-auth
session required pam_loginuid.so
session include password-auth
My testuser account is not in that ftpusers file.
And here are the directory permissions of that testuser's home directory, in case that makes a difference:
total 16K
drwx------. 2 testuser testuser 91 Aug 5 10:27 .
drwxr-xr-x. 6 root root 65 Aug 4 10:42 ..
-rw-------. 1 testuser testuser 25 Aug 5 10:27 .bash_history
-rw-r--r--. 1 testuser testuser 18 Mar 31 21:17 .bash_logout
-rw-r--r--. 1 testuser testuser 193 Mar 31 21:17 .bash_profile
-rw-r--r--. 1 testuser testuser 231 Mar 31 21:17 .bashrc
-rw-rw-r--. 1 testuser testuser 0 Aug 5 10:27 hello```
Any idea what is going on here?
Turns out the culprit was SELinux. Everything was fine as far as vsftpd was concerned, but SELinux was blocking access to that home directory. My /var/log/audit/audit.log was full of entries like this:
type=AVC msg=audit(1596625942.966:385491): avc: denied { read } for pid=6778 comm="vsftpd" name="vsftpd"
dev="sda2" ino=2013664268 scontext=system_u:system_r:ftpd_t:s0-s0:c0.c1023
tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file permissive=0
In my case I do not need SELinux, so all I needed to do was set setenforce 0 and set SELINUX=disabled in my /etc/selinux/config.

Localhost not displaying any contents

My localhost does not showing any previous contents it has, after normal system update.
What could be the possible reason for this.
However, I was able to connect to phpmyadmin.
If localhost location changed from /var/www/ to another, what could be the possible location?
System details:
Operating system - debian testing (Jessie) x86_64
Index of /
[ICO] Name Last modified Size Description
Apache/2.4.7 (Debian) Server at localhost Port 80
# /usr/sbin/apache2 -V
[Tue Mar 11 21:41:55.901363 2014] [core:warn] [pid 19737] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Tue Mar 11 21:41:55.901541 2014] [core:warn] [pid 19737] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Tue Mar 11 21:41:55.901569 2014] [core:warn] [pid 19737] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Tue Mar 11 21:41:55.901583 2014] [core:warn] [pid 19737] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Tue Mar 11 21:41:55.901616 2014] [core:warn] [pid 19737] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Tue Mar 11 21:41:55.932506 2014] [core:warn] [pid 19737] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Tue Mar 11 21:41:55.932942 2014] [core:warn] [pid 19737] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Tue Mar 11 21:41:55.932966 2014] [core:warn] [pid 19737] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf:
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}
# ps -ef | grep apache
root 16811 1 0 20:47 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 16815 16811 0 20:47 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 16816 16811 0 20:47 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 16817 16811 0 20:47 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 16818 16811 0 20:47 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 16819 16811 0 20:47 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 16820 16811 0 20:47 ? 00:00:00 /usr/sbin/apache2 -k start
This is possibly because your system's root has changed from /var/wwww to /var/www/html due to the system update.
To solve this,go to:
/etc/apache2/sites-available/000-default.conf
and set
ServerAdmin webmaster#localhost
DocumentRoot /var/www/html
You need root permission to edit the file. From terminal
sudo gedit /etc/apache2/sites-available/000-default.conf
and then edit the file and save.
After this restart your server from the terminal.
sudo service apache2 restart

Command not found even crontab PATH is set

Even though I set the PATH in /etc/crontab as
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/lib/mailman/cron:/usr/lib/mailman/bin
commands found in /usr/lib/mailman/cron are still not found, Thus issuing a mail to root saying
/bin/sh: mailman: command not found
I've debugged the problem, setting up a cron entry
* * * * * /bin/echo "`/bin/date`: $PATH" >> /tmp/crontest.log 2>&1
using crontab -e which actually do write the PATH to /tmp/crontest.log, confirming that the path entered in /etc/crontab is not what cron think it should be.
Fri Feb 14 10:22:01 CET 2014: /usr/bin:/bin
I've also tried to solve it by re-start cron using (both) service crond restart and service crond stop;sleep 5;service crond start (which does the same, but to make absolutely certain that it has been restarted), but this doesn't change anything.
The /etc/crontab file is readable by everyone (permissions is 644 root root)
-rw-r--r-- 1 root root 500 10 feb 10:36 /etc/crontab
/var/log/cron does not show anything about the problem, just what's started and when I restarted the cron
grep -v CMD /var/log/cron
.
.
.
Feb 14 09:45:34 p1kitlst01l crond[12214]: (CRON) INFO (running with inotify support)
Feb 14 09:45:34 p1kitlst01l crond[12214]: (CRON) INFO (#reboot jobs will be run at computer's startup.)
Feb 14 09:48:07 p1kitlst01l crontab[12331]: (root) BEGIN EDIT (root)
Feb 14 09:48:45 p1kitlst01l crontab[12331]: (root) REPLACE (root)
Feb 14 09:48:45 p1kitlst01l crontab[12331]: (root) END EDIT (root)
Feb 14 09:49:01 p1kitlst01l crond[12214]: (root) RELOAD (/var/spool/cron/root)
Feb 14 10:01:01 p1kitlst01l run-parts(/etc/cron.hourly)[13010]: starting 0anacron
Feb 14 10:01:01 p1kitlst01l run-parts(/etc/cron.hourly)[13027]: finished 0anacron
Feb 14 10:01:01 p1kitlst01l run-parts(/etc/cron.hourly)[13010]: starting mcelog.cron
Feb 14 10:01:01 p1kitlst01l run-parts(/etc/cron.hourly)[13039]: finished mcelog.cron
Feb 14 10:19:16 p1kitlst01l crontab[13840]: (root) BEGIN EDIT (root)
Feb 14 10:19:23 p1kitlst01l crontab[13840]: (root) END EDIT (root)
Feb 14 10:27:17 p1kitlst01l crond[14170]: (CRON) STARTUP (1.4.4)
Feb 14 10:27:17 p1kitlst01l crond[14170]: (CRON) INFO (running with inotify support)
Feb 14 10:27:17 p1kitlst01l crond[14170]: (CRON) INFO (#reboot jobs will be run at computer's startup.)
Any suggestions to what I have to look in to?
Henrik
What I think is ,you have two ways to go (maybe others provide more).
1) set the absolute path for mailman in your script.
2) source the .profile, then run the script, such as:
0 1 * * * . ~/.profile; bash your_script.sh

Resources