2006/09/14

VoIPが使えない(upnpd: Error registering the rootdevice : -202)

VoIPが使えなくなった.
syslogを見てみると, upnpdが
Error registering the rootdevice : -202
というエラーを吐いている.

これが原因か?
とはいえ, upnpd(linux-igd)関連のファイルは
かなり前から変更していないのに.
しかも, VoIPが使えていた時期にも, -202のエラーは
時々出ていた.

syslogのupnpdのログを追いかけてみると, kernelを
gcc 4.1.1でコンパイルして再起動した後からは,
upnpdを起動するたびに-202エラーが出ていることが判明.
gcc 4.1.1への移行がまずかったのかな...

それでも, 今までVoIPは使えていたのに, なぜ, 突然....???

同じ症状がgentoo.orgでも報告されていた.
linux-igd-0.92: "upnpd: Error registering the rootdevice : -202"
http://bugs.gentoo.org/show_bug.cgi?id=119862


解決方法のひとつは, linux-igd 0.95を使用すること.
/etc/init.d/upnpd stop
mv /usr/bin/upnpd /usr/bin/upnpd-0.75_emerge
emerge '=net-misc/upnp-1.3.1'

https://sourceforge.net/projects/linux-igd/
からlinuxigd-0.95.tar.gzをダウンロード

tar xzvf linuxigd-0.95.tar.gz
cd linuxigd-0.95
mv etc/upnpd.conf etc/upnpd-0.95.conf
rm etc/upnpd.rc

globals.hの31行目
#define CONF_FILE "/etc/upnpd.conf"

#define CONF_FILE "/etc/linuxigd/upnpd-0.95.conf"
に変更

etc/upnpd-0.95.confの5行目
iptables_location = "/usr/sbin/iptables"

iptables_location = "/sbin/iptables"
に変更

make
***make HAVE_LIBIPTC=1にすると, VoIPアダプタの状態が
SIP : 登録に失敗しました。(INTERNAL ERROR (500))
UPnP CP : UPnP対応ルータとの接続が完了しました。
となり通話できない

cp -a /etc/linuxigd /etc/linuxigd-0.75_emerge
cp etc/* /etc/linuxigd/
cp upnpd /usr/bin/upnpd
/etc/init.d/upnpd start

なお, 0.75のupnpdは, listenするポートを指定できた(2869/TCP)ので
iptablesをそのように設定している場合は, iptablesの制限を
ゆるめて, 任意のポートで待ち受けできるようにする必要がある.



ちなみに, 問題のsyslogは以下のとおり.

問題がないとき
Aug 14 23:32:23 kagawa upnpd: The Linux UPnP Internet Gateway Device Ver 0.5 by Dime (dime@gulfsales.com)
Aug 14 23:32:23 kagawa upnpd: Special Thanks to Intel for the Linux SDK and the orginal author, Genmei Mori
Aug 14 23:32:23 kagawa upnpd: Intializing UPnP with desc_doc_url=http://192.168.0.1:2869/gatedesc.xml
Aug 14 23:32:23 kagawa upnpd: ipaddress=192.168.0.1 port=2869
Aug 14 23:32:23 kagawa upnpd: conf_dir_path=/etc/linuxigd/
Aug 14 23:32:26 kagawa upnpd: UPnP Initialization Completed
Aug 14 23:32:26 kagawa upnpd: Setting webserver root directory -- /etc/linuxigd/
Aug 14 23:32:26 kagawa upnpd: Registering the root device
Aug 14 23:32:26 kagawa upnpd: RootDevice Registered
Aug 14 23:32:26 kagawa upnpd: Initializing State Table
Aug 14 23:32:26 kagawa upnpd: State Table Initialized
Aug 14 23:32:26 kagawa upnpd: Advertisements Sent
Aug 14 23:32:32 kagawa upnpd: FAILED: DeletePortMap: Proto:UDP Port:5060
Aug 14 23:32:32 kagawa upnpd: Error in UPNP_CONTROL_ACTION_REQUEST callback:
Aug 14 23:32:32 kagawa upnpd: Failure while running DeletePortMapping : 401
Aug 14 23:32:34 kagawa upnpd: FAILED: DeletePortMap: Proto:UDP Port:5090
Aug 14 23:32:34 kagawa upnpd: Error in UPNP_CONTROL_ACTION_REQUEST callback:
Aug 14 23:32:34 kagawa upnpd: Failure while running DeletePortMapping : 401
Aug 14 23:32:37 kagawa upnpd: FAILED: DeletePortMap: Proto:UDP Port:5091
Aug 14 23:32:37 kagawa upnpd: Error in UPNP_CONTROL_ACTION_REQUEST callback:
Aug 14 23:32:37 kagawa upnpd: Failure while running DeletePortMapping : 401
Aug 14 23:32:39 kagawa upnpd: AddPortMap: Prot: 17 Ext: 210.155.195.107.5060 Int: 192.168.0.254.5060
Aug 14 23:32:41 kagawa upnpd: AddPortMap: Prot: 17 Ext: 210.155.195.107.5090 Int: 192.168.0.254.5090
Aug 14 23:32:43 kagawa upnpd: AddPortMap: Prot: 17 Ext: 210.155.195.107.5091 Int: 192.168.0.254.5091



こんなエラーが出るようになった
・net-misc/upnp-1.0.4-r1
・net-misc/linux-igd-0.75
Sep 13 22:40:46 kagawa upnpd: The Linux UPnP Internet Gateway Device Ver 0.5 by Dime (dime@gulfsales.com)
Sep 13 22:40:46 kagawa upnpd: Special Thanks to Intel for the Linux SDK and the orginal author, Genmei Mori
Sep 13 22:40:46 kagawa upnpd: Intializing UPnP with desc_doc_url=http://192.168.0.1:2869/gatedesc.xml
Sep 13 22:40:46 kagawa upnpd: ipaddress=192.168.0.1 port=2869
Sep 13 22:40:46 kagawa upnpd: conf_dir_path=/etc/linuxigd/
Sep 13 22:40:48 kagawa upnpd: UPnP Initialization Completed
Sep 13 22:40:48 kagawa upnpd: Setting webserver root directory -- /etc/linuxigd/
Sep 13 22:40:48 kagawa upnpd: Registering the root device
Sep 13 22:40:48 kagawa upnpd: Error registering the rootdevice : -202
エラーは出るが, upnpdは生きている. でも, VoIPなどUPnPは使えない


linux-igd-0.75とはdependの整合性がとれないが, upnpをアップデートしたらエラーが変わった
・net-misc/upnp-1.3.1
・net-misc/linux-igd-0.75
Sep 14 09:33:21 kagawa upnpd: The Linux UPnP Internet Gateway Device Ver 0.5 by Dime (dime@gulfsales.com)
Sep 14 09:33:21 kagawa upnpd: Special Thanks to Intel for the Linux SDK and the orginal author, Genmei Mori
Sep 14 09:33:21 kagawa upnpd: Intializing UPnP with desc_doc_url=http://192.168.0.1:2869/gatedesc.xml
Sep 14 09:33:21 kagawa upnpd: ipaddress=192.168.0.1 port=2869
Sep 14 09:33:21 kagawa upnpd: conf_dir_path=/etc/linuxigd/
Sep 14 09:33:21 kagawa upnpd: UPnP Initialization Completed
Sep 14 09:33:21 kagawa upnpd: Setting webserver root directory -- /etc/linuxigd/
Sep 14 09:33:21 kagawa upnpd: Registering the root device
Sep 14 09:33:21 kagawa upnpd: Error registering the rootdevice : -204
エラーが出た後, upnpdはすぐに落ちる


~x86だけど, net-misc/linux-igd-0.92を使用してみる
・net-misc/upnp-1.0.4-r1
・net-misc/linux-igd-0.92
Sep 14 09:49:43 kagawa upnpd: The Linux UPnP Internet Gateway Device Ver 0.92 by Dime (dime@gulfsales.com)
Sep 14 09:49:43 kagawa upnpd: Special Thanks for Intel's Open Source SDK and original author Genmei Mori's work.
Sep 14 09:49:43 kagawa upnpd: Intializing UPnP with desc_doc_url=http://192.168.0.1:2869/gatedesc.xml
Sep 14 09:49:43 kagawa upnpd: ipaddress=192.168.0.1 port=2869
Sep 14 09:49:43 kagawa upnpd: conf_dir_path=/etc/linuxigd/
Sep 14 09:49:45 kagawa upnpd: UPnP Initialization Completed
Sep 14 09:49:45 kagawa upnpd: Setting webserver root directory -- /etc/linuxigd/
Sep 14 09:49:45 kagawa upnpd: Registering the root device
Sep 14 09:49:45 kagawa upnpd: Error registering the rootdevice : -202
エラーは出るが, upnpdは生きている. でも, VoIPなどUPnPは使えない


linux-igd-0.92とはdependの整合性がとれないが, upnpをアップデートしたらエラーが変わった
・net-misc/upnp-1.3.1
・net-misc/linux-igd-0.92
Sep 14 10:02:31 kagawa upnpd: The Linux UPnP Internet Gateway Device Ver 0.92 by Dime (dime@gulfsales.com)
Sep 14 10:02:31 kagawa upnpd: Special Thanks for Intel's Open Source SDK and original author Genmei Mori's work.
Sep 14 10:02:31 kagawa upnpd: Intializing UPnP with desc_doc_url=http://192.168.0.1:2869/gatedesc.xml
Sep 14 10:02:31 kagawa upnpd: ipaddress=192.168.0.1 port=2869
Sep 14 10:02:31 kagawa upnpd: conf_dir_path=/etc/linuxigd/
Sep 14 10:02:31 kagawa upnpd: UPnP Initialization Completed
Sep 14 10:02:31 kagawa upnpd: Setting webserver root directory -- /etc/linuxigd/
Sep 14 10:02:31 kagawa upnpd: Registering the root device
Sep 14 10:02:31 kagawa upnpd: Error registering the rootdevice : -204
エラーが出た後, upnpdはすぐに落ちる

今回の対策後
・net-misc/upnp-1.3.1
・linuxigd-0.95 (portageに登録されていない)
Sep 14 14:10:01 kagawa upnpd[29122]: Shutting down on signal 15...
Sep 14 14:10:01 kagawa upnpd[29122]: TimerThreadRemove failed!
Sep 14 14:10:01 kagawa upnpd[29122]: TimerThreadRemove failed!
Sep 14 14:10:01 kagawa upnpd[29122]: TimerThreadRemove failed!
Sep 14 14:10:01 kagawa upnpd[29122]: DeleteAllPortMappings: UpnpNotifyExt(deviceHandle,uuid:75802409-bccb-40e7-8e6c-fa095ecce13e,urn:upnp-org:serviceId:WANIPConn1,propSet) PortMappingNumberOfEntries: 0
Sep 14 14:10:08 kagawa logger: /etc/cron.misc/check_upnpd.sh : starting UPnPd.
Sep 14 14:10:09 kagawa upnpd[29320]: UPnP SDK Successfully Initialized.
Sep 14 14:10:09 kagawa upnpd[29320]: Succesfully set the Web Server Root Directory.
Sep 14 14:10:09 kagawa upnpd[29320]: IGD root device successfully registered.
Sep 14 14:10:09 kagawa logger: /etc/cron.misc/check_upnpd.sh : UPnPd has been restarted.
Sep 14 14:10:11 kagawa upnpd[29320]: Advertisements Sent. Listening for requests ...
Sep 14 14:10:38 kagawa upnpd[29320]: Failure in GateDeviceDeletePortMapping: DeletePortMap: Proto:UDP Port:5060
Sep 14 14:10:40 kagawa upnpd[29320]: Failure in GateDeviceDeletePortMapping: DeletePortMap: Proto:UDP Port:5090
Sep 14 14:10:42 kagawa upnpd[29320]: Failure in GateDeviceDeletePortMapping: DeletePortMap: Proto:UDP Port:5091
Sep 14 14:10:44 kagawa upnpd[29320]: AddPortMap: DevUDN: uuid:75802409-bccb-40e7-8e6c-fa095ecce13e ServiceID: urn:upnp-org:serviceId:WANIPConn1 RemoteHost: (null) Prot: UDP ExtPort: 5060 Int: 192.168.0.254.5060
Sep 14 14:10:46 kagawa upnpd[29320]: AddPortMap: DevUDN: uuid:75802409-bccb-40e7-8e6c-fa095ecce13e ServiceID: urn:upnp-org:serviceId:WANIPConn1 RemoteHost: (null) Prot: UDP ExtPort: 5090 Int: 192.168.0.254.5090
Sep 14 14:10:48 kagawa upnpd[29320]: AddPortMap: DevUDN: uuid:75802409-bccb-40e7-8e6c-fa095ecce13e ServiceID: urn:upnp-org:serviceId:WANIPConn1 RemoteHost: (null) Prot: UDP ExtPort: 5091 Int: 192.168.0.254.5091


ところで, libupnp-1.4.0は~x86ながら, net-misc/libupnpに入っているのはなぜ?

0 件のコメント: