BiTel

Форум BiTel
bgbilling.ru     docs.bitel.ru     wiki.bitel.ru     dbinfo.bitel.ru     bgcrm.ru     billing.bitel.ru     bitel.ru    
Текущее время: 04 июл 2025, 08:34

Часовой пояс: UTC + 5 часов [ Летнее время ]




Начать новую тему Ответить на тему  [ Сообщений: 4 ] 
Автор Сообщение
 Заголовок сообщения: 737: обнаружено замыкание на себя
СообщениеДобавлено: 09 июн 2009, 21:49 
столкнулся с проблемой у клиентов выскакивает 737 ошибка, раза с 2-10 повторного подключения все таки подключается
Код:
[~]# pptpd -v
pptpd v1.3.3


в логах следующее:
Цитата:
pptpd[14935]: CTRL: Client xx.xx.xx.xx control connection started
pptpd[14935]: CTRL: Starting call (launching pppd, opening GRE)
pppd[14936]: Plugin radius.so loaded.
pppd[14936]: RADIUS plugin initialized.
pppd[14936]: Plugin radattr.so loaded.
pppd[14936]: RADATTR plugin initialized.
pppd[14936]: pppd 2.4.4 started by root, uid 0
pppd[14936]: Failed to open /dev/pts/19: No such file or directory
pppd[14936]: Exit.
pptpd[14935]: CTRL: Client xx.xx.xx.xx control connection finished


как видно pppd отбрасывает соединение, не видит /dev/pts/19
однако тут же далее:

Цитата:
pptpd[15602]: CTRL: Client xx.xx.xx.xx control connection started
pptpd[15602]: CTRL: Starting call (launching pppd, opening GRE)
pppd[15605]: Plugin radius.so loaded.
pppd[15605]: RADIUS plugin initialized.
pppd[15605]: Plugin radattr.so loaded.
pppd[15605]: RADATTR plugin initialized.
pppd[15605]: pppd 2.4.4 started by root, uid 0
pppd[15605]: Using interface ppp19
pppd[15605]: Connect: ppp19 <--> /dev/pts/19
pppd[15605]: Peer TEST failed CHAP authentication
pppd[15605]: Connection terminated.
pppd[15605]: Exit.


уже видит /dev/pts/19

в гугле много всего понаписано а вот по сути ничего ... были варианты прописать nologfd но вот все равно не помогает... конфиги в принципе из вики по большей части:

Код:
[~]# cat /etc/pptpd.conf
option   /etc/ppp/options.pptpd
pidfile   /var/run/pptpd.pid
connections   800
delegate
localip   xx.xx.xx.xx
remoteip   xx.xx.xx.x-xxx   xx.xx.xx.x-xxx
listen   xx.xx.xx.x
Код:
[~]# cat /etc/ppp/options
lock
Код:
[~]# cat /etc/ppp/options.pptpd
ipparam PoPToP
   lock
   mtu 1490
   mru 1490
   ms-dns xx.xx.xx.xx
   lcp-echo-interval 30
   lcp-echo-failure 5
   auth
   -pap
   +chap
   ipcp-accept-local
   ipcp-accept-remote
   deflate 0
   plugin radius.so
   plugin radattr.so
   nologfd


еще есть странности в логах если кто знает где камни, буду благодарен:
Цитата:
pppd[13191]: Failed to set PPP kernel option flags: Inappropriate ioctl for device
Цитата:
kernel: HTB: quantum of class 10001 is big. Consider r2q change.
kernel: HTB: quantum of class 10010 is big. Consider r2q change.
kernel: HTB: quantum of class 10020 is big. Consider r2q change.
Код:
[~]# cat /etc/ppp/ip-up
#!/bin/bash
# This file should not be modified -- make local changes to
# /etc/ppp/ip-up.local instead

PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH

LOGDEVICE=$6
REALDEVICE=$1

[ -f /etc/sysconfig/network-scripts/ifcfg-${LOGDEVICE} ] && /etc/sysconfig/network-scripts/ifup-post ifcfg-${LOGDEVICE}

/etc/ppp/ip-up.ipv6to4 ${LOGDEVICE}

if [ -f /var/run/radattr.$1 ]
then
DOWNSPEED=`/usr/bin/awk '/PPPD-Downstream-Speed-Limit/ {print $2}' /var/run/radattr.$1`
UPSPEED=`/usr/bin/awk '/PPPD-Upstream-Speed-Limit/ {print $2}' /var/run/radattr.$1`
FILTERS=`/usr/bin/awk '/Filter-Id/ {print $2}' /var/run/radattr.$1`
#echo $DOWNSPEED
#echo $UPSPEED
#echo $FILTERS
/sbin/tc qdisc del dev $1 root > /dev/null
/sbin/tc qdisc del dev $1 ingress > /dev/null

##### speed server->client
if [ "$UPSPEED" != "0" ] ;
then
/sbin/tc qdisc add dev $1 root handle 1: htb default 20 r2q 1
/sbin/tc class add dev $1 parent 1: classid 1:1 htb rate ${UPSPEED}kbit burst 4k
/sbin/tc class add dev $1 parent 1:1 classid 1:10 htb rate ${UPSPEED}kbit burst 4k prio 1
/sbin/tc class add dev $1 parent 1:1 classid 1:20 htb rate ${UPSPEED}kbit burst 4k prio 2
/sbin/tc qdisc add dev $1 parent 1:10 handle 10: sfq perturb 10 quantum 1400
/sbin/tc qdisc add dev $1 parent 1:20 handle 20: sfq perturb 10 quantum 1400
/sbin/tc filter add dev $1 parent 1:0 protocol ip prio 10 u32 match ip tos 0x10 0xff flowid 1:10
/sbin/tc filter add dev $1 parent 1:0 protocol ip prio 10 u32 match ip protocol 1 0xff flowid 1:10
/sbin/tc filter add dev $1 parent 1: protocol ip prio 10 u32 match ip protocol 6 0xff match u8 0x05 0x0f at 0 match u160x0000 0xffc0 at 2 match u8 0x10 0xff at 33 flowid 1:10
fi
##### speed client->server
if [ "$DOWNSPEED" != "0" ] ;
then
/sbin/tc qdisc add dev $1 handle ffff: ingress
/sbin/tc filter add dev $1 parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate ${DOWNSPEED}kbit burst 12k drop flowid :1
fi
fi

exit 0
Цитата:
pppd[20751]: tcflush failed: Input/output error
Цитата:
pptpd[9075]: GRE: read(fd=6,buffer=8058f00,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax
and pppd logs
pptpd[9075]: CTRL: PTY read or GRE write failed (pty,gre)=(6,8)

Цитата:
pptpd[10204]: GRE: read(fd=8,buffer=8050e60,len=8260) from network failed: status = -1 error = Protocol not available

Цитата:
pppd[11440]: Plugin radius.so loaded.
pppd[11440]: RADIUS plugin initialized.
pppd[11440]: Plugin radattr.so loaded.
pppd[11440]: RADATTR plugin initialized.
pppd[11440]: no device specified and stdin is not a tty
Цитата:
pptpd[20224]: CTRL: EOF or bad error reading ctrl packet length.
pptpd[20224]: CTRL: couldn't read packet header (exit)
pptpd[20224]: CTRL: CTRL read failed
Цитата:

заранее спасибо


Вернуться к началу
  
 
 Заголовок сообщения:
СообщениеДобавлено: 09 июн 2009, 22:16 
Не в сети

Зарегистрирован: 06 мар 2007, 13:30
Сообщения: 457
Карма: 5
Это проблема именно pptpd поставь версию помладше это перестанет!


Вернуться к началу
 Профиль  
 
 Заголовок сообщения:
СообщениеДобавлено: 09 июн 2009, 22:33 
and писал(а):
Это проблема именно pptpd поставь версию помладше это перестанет!

спасибо попробую


Вернуться к началу
  
 
 Заголовок сообщения:
СообщениеДобавлено: 01 июл 2009, 13:15 
на будущее может кому пригодится:
Цитата:
List: poptop-server
Subject: Re: [Poptop-server] First connection always fails
From: James Cameron <james.cameron () hp ! com>
Date: 2005-01-21 0:12:19
Message-ID: 20050121001219.GI26391 () hp ! com
[Download message RAW]

On Wed, Jan 19, 2005 at 02:28:24PM +0000, John Horne wrote:
> If I reboot our vpn server then for some reason the first connection
> always seems to fail. The error shown is:
> pppd[5283]: Failed to open /dev/pts/1: No such file or directory

This was first documented as TODO item 20040521-1, on version 1.2.0-b3
and has yet to be fixed. Prior versions have not been checked. In
addition to happening on the first connection, it also occurs if there
are no other current pppd processes and memory is purged (of buffers
that may contain pppd pages, perhaps) using "dd < /dev/zero > tmp"
before the next connection. It has been reported to happen on 2.6
kernels only.

It seems like a race condition. As if /dev/pts/1 is closed before pppd
gets to use it. This is not intentional; pptpd has code to keep
/dev/pts/1 open until pppd begins to use it.

The pty is created in pptpctrl.c:566, in the function startCall(). Then
the program forks (line 580). tty_fd is for the pppd to read and write
to. pty_fd is for the pptpctrl GRE gateway to read and write to.

The parent immediately closes the tty_fd, since it doesn't need it. The
parent normally doesn't get scheduled by the kernel until after the
child has had a chance to run.

The child immediately duplicates the tty_fd and closes both the original
tty_fd and the pty_fd. Then the child executes pppd. If the execution
of pppd is delayed (e.g. by having to do disk I/O to bring it into
memory) then the parent will get to execute, closing the tty_fd.

Adding a one second sleep to the parent before it closes tty_fd usually
stops the problem. Add "sleep(1);" before the "close(tty_fd);" on line
612. This hides the problem; it is a kludge.

It is as if the reference counting of the file descriptor isn't being
done in the same way it used to be. Or the dup2() is failing and we
aren't catching it.

Please try the attached patch. This adds error checking to the calls
to dup2() in case they are failing. Please cause the "Failed to open
/dev/pts/1: No such file or directory" problem again, and check to see
if the preceeding section of the pptpd syslog indicates any failure of
the dup2() calls.

After that, you might like to confirm whether the "one second sleep
before the parent closes the fd" works for you. But if it is necessary,
then there's a defect to be fixed. Somewhere. Even the kernel.

--
James Cameron http://quozl.netrek.org/
HP Open Source, Volunteer http://opensource.hp.com/
PPTP Client Project, Release Engineer http://pptpclient.sourceforge.net/

Код:
["pptpd-dup-check.patch" (text/plain)]

? 248123.mbox
? BUGS
? RELEASING.quozl
? TODO.quozl
? autom4te.cache
? autoscan.log
? build-stamp
? configure.scan
? cvs.diff
? debian-old
? debian.diff
? import.ps.bz2
? install-stamp
? memory-analysis.txt
? pptpd-1.2.0-b3.tar.gz.asc
? pptpd-1.2.0-b4.tar.gz.asc
? pptpd-1.2.0-b4.tar.gz.md5sum
? pptpd-1.2.1-1.i386.rpm
? pptpd-1.2.1-1.src.rpm
? pptpd-1.2.1.tar.gz.asc
? pptpd-1.2.2-0.i386.rpm
? pptpd-1.2.2-0.src.rpm
? pptpd-1.2.2.tar.gz.asc
? pptpdinit.patch
? stamp-h1
? tmp
? debian/files
? debian/postinst.debhelper
? debian/postrm.debhelper
? debian/prerm.debhelper
? debian/substvars
? debian/tmp
? tools/vpnwho.pl.2004-03-12
? tools/vpnwho.pl.2004-03-16
? tools/vpnwho.pl.2004-03-18
Index: pptpctrl.c
===================================================================
RCS file: /cvsroot/poptop/poptop/pptpctrl.c,v
retrieving revision 1.16
diff -u -r1.16 pptpctrl.c
--- pptpctrl.c   14 Jan 2005 02:58:10 -0000   1.16
+++ pptpctrl.c   21 Jan 2005 00:07:19 -0000
@@ -584,8 +584,16 @@
       _exit(1);
 
    case 0:      /* child */
-      dup2(tty_fd, 0);
-      dup2(tty_fd, 1);
+      if (dup2(tty_fd, 0) == -1) {
+        syslog(LOG_ERR, "CTRL: child tty_fd dup2 to stdin, %s",
+          strerror(errno));
+        exit(1);
+      }
+      if (dup2(tty_fd, 1) == -1) {
+        syslog(LOG_ERR, "CTRL: child tty_fd dup2 to stdout, %s",
+          strerror(errno));
+        exit(1);
+      }
 #if 0
       /* This must never be used if !HAVE_SYSLOG since that logs to stderr.
        * Trying just never using it to see if it causes anyone else problems.

-------------------------------------------------------

оригинал: http://marc.info/?l=poptop-server&m=110626643809616&w=2
мне вроде помогло, пока не замечено рецидива :)


Вернуться к началу
  
 
Показать сообщения за:  Поле сортировки  
Начать новую тему Ответить на тему  [ Сообщений: 4 ] 

Часовой пояс: UTC + 5 часов [ Летнее время ]


Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 1


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

Найти:
Перейти:  
POWERED_BY
Русская поддержка phpBB
[ Time : 0.031s | 17 Queries | GZIP : On ]