Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Thread: Strange behaviour on reboot.

  1. #1

    Strange behaviour on reboot.

    Hi,

    I have oleg's v10 firmware installed and I'm encoutering some strange problems.

    -the system isn't as stable as I had v8 running. The data is (thanks to the shutdown sequence, that a big plus) but the system isn't.

    Like now. The webserver (lighttpd) wasn't answering to request, so I tried to restart the service, but to no avail.
    Well, then a reboot must follow in order to get it running.
    So I do a reboot, and the Harddisk goes all crazy on me (like 20 minutes now, only reading/writing) but no reboot... A lot of services have already been shutdown, but what is it doing on the shutdown ?

    before I isued the reboot command, my output of df looked like this:
    Code:
    [admin@NAS root]$ df
    Filesystem            Size  Used Avail Use% Mounted on
    rootfs                3.0M  3.0M     0 100% /
    /dev/root             3.0M  3.0M     0 100% /
    /dev/discs/disc0/part1
                          4.7G  346M  4.2G   8% /opt
    /dev/discs/disc0/part3
                          449G  406G   21G  96% /mnt
    After 15 minutes, my output of df looked like this:
    Code:
    [admin@NAS root]$ df
    Filesystem            Size  Used Avail Use% Mounted on
    rootfs                3.0M  3.0M     0 100% /
    /dev/root             3.0M  3.0M     0 100% /
    /dev/discs/disc0/part1
                          4.7G  1.7G  2.9G  37% /opt
    /dev/discs/disc0/part3
                          449G  406G   21G  96% /mnt
    After 20 minutes, my output of df looked like this:
    Code:
    [admin@NAS root]$ df
    Filesystem            Size  Used Avail Use% Mounted on
    rootfs                3.0M  3.0M     0 100% /
    /dev/root             3.0M  3.0M     0 100% /
    /dev/discs/disc0/part1
                          4.7G  1.9G  2.7G  41% /opt
    /dev/discs/disc0/part3
                          449G  406G   21G  96% /mnt
    It writes 1.6 GByte of data to my /opt partition. and it still keeps on growing.!
    Why does it do that?


    When I take a look at /opt/var/log I see a strange file 'messages'

    Code:
    [admin@NAS root]$ cd /opt/var/log
    [admin@NAS log]$ ls
    total 1591484
    drwxr-xr-x  4 admin root       4096 May  4 00:00 .
    drwxr-xr-x 10 admin root       4096 Feb 13 18:27 ..
    drwxr-xr-x  2 admin root       4096 Apr 26 18:54 lighttpd
    -rw-r--r--  1 admin root      11178 May  3 10:04 mediatomb
    -rw-------  1 admin root 1627985847 May  4 14:58 messages
    -rw-------  1 admin root       7195 May  4 00:00 messages.1.gz
    drwxr-xr-x  2 admin root       4096 Apr 26 18:54 samba
    -rw-------  1 admin root      51052 May  1 20:44 vsftpd.log
    It's 1.6 GBytes big, and keeps on growing.

    The contents of my pre-shutdown files is :
    Code:
    #! /bin/sh
    
    /opt/etc/init.d/rc.unslung stop
    
    sleep 10s
    
    for i in `cat /proc/mounts | awk '/ext3/{print($1)}'` ; do
      mount -oremount,ro $i
    done
    
    swapoff -a
    
    sleep 1s
    seems like I'm in some kind of program loop which keeps on writing to /opt/var/log/messages


    Does anyone know what's going on and how I can prevent this behaviour.
    (the other packages I'm running differ slightly from the ones in the HeadStart image.)


    Thanks all.

  2. #2
    Join Date
    Nov 2007
    Location
    EU's border...
    Posts
    71
    Hi Raas,

    You are using old Wengi's startup script for syslogd.
    Try al37919's version of this script.

    /opt/var/log/messages (former name: /tmp/syslog.log) is the place where you can find what program was responsible for this "jabbering".
    Post some passages from log.

  3. #3
    Hi Serpent,

    Thanks for your sugestion!
    I will try this script tonight.
    And i will post some from the log file (if it's not to big for me to open )

    many thanks!

  4. #4
    Join Date
    Feb 2005
    Location
    Germany - Frankfurt
    Posts
    1,548
    Hi raas,

    as Serpent pointed out this was an issue when mixing script of old and new howto.
    I updated the howto today.
    check your S05syslogd, the transmission.conf and the logrotate.

    wengi
    Übersicht aller HowTos --- HowTo Overview (mostly german)
    WL-HDD mit diesem Setup. --- WL-HDD with this setup.
    Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread!
    Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein)

  5. #5
    Hi,

    seems that Serpent's suggestion did the trick.

    Wengi, thanks for the heads-up. I've checked those files and they seem to log to /opt/var/log/messages.

    I have done all the changes to the router yesterday evening. The webserver is still running so I guess it's all ok now. Will check tonight if it's really true.

  6. #6
    Join Date
    Feb 2005
    Location
    Germany - Frankfurt
    Posts
    1,548
    Nice to hear that.

    On my side transmission.cgi and general performance problems remain.
    I am thinking about going back to -8.

    wengi
    Übersicht aller HowTos --- HowTo Overview (mostly german)
    WL-HDD mit diesem Setup. --- WL-HDD with this setup.
    Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread!
    Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein)

  7. #7
    On my side transmission.cgi and general performance problems remain
    I have to check that one (transmission), as I don't really use that kind of downloading.

    o.t.o.h. in -8 I had faster transfer speed to the asus (writing with almost 4mbyte/sec with vsftpd) than reading from the asus (reading with almost 3,5mbyte/sec with vsftpd)

    now, in -10 it's the other way around:
    uploading to the asus results in almost 3.5 mbyte/sec with vsftpd.
    downloading from the asus results in almost 4.0 mbyte/sec with vsftpd.
    (this is nice, as I download more from the asus as I upload.)

    but yeah, the system is stable, but -8 seemed more stable.

    OFFTOPIC:
    However, I really like the work that has been done by oleg in -10 so I don't want to complain a lot about this.
    Being a software developer/analyst myself I do know that some (middle) versions just don't cut it. The good thing about that is that the update which follows on that one is usually really really good. (but that one just hasn't been released yet )
    (as you all may know off M$ Millenium.. (as a middle version, upgrade for win98, and to keep consumers satisfied for giving the great server2000 to the companies) boy that was crap, while it's successor (xp) was (and still is) really great.) and boy... now vista. (do I need to say more)... you can bet, the new windows (min-win) will be really great.
    ONTOPIC:

    Still, I don't think it's to far-fetched to make -10 as good as -8

  8. #8
    Join Date
    Feb 2005
    Location
    Germany - Frankfurt
    Posts
    1,548
    You are absolutely right but unfortunately i have a WL-HDD so there will be no newer versions....
    The -9 is the last firmware supporting this devices.

    wengi
    Übersicht aller HowTos --- HowTo Overview (mostly german)
    WL-HDD mit diesem Setup. --- WL-HDD with this setup.
    Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread!
    Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein)

  9. #9
    Quote Originally Posted by wengi View Post
    You are absolutely right but unfortunately i have a WL-HDD so there will be no newer versions....
    The -9 is the last firmware supporting this devices.

    wengi
    Wengi, perhaps we should raise a donation for you so you can buy a premium. Afterall, you've done so much for this community. The least we can do is spend a couple of euro's each with other forum members so you can continue your great tutorial(s) and help.

    btw.. transmission seems to work, at least it's downloading, but the cgi-script returns a 500

  10. #10
    Well, now something other. vsftpd stopped working. it is installed, but the daemon isn't running..

    vsftpd being started by xinetd which changed a bit is the reason why it won't start.

    removed vsftpd, and re-installed.
    Now I get the following message, which makes sense, but I'm not sure wheter I should put this in the rc.unslung file or the S10xinetd

    Code:
    Configuring vsftpd
    You'll need to add line like
    echo "ftp stream tcp nowait root /opt/sbin/vsftpd /opt/etc/vsftpd.conf" >>/etc/inetd.conf
    to your /unslung/rc.xinetd file -- see the wiki at http://www.nslu2-linux.org for more info

    Here's my rc.unslung
    Code:
    #! /bin/sh
    
    # Start/stop all init scripts in /opt/etc/init.d
    # starting them in numerical order and
    # stopping them in reverse numerical order
    #
    if [ $# -ne 1 ]; then
    printf "Usage: $0 {start|stop}\n" >&2
    exit 1
    fi
    
    daemons=`echo $(/usr/bin/dirname $0)/S??*`
    [ $1 = "stop" ] && daemons=`echo $daemons | /usr/bin/tr " " "\n" |
    /usr/bin/sort -r`
    
    for i in $daemons; do
    
    # Ignore dangling symlinks (if any).
    [ ! -f "$i" ] && continue
    
    # Write to syslog
    logger -t rc.unslung "$1 service $i"
    
    case "$i" in
    *.sh)
    # Source shell script for speed.
    (
    trap - INT QUIT TSTP
    set $1
    . $i
    )
    ;;
    *)
    # No sh extension, so fork subprocess.
    $i $1
    ;;
    esac
    done
    and here my S10xinetd
    Code:
    #!/bin/sh
    #
    # Startup script for syslog
    #
    PATH=/opt/bin:/opt/sbin:/opt/local/bin:/sbin:/bin:/usr/bin:/usr/sbin
    
    LOGFILE=syslog.log
    KERNLOGFILE=kern.log
    LOG_OLD=/tmp
    LOG_NEW=/opt/var/log
    
    prefix=""
    sbindir=${prefix}/sbin
    
    NAME=syslogd
    DAEMON=${sbindir}/${NAME}
    DESC="syslogd"
    OPTIONS="-m 0 -O $LOG_NEW/$LOGFILE -S -l 6 -s 0"
    
    case "$1" in
        start0)
            printf "Starting ${DESC}: "
    # Copy old syslog and create symlink to new
            if [ ! -L /tmp/syslog.log ]; then
              cat $LOG_OLD/$LOGFILE >> $LOG_NEW/$LOGFILE
              mv $LOG_OLD/$LOGFILE $LOG_NEW/$KERNLOGFILE
              ln -s $LOG_NEW/$LOGFILE $LOG_OLD/$LOGFILE
            fi
            ${DAEMON} ${OPTIONS}
            printf "${NAME}.\n"
            logger -t ${NAME} "started."
        ;;
        stop)
            if [ -n "`pidof syslogd`" ]; then
              printf "Stopping ${DESC}: "
              killall "${NAME}"
              printf "${NAME}.\n"
            fi
        ;;
        start|restart|force-reload)
            $0 stop
            sleep 1
            $0 start0
        ;;
        *)
            printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2
            exit
        ;;
    esac
    
    exit 0
    thanks again.

  11. #11
    Join Date
    Feb 2005
    Location
    Germany - Frankfurt
    Posts
    1,548
    Hi raas,

    my WL-HDD will do its job the next months/years. No need to spend money. A WL-500 would not help me in any way because i need a little box with integrated HDD.
    On the other hand i am also working on freetz (www.freetz.org | Modding AVM Fritz!Box | not as a dev). There is already a transmission port in freetz and the discussion of a WebUI is going on.

    If you want to start vsftpd with xinetd you should enter the information (ftp stream tcp nowait root /opt/sbin/vsftpd /opt/etc/vsftpd.conf) to a file like /opt/etc/xinetd.d/vsftpd
    Simply have a look at the chapter starting samba with xinetd.

    wengi
    Last edited by wengi; 07-05-2008 at 09:41. Reason: typo
    Übersicht aller HowTos --- HowTo Overview (mostly german)
    WL-HDD mit diesem Setup. --- WL-HDD with this setup.
    Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread!
    Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein)

  12. #12
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    this line is intended for standard inetd. We use xinetd which uses different kind of configuration. You have to create /opt/etc/xinetd.d/vsftpd file. As wengi pointed you may base it upon samba xinetd conf file. In principle there was a macsat tutorial on starting vsftpd from xinetd.

  13. #13
    Hi,

    I've managed to get a little further.
    Seems that I had mixed up some things.
    The contents of my S10xinetd was content that should be in the S05syslogd.
    So the syslogd worked, although being started by the wrong file.
    xinetd wasn't running. So I looked up the correct script for this and put the content in S10xinetd.
    xinetd now runs (shows as a process) but I have not managed to get vsftdp running. It's all a bit confusing on what I have to do. I will look further into this.
    In the meanwhile, because I really need the ftp server, I have installed proftpd which also can run as a xinetd daemon, but I run it standalone, I works, but it's slow. will use this as long as I haven't figured it out.

  14. #14
    Join Date
    Feb 2005
    Location
    Germany - Frankfurt
    Posts
    1,548
    Hi raas,

    <offtopic>
    Are you using transmission.cgi with lighttpd or busybox-httpd?
    If lighttpd: Is your transmission Webinterface hanging from time to time?
    </offtopic>

    simply copy your /opt/etc/xinetd.d/netbios-ns to /opt/etc/xinetd.d/vsftpd and edit the vsftpd file with your needs.

    wengi
    Übersicht aller HowTos --- HowTo Overview (mostly german)
    WL-HDD mit diesem Setup. --- WL-HDD with this setup.
    Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread!
    Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein)

  15. #15
    Join Date
    Nov 2007
    Location
    EU's border...
    Posts
    71
    Quote Originally Posted by wengi View Post
    simply copy your /opt/etc/xinetd.d/netbios-ns to /opt/etc/xinetd.d/vsftpd and edit the vsftpd file with your needs.
    Sorry wengi, this will never start vsftpd!
    Use this /opt/etc/xinetd.d/vsftp
    Code:
    # The vsftpd FTP server serves FTP connections.
    # It uses normal, unencrypted usernames and passwords for auth
    service ftp
    {
    disable = no
    socket_type = stream
    user = YOUR_ADMIN_USER
    server = /opt/sbin/vsftpd
    server_args = /opt/etc/vsftpd.conf
    wait = no
    nice = -10
    only_from = 192.168.XXX.0/24
    }
    And config file /opt/etc/vsftpd.conf
    Code:
    # Example config file /opt/etc/vsftpd.conf
    #
    # The default compiled in settings are fairly paranoid. This sample file
    # loosens things up a bit, to make the ftp daemon more usable.
    # Please see vsftpd.conf.5 for all compiled in defaults.
    #
    # READ THIS: This example file is NOT an exhaustive list of vsftpd options.
    # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
    # capabilities.
    #
    # Allow anonymous FTP? (Beware - allowed by default if you comment this out).
    anonymous_enable=NO
    #
    # Uncomment this to allow local users to log in.
    local_enable=YES
    #
    # Uncomment this to enable any form of FTP write command.
    write_enable=YES
    #
    # Default umask for local users is 077. You may wish to change this to 022,
    # if your users expect that (022 is used by most other ftpd's)
    local_umask=022
    #
    # Uncomment this to allow the anonymous FTP user to upload files. This only
    # has an effect if the above global write enable is activated. Also, you will
    # obviously need to create a directory writable by the FTP user.
    #anon_upload_enable=YES
    #
    # Uncomment this if you want the anonymous FTP user to be able to create
    # new directories.
    #anon_mkdir_write_enable=YES
    #
    # Activate directory messages - messages given to remote users when they
    # go into a certain directory.
    dirmessage_enable=YES
    #
    # Activate logging of uploads/downloads.
    xferlog_enable=YES
    #
    # Make sure PORT transfer connections originate from port 20 (ftp-data).
    connect_from_port_20=YES
    #
    # If you want, you can arrange for uploaded anonymous files to be owned by
    # a different user. Note! Using "root" for uploaded files is not
    # recommended!
    #chown_uploads=YES
    #chown_username=whoever
    #
    # You may override where the log file goes if you like. The default is shown
    # below.
    vsftpd_log_file=/opt/var/log/vsftpd.log
    #
    # If you want, you can have your log file in standard ftpd xferlog format
    #xferlog_std_format=YES
    #
    # You may change the default value for timing out an idle session.
    #idle_session_timeout=600
    #
    # You may change the default value for timing out a data connection.
    #data_connection_timeout=120
    #
    # It is recommended that you define on your system a unique user which the
    # ftp server can use as a totally isolated and unprivileged user.
    #nopriv_user=share
    secure_chroot_dir=/WHERE/You/WANT
    #
    # Enable this and the server will recognise asynchronous ABOR requests. Not
    # recommended for security (the code is non-trivial). Not enabling it,
    # however, may confuse older FTP clients.
    #async_abor_enable=YES
    #
    # By default the server will pretend to allow ASCII mode but in fact ignore
    # the request. Turn on the below options to have the server actually do ASCII
    # mangling on files when in ASCII mode.
    # Beware that turning on ascii_download_enable enables malicious remote parties
    # to consume your I/O resources, by issuing the command "SIZE /big/file" in
    # ASCII mode.
    # These ASCII options are split into upload and download because you may wish
    # to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
    # without the DoS risk of SIZE and ASCII downloads. ASCII mangling should 
    # be on the client anyway..
    #ascii_upload_enable=YES
    #ascii_download_enable=YES
    #
    # You may fully customise the login banner string:
    ftpd_banner=Welcome to the RAAS's vsFTP Server.
    #
    # You may specify a file of disallowed anonymous e-mail addresses. 
    # Apparently useful for combatting certain DoS attacks.
    #deny_email_enable=YES
    # (default follows)
    #banned_email_file=/opt/etc/vsftpd.banned_emails
    #
    # You may specify an explicit list of local users to chroot() to their home
    # directory. If chroot_local_user is YES, then this list becomes a list of
    # users to NOT chroot().
    #chroot_list_enable=YES
    # (default follows)
    #chroot_list_file=/opt/etc/vsftpd.chroot_list
    #
    # You may activate the "-R" option to the builtin ls. This is disabled by
    # default to avoid remote users being able to cause excessive I/O on large
    #sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
    # the presence of the "-R" option, so there is a strong case for enabling it.
    ls_recurse_enable=YES
    local_root=/WHERE/You/WANT

Page 1 of 2 12 LastLast

Similar Threads

  1. Eigenes Script nach reboot mitstarten
    By triple in forum German Discussion - Deutsch (DE)
    Replies: 2
    Last Post: 16-05-2006, 21:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •