[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

[linux-users:77047] Suck said Timed out on Read


山本 佳織 _at_ aset と申します。
TurboLinux6.0 を使用しています。

inn-2.2.3 + suck-4.2.4 にてニュースサーバの
構築をおこなっておりますが、suck が上記
メッセージを表示し、localhost のニュースサーバに
post できません。

どなたか、アドバイスを頂けますでしょうか?


---- suck output ----
Socket error: Timed out on Read
Socket error: No data to read
Closed connection to [news-server-name]

---- get.news.innxmit ----
#!/bin/sh

#BEFORE USING - check to ensure all the paths defined below are correct!!

#NOTE: this script probably needs to be run by root.  Most systems will
# not let a normal user run ctlinnd 

REMOTE_HOST=[ニュースサーバ名]		# プロバイダのニュースサーバ名
NEWS_USER=[ニュースサーバのユーザ名]	# プロバイダのアカウント名。
NEWS_PASSWD=[同パスワード]		# 同パスワード。

LOCAL_HOST=localhost

SPOOLDIR=/var/spool/news/articles	# ニューススプールのあるディレクトリ

BASEDIR=/var/spool/suck			# get.news.innxmitを実行するディレクトリ

CTLINND=/opt2/inn/bin/ctlinnd		# location of binary
SHLOCK=/opt2/inn/bin/shlock		# location of binary

TMPDIR=${BASEDIR}                       # location for suck.* files
MSGDIR=${BASEDIR}/Msgs                  # where to put MultiFile messages when getting them

SITE=localhost				# name of site from newsfeeds file


OUTGOING=${SPOOLDIR}/out.going/${SITE}  # location of the list of articles to upload
OUTGOINGNEW=${OUTGOING}.new             # file to contain the list temporarily
OUTGOINGFAIL=${OUTGOINGNEW}.fail        # file with failed xfers
SCRIPT=${BASEDIR}/put.news              # my filter for rpost
OUTFILE=/tmp/tmp$$                      # used by rpost as article after it is filtered
LOCKFILE=${BASEDIR}/getnews.lock        # lock file to prevent multiple instances of script
NEWSGROUP=news                          # which group owns the file in out.going, typically either news or uucp.

TESTHOST=/opt2/inn/bin/testhost
RPOST=rpost
SUCK=/opt2/inn/bin/suck

# if we are already running, abort 

trap 'rm -f ${LOCKFILE} ; echo "Aborting" ; exit 1' 1 2 3 15
${SHLOCK} -p $$ -f ${LOCKFILE}
if [ $? -ne 0 ]; then
        echo "Already running, can't run two at one time"
        exit
fi

# is the local host up and running so we can post messages we download?
${TESTHOST} ${LOCAL_HOST} -s
LOCAL_RESULT=$?

# is the remote host up and running so we can download messages?
${TESTHOST} ${REMOTE_HOST} -s -U ${NEWS_USER} -P ${NEWS_PASSWD}
REMOTE_RESULT=$?

if [ ${REMOTE_RESULT} -eq 0 -a ${LOCAL_RESULT} -eq 0 ]; then
        
        # download messages
	${SUCK} ${REMOTE_HOST} -U ${NEWS_USER} -P ${NEWS_PASSWD} -c -A -bp -hl ${LOCAL_HOST} -dt ${TMPDIR} -dm ${MSGDIR} -dd ${BASEDIR}
        SUCK_STATUS=$?

        if [ ${SUCK_STATUS} -eq 0 ]; then
                echo "Downloaded Articles"
        elif [ ${SUCK_STATUS} -eq 1 ]; then
                echo "No articles to download"
        elif [ ${SUCK_STATUS} -eq 2 ]; then
                echo "Unexpected answer from remote server to an issued command"
        elif [ ${SUCK_STATUS} -eq 4 ]; then
                echo "Can't do NNTP authorization"
        elif [ ${SUCK_STATUS} -eq -1 ]; then
                echo "General failure"
        fi

        # now upload messages
        if [ -s ${OUTGOING}  -o -s ${OUTGOINGNEW} ]; then

                ${TESTHOST} ${REMOTE_HOST} -s -U ${NEWS_USER} -P ${NEWS_PASSWD}

                if [ $? -ne 0 ]; then
                        echo "Remote posting host not responding"
                else
                        # this is needed by INND so that the outgoing file will be
                        # properly flushed and we have a new blank file to work with
                        # when we are done
                        # First mv the current one to a new file name
                        # Since innd already has the file open, it doesn't care 
                        # about the rename.
                        # The flush will ensure that all messages to be posted have
                        # been written out, close off the old one (already renamed)
                        # and create a new one.

                        # if the outgoingnew already exists, it means we aborted last time
                        # so don't try to do it again
                        if [ ! -s ${OUTGOINGNEW} ]; then
                                mv ${OUTGOING} ${OUTGOINGNEW}
                                ${CTLINND} flush ${SITE}
                        fi

                        # outgoing messages to post
                        ${RPOST} ${REMOTE_HOST} -d -b ${OUTGOINGNEW} -p ${SPOOLDIR} -f \$\$o=${OUTFILE} ${SCRIPT} \$\$i ${OUTFILE} -U ${NEWS_USER} -P ${NEWS_PASSWD}

                        ERRLEV=$?
                        if [ ${ERRLEV} -eq 0 ]; then
                                echo "Remotely posted articles"
                                rm ${OUTFILE}
                        elif [ ${ERRLEV} -eq 1 ]; then
                                echo "Error posting a message"
                        elif [ ${ERRLEV} -eq 2 ]; then
                                echo "Unable to do NNTP authorization with remote server"
                        elif [ ${ERRLEV} -eq 3 ]; then
                                echo "Unexpected answer from remote server to a command while doing NNTP authorization"
                        elif [ ${ERRLEV} -eq -1 ]; then
                                echo "Fatal error"
                        fi

                        if [ -f ${OUTGOINGFAIL} ]; then
                                mv ${OUTGOINGFAIL} ${OUTGOINGNEW}       # so we can re do it
                                chown news.${NEWSGROUP} ${OUTGOINGNEW}
                                chmod 664 ${OUTGOINGNEW}
                        fi
                fi
        fi      
        
        echo "You can hang up the modem now"

fi

rm -f ${LOCKFILE}


/山本

この情報があなたの探していたものかどうか選択してください。
yes/まさにこれだ!   no/違うなぁ   part/一部見つかった   try/これで試してみる

あなたが探していた情報はどのようなことか、ご自由に記入下さい。特に「まさにこれだ!」と言う場合は記入をお願いします。
例:「複数のマシンからCATV経由でipmasqueradeを利用してWebを参照したい場合の設定について」
Follow-Ups: