miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mediatomb/Miniupnpd
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation
View previous topic :: View next topic  
Author Message
cykotix



Joined: 19 Jun 2008
Posts: 14

PostPosted: Mon Sep 29, 2008 2:28 pm    Post subject: Mediatomb/Miniupnpd Reply with quote

I am trying to setup Mediatomb a UPNP Mediaserver and for whatever reason, only Mediatomb or Miniupnpd can be run at a time. They both claim that they are unable to bind to the udp socket when one or the other is already running. Here is the error message from miniupnpd while mediatomb is running:

(miniupnpd)
Sep 29 10:15:21 magoo miniupnpd[1153]: bind(udp): Address already in use
Sep 29 10:15:21 magoo miniupnpd[1153]: Failed to open socket for receiving SSDP. EXITING

(mediatomb)
2008-09-29 10:13:33 INFO: Loading configuration from: /usr/local/etc/mediatomb/config.xml
2008-09-29 10:13:33 INFO: Checking configuration...
2008-09-29 10:13:33 INFO: Setting filesystem import charset to US-ASCII
2008-09-29 10:13:33 INFO: Setting metadata import charset to US-ASCII
2008-09-29 10:13:33 INFO: Setting playlist charset to US-ASCII
2008-09-29 10:13:33 INFO: Configuration check succeeded.
2008-09-29 10:13:33 INFO: Initialized port: 49152
2008-09-29 10:13:33 INFO: Server bound to: 192.168.5.1
2008-09-29 10:13:34 INFO: MediaTomb Web UI can be reached by following this link:
2008-09-29 10:13:34 INFO: http://192.168.5.1:49152/


And also when miniupnpd is running and not mediatomb:

(miniupnpd)
Sep 29 10:27:08 magoo miniupnpd[1313]: HTTP listening on port 5555

(mediatomb)
2008-09-29 10:27:41 INFO: Checking configuration...
2008-09-29 10:27:41 INFO: Setting filesystem import charset to US-ASCII
2008-09-29 10:27:41 INFO: Setting metadata import charset to US-ASCII
2008-09-29 10:27:41 INFO: Setting playlist charset to US-ASCII
2008-09-29 10:27:41 INFO: Configuration check succeeded.
2008-09-29 10:27:41 ERROR: main: upnp error -203
2008-09-29 10:27:41 ERROR: Could not bind to socket.
2008-09-29 10:27:41 INFO: Please check if another instance of MediaTomb or
2008-09-29 10:27:41 INFO: another application is running on the same port.
2008-09-29 10:27:41 ERROR: upnp_cleanup: UpnpUnRegisterRootDevice failed

Is there a way to get these two to play nice?

Thanks for your help.
Back to top
View user's profile Send private message
cykotix



Joined: 19 Jun 2008
Posts: 14

PostPosted: Mon Sep 29, 2008 11:21 pm    Post subject: Reply with quote

I just wanted to update with the following information:

(when miniupnpd is running)
root miniupnpd 2457 4 udp4 *:1900 *:*
root miniupnpd 2457 5 tcp4 *:5555 *:*
root miniupnpd 2457 6 dgram -> /var/run/logpriv
root miniupnpd 2457 7 udp4 192.168.5.1:55889 *:*

(when mediatomb is running)
mediatombmediatomb 3610 4 stream -> /tmp/mysql.sock
mediatombmediatomb 3610 5 tcp4 *:49152 *:*
mediatombmediatomb 3610 6 udp4 127.0.0.1:53405 *:*
mediatombmediatomb 3610 7 udp4 *:1900 *:*

Clearly the problem is the UDP4 1900 port. Is there anyway to change that?
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1385

PostPosted: Tue Sep 30, 2008 2:28 pm    Post subject: Reply with quote

This is a complex problem.

Both UPnP Software need to listen to udp port 1900 (for SSDP) in order to be able to answer to SSDP M-SEARCH requests to allow users to discover the services offered.

as a quick fix I could disable SSDP in miniupnpd but then it wont work Sad
the good thing to do would be to allow mediatomb and miniupnpd to cooperate on the SSDP side...
I keep you updated.
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1385

PostPosted: Wed Oct 01, 2008 6:55 pm    Post subject: Reply with quote

Elbandi has made a kick patch for this issue...
let's try if there is no issue with it :
Quote:
Hi!

I make a quict patch, so miniupnpd can share the 1900/udp port with other upnp daemon.

http://elbandi.net/minissdp-reuseaddr.patch

Elbandi

_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
cykotix



Joined: 19 Jun 2008
Posts: 14

PostPosted: Thu Oct 02, 2008 9:19 pm    Post subject: Reply with quote

Well it compiles but doesn't appear to do anything. I'm getting the exact same behavior as before.
Back to top
View user's profile Send private message
cykotix



Joined: 19 Jun 2008
Posts: 14

PostPosted: Thu Oct 02, 2008 9:30 pm    Post subject: Reply with quote

Additionally, is there a way to enable some sort of verbose logging with this? I'm using FreeBSD 7 so we don't have a /var/log/daemon and creating it does no good. The only output I get is during startup and that is in /var/log/messages.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1385

PostPosted: Thu Oct 02, 2008 10:34 pm    Post subject: Reply with quote

cykotix wrote:
Additionally, is there a way to enable some sort of verbose logging with this? I'm using FreeBSD 7 so we don't have a /var/log/daemon and creating it does no good. The only output I get is during startup and that is in /var/log/messages.

1) if you run miniupnpd with the -d switch, everything will be outputed to the console
2) you can change the syslog facility used by miniupnpd by editing the config.h file. Then the behaviour of syslogd regarding this facility is configured in /etc/syslog.conf.
by default miniupnpd uses LOG_DAEMON which is usually outputed to /var/log/daemon.

To make a specific logfile for miniupnpd, you could use the LOG_LOCAL0 (or 1,2...) and add the line
local0.debug /var/log/miniupnpd
in /etc/syslog.conf. Dont forget to touch /var/log/miniupnpd before restarting syslogd.
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
cykotix



Joined: 19 Jun 2008
Posts: 14

PostPosted: Thu Oct 02, 2008 11:07 pm    Post subject: Reply with quote

Ah ok. I was installing via ports. I installed it from the latest tarball available from site, patched it, compiled it as you said and started it up manually with the -d flag.

(miniupnpd running, attempting to start mediatomb)

magoo# miniupnpd -f /usr/local/etc/miniupnpd.conf -d
miniupnpd[22977]: HTTP listening on port 5555
miniupnpd[22977]: HTTP connection from 192.168.5.30:55616
miniupnpd[22977]: HTTP REQUEST : GET /rootDesc.xml (HTTP/1.1)
miniupnpd[22977]: HTTP connection from 192.168.5.28:51521
miniupnpd[22977]: HTTP REQUEST : GET /rootDesc.xml (HTTP/1.1)
miniupnpd[22977]: SSDP M-SEARCH from 192.168.5.28:52030 ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
miniupnpd[22977]: SSDP M-SEARCH from 192.168.5.28:52030 ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
miniupnpd[22977]: SSDP M-SEARCH from 192.168.5.28:52030 ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
miniupnpd[22977]: SSDP M-SEARCH from 192.168.5.28:52030 ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
miniupnpd[22977]: SSDP M-SEARCH from 192.168.5.28:52030 ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1


magoo# tail -f /var/mediatomb/mediatomb.log
2008-10-02 19:09:17 INFO: Checking configuration...
2008-10-02 19:09:17 INFO: Setting filesystem import charset to US-ASCII
2008-10-02 19:09:17 INFO: Setting metadata import charset to US-ASCII
2008-10-02 19:09:17 INFO: Setting playlist charset to US-ASCII
2008-10-02 19:09:17 INFO: Configuration check succeeded.
2008-10-02 19:09:17 ERROR: main: upnp error -203
2008-10-02 19:09:17 ERROR: Could not bind to socket.
2008-10-02 19:09:17 INFO: Please check if another instance of MediaTomb or
2008-10-02 19:09:17 INFO: another application is running on the same port.
2008-10-02 19:09:17 ERROR: upnp_cleanup: UpnpUnRegisterRootDevice failed

(mediatomb running, attempting to start miniupnpd with -d)

magoo# miniupnpd -f /usr/local/etc/miniupnpd.conf -d
miniupnpd[23029]: bind(udp): Address already in use
miniupnpd[23029]: Failed to open socket for receiving SSDP. EXITING


I downloaded the patch into the extract source directory and executed ` patch < minissdp-reuseaddr.patch` which exited successfully. `./genconfig.sh` which successfully noted I was running FreeBSD 7.1 and pf. Then I ran `make` and `make install`.
Back to top
View user's profile Send private message
Elbandi



Joined: 01 Oct 2008
Posts: 7

PostPosted: Fri Oct 03, 2008 10:02 am    Post subject: Reply with quote

run mediatomb, and could you make a strace log? (strace -o upnp -ff miniupnpd -f /usr/local/etc/miniupnpd.conf -d).

there must be some line, like this:
Code:

...
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(4, {sa_family=AF_INET, sin_port=htons(1900), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
...
Back to top
View user's profile Send private message
cykotix



Joined: 19 Jun 2008
Posts: 14

PostPosted: Fri Oct 03, 2008 1:53 pm    Post subject: Reply with quote

mediatomb running, starting miniupnpd

magoo# strace -o upnp -ff /usr/local/sbin/miniupnpd -f /usr/local/etc/miniupnpd.conf -d
PIOCWSTOP: Input/output error
magoo# miniupnpd[32172]: bind(udp): Address already in use
miniupnpd[32172]: Failed to open socket for receiving SSDP. EXITING

contents of upnp:
execve(0xbfbfe7ec, [0xbfbfecc0], [/* 0 vars */]


miniupnpd running, starting mediatomb

contents of upnp:
execve(0xbfbfe7ec, [0xbfbfecc0], [/* 0 vars */]) = 0
__sysctl([...], 0xbfbfea2c, 0xbfbfea30, NULL, 0) = 0
syscall_477(0, 0x118, 0x3, 0x1000, 0xffffffff, 0, 0) = 0x2807f000
munmap(0x2807f000, 280) = 0
__sysctl([...], 0x2807bc7c, 0xbfbfea90, NULL, 0) = 0
syscall_477(0, 0x8000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x2807f000
issetugid(0x28074dac) = 0
open("/etc/libmap.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/var/run/ld-elf.so.hints", O_RDONLY) = 3
read(3, "failed: /usr/src/libexec/rtld-el"..., 128) = 128
syscall_478(0x3, 0x80, 0, 0) = 0x80
read(3, "/lib:/usr/lib:/usr/lib/compat:/u"..., 92) = 92
close(3) = 0
access("/lib/libkvm.so.4", F_OK) = 0
open("/lib/libkvm.so.4", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...}) = 0
read(3, "\177ELF\1\1\1\t\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220\22"..., 4096) = 4096
syscall_477(0, 0x8000, 0x5, 0x20002, 0x3, 0, 0) = 0x28087000
mprotect(0x2808d000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
mprotect(0x2808d000, 4096, PROT_READ|PROT_EXEC) = 0
syscall_477(0x2808e000, 0x1000, 0x3, 0x12, 0x3, 0x6000, 0) = 0x2808e000
close(3) = 0
access("/lib/libc.so.7", F_OK) = 0
open("/lib/libc.so.7", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...}) = 0
read(3, "\177ELF\1\1\1\t\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\331\1"..., 4096) = 4096
syscall_477(0, 0x102000, 0x5, 0x20002, 0x3, 0, 0) = 0x2808f000
mprotect(0x28176000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
mprotect(0x28176000, 4096, PROT_READ|PROT_EXEC) = 0
syscall_477(0x28177000, 0x6000, 0x3, 0x12, 0x3, 0xe7000, 0) = 0x28177000
syscall_477(0x2817d000, 0x14000, 0x3, 0x1012, 0xffffffff, 0, 0) = 0x2817d000
close(3) = 0
sysarch(0xa, 0xbfbfeaf0) = 0
syscall_477(0, 0x288, 0x3, 0x1000, 0xffffffff, 0, 0) = 0x28191000
munmap(0x28191000, 648) = 0
syscall_477(0, 0x300, 0x3, 0x1000, 0xffffffff, 0, 0) = 0x28191000
munmap(0x28191000, 768) = 0
syscall_477(0, 0x5268, 0x3, 0x1000, 0xffffffff, 0, 0) = 0x28191000
munmap(0x28191000, 21096) = 0
__sysctl([1046984.0], 2, "!\222\16\253\336\263\276\324\17n\377\207\365\356\260l8"..., [2097204], NULL, 0) = 0
sigprocmask(SIG_BLOCK, ~[ILL TRAP ABRT EMT FPE BUS SEGV SYS], []) = 0
sigprocmask(SIG_SETMASK, [], NULL) = 0
open("", O_RDONLY) = 3
fstat(3, {st_mode=0171000, st_size=1888960977182720, ...}) = 0
__sysctl([sysctl.0], 2, "\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., [587520], NULL, 0) = 0
__sysctl([sysctl.0], 2, "", [0], NULL, 0) = 0
__sysctl([4096.0], 2, "", [0], NULL, 0) = 0
readlink("/etc/malloc.conf", 0xbfbfe1c7, 1024) = -1 ENOENT (No such file or directory)
issetugid(0x2816e3a0) = 0
break(0x8100000) = 0
break(0x8200000) = 0
read(3, "# WAN network interface \next_ifn"..., 4096) = 1140
read(3, "", 4096) = 0
close(3) = 0
getpid() = 32214 (ppid 100)
open("/var/run/miniupnpd.pid", O_RDONLY) = 3
read(3, ":%s%s\r", 63) = 6
kill(32172, SIG_0) = -1 ESRCH (No such process)
close(3) = 0
gettimeofday({1314084106, 980624698}, NULL) = 0
__sysctl([628303162.130928165], 2, "sdp:byebye\r\n\r\n\0sendto(udp_shutdo"..., [1933202260], NULL, 0) = 0
syscall_416(0xf, 0xbfbfec18, 0) = 0
syscall_416(0x2, 0xbfbfec18, 0) = 0
syscall_416(0xd, 0xbfbfeae4, 0xbfbfeacc) = 0
open("/dev/pf", O_RDWR) = 3
ioctl(3, 0xc1a04415, 0xbfbfe978) = 0
open("/var/run/miniupnpd.pid", O_WRONLY|O_CREAT|O_EXCL, 0666) = -1 EEXIST (File exists)
gettimeofday({628303162, 1426722163}, NULL) = 0
access("/etc/localtime", R_OK) = 0
open("/etc/localtime", O_RDONLY) = 4
fstat(4, {st_mode=037, st_size=124554051615, ...}) = 0
read(4, "UTC\0???\0%.3s %.3s%3d %02d:%02d:%"..., 7944) = 1267
close(4) = 0
getpid() = 32214 (ppid 0)
writev(2, [{0x20643230, 680997}, {NULL, 0}], 2) = 89
socket(PF_UNIX, SOCK_DGRAM, 0) = 4
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
connect(4, {...}, 106) = 0
sendto(4, 0xbfbfde0e, 108, 0, NULL, 0) = 108
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
bind(5, {...}, 16) = 0
setsockopt(5, 0 /* SOL_?? */, IP_ADD_MEMBERSHIP, 0xbfbfeaf4, 8) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 6
setsockopt(6, SOL_SOCKET, SO_REUSEADDR, 0xbfbfeb08, 4) = 0
bind(6, {...}, 16) = 0
listen(6, 6) = 0
gettimeofday({...}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, 0xbfbfeaa8, 2) = 46
sendto(4, 0xbfbfde4e, 65, 0, NULL, 0) = 65
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 7
setsockopt(7, 0 /* SOL_?? */, IP_MULTICAST_LOOP, 0xbfbfeafb, 1) = 0
setsockopt(7, 0 /* SOL_?? */, IP_MULTICAST_IF, 0xbfbfeaf0, 4) = 0
setsockopt(7, SOL_SOCKET, SO_BROADCAST, 0xbfbfeaf4, 4) = 0
bind(7, {...}, 16) = 0
gettimeofday({...}, NULL) = 0
sendto(7, 0xbfbfe8ec, 276, 0, {...}, 16) = 276
sendto(7, 0xbfbfe8ec, 348, 0, {...}, 16) = 348
sendto(7, 0xbfbfe8ec, 344, 0, {...}, 16) = 344
sendto(7, 0xbfbfe8ec, 324, 0, {...}, 16) = 324
sendto(7, 0xbfbfe8ec, 356, 0, {...}, 16) = 356
sendto(7, 0xbfbfe8ec, 338, 0, {...}, 16) = 338
sendto(7, 0xbfbfe8ec, 340, 0, {...}, 16) = 340
sendto(7, 0xbfbfe8ec, 340, 0, {...}, 16) = 340
select(7, [?], NULL, NULL, {...}) = 1 ()
accept(6, {...}, 0xbfbfec80) = 8
gettimeofday({...}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, 0xbfbfea98, 2) = 58
sendto(4, 0xbfbfde3e, 77, 0, NULL, 0) = 77
gettimeofday({...}, NULL) = 0
select(9, [?], NULL, NULL, {...}) = 1 ()
recvfrom(8, 0xbfbfe26c, 2048, 0, NULL, NULL) = 210
gettimeofday({...}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, 0xbfbfe1d8, 2) = 62
sendto(4, 0xbfbfd57e, 81, 0, NULL, 0) = 81
sendto(8, "HTTP/1.1 200 OK\r\nContent-Type: t"..., 2702, 0, NULL, 0) = 2702
close(8) = 0
gettimeofday({796162149, 225209720}, NULL) = 0
select(9, [1 3 8], NULL, NULL, {1852599672, 1965178227}) = 1 (in [1 4 5 6])
accept(6, {sa_family=0x72 /* AF_??? */, sa_data="anufacturerURL"}, [1953785918]) = 8
gettimeofday({791624304, 779581303}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, [{0x65657266, 778335074}, {0x2f67726f, 1634545468}], 2) = 57
sendto(4, 0xbfbfde3e, 76, 0, NULL, 0) = 76
gettimeofday({...}, NULL) = 0
select(9, [?], NULL, NULL, {...}) = 1 ()
recvfrom(8, 0xbfbfe26c, 2048, 0, NULL, NULL) = 220
gettimeofday({...}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, 0xbfbfe1d8, 2) = 62
sendto(4, 0xbfbfd57e, 81, 0, NULL, 0) = 81
sendto(8, "HTTP/1.1 200 OK\r\nContent-Type: t"..., 2702, 0, NULL, 0) = 2702
close(8) = 0
gettimeofday({796162149, 225209720}, NULL) = 0
select(9, [1 3 8], NULL, NULL, {1852599672, 1965178227}) = 1 (in [1 4 5 6])
accept(6, {sa_family=0x72 /* AF_??? */, sa_data="anufacturerURL"}, [1953785918]) = 8
gettimeofday({791624304, 779581303}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, [{0x65657266, 778335074}, {0x2f67726f, 1634545468}], 2) = 57
sendto(4, 0xbfbfde3e, 76, 0, NULL, 0) = 76
gettimeofday({...}, NULL) = 0
select(9, [?], NULL, NULL, {...}) = 1 ()
recvfrom(8, 0xbfbfe26c, 2048, 0, NULL, NULL) = 215
gettimeofday({...}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, 0xbfbfe1d8, 2) = 57
sendto(4, 0xbfbfd57e, 76, 0, NULL, 0) = 76
sendto(8, "HTTP/1.1 200 OK\r\nContent-Type: t"..., 932, 0, NULL, 0) = 932
close(8) = 0
gettimeofday({796162149, 225209720}, NULL) = 0
select(9, [1 3 8], NULL, NULL, {1936616557, 1920279101}) = 1 (in [1 2 3 5 6])
accept(6, {sa_family=0x6e /* AF_??? */, sa_data="iable>DefaultC"}, [1701736047]) = 8
gettimeofday({1869182051, 1919243118}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, [{0x65636976, 1701982012}, {0x6574616c, 1635013476}], 2) = 57
sendto(4, 0xbfbfde3e, 76, 0, NULL, 0) = 76
gettimeofday({...}, NULL) = 0
select(9, [?], NULL, NULL, {...}) = 1 ()
recvfrom(8, 0xbfbfe26c, 2048, 0, NULL, NULL) = 218
gettimeofday({...}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, 0xbfbfe1d8, 2) = 60
sendto(4, 0xbfbfd57e, 79, 0, NULL, 0) = 79
sendto(8, "HTTP/1.1 200 OK\r\nContent-Type: t"..., 3081, 0, NULL, 0) = 3081
close(8) = 0
gettimeofday({796162149, 225209720}, NULL) = 0
select(9, [1 3 8], NULL, NULL, {1852599672, 1965178227}) = 1 (in [1 4 5 6])
accept(6, {sa_family=0x6e /* AF_??? */, sa_data="ssType</relate"}, [1635013476]) = 8
gettimeofday({1633052020, 1650551154}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, [{0x3c3e656c, 1735549231}, {0x6e656d75, 1631338100}], 2) = 57
sendto(4, 0xbfbfde3e, 76, 0, NULL, 0) = 76
gettimeofday({...}, NULL) = 0
select(9, [?], NULL, NULL, {...}) = 1 ()
recvfrom(8, 0xbfbfe26c, 2048, 0, NULL, NULL) = 219
gettimeofday({...}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, 0xbfbfe1d8, 2) = 61
sendto(4, 0xbfbfd57e, 80, 0, NULL, 0) = 80
sendto(8, "HTTP/1.1 200 OK\r\nContent-Type: t"..., 8536, 0, NULL, 0) = 8536
close(8) = 0
gettimeofday({796162149, 225209720}, NULL) = 0
select(9, [1 3 8], NULL, NULL, {1852599672, 1965178227}) = 1 (in [1 4 5 6])
accept(6, {sa_family=0x69 /* AF_??? */, sa_data="tateVariable><"}, [1735549231]) = 8
gettimeofday({1852140917, 1631338100}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, [{0x6d756772, 1047817829}, {0x6d616e3c, 1699626597}], 2) = 57
sendto(4, 0xbfbfde3e, 76, 0, NULL, 0) = 76
gettimeofday({...}, NULL) = 0
select(9, [?], NULL, NULL, {...}) = 1 ()
recvfrom(8, 0xbfbfe26c, 2048, 0, NULL, NULL) = 630
gettimeofday({...}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, 0xbfbfe1d8, 2) = 61
sendto(4, 0xbfbfd57e, 80, 0, NULL, 0) = 80
gettimeofday({...}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, 0xbfbfe1d8, 2) = 99
sendto(4, 0xbfbfd57e, 118, 0, NULL, 0) = 118
sendto(8, "HTTP/1.1 200 OK\r\nContent-Type: t"..., 555, 0, NULL, 0) = 555
close(8) = 0
gettimeofday({796162149, 225209720}, NULL) = 0
select(9, [1 3 8], NULL, NULL, {1701867372, 1819113504}) = 1 (in [1 2 3 5 6 8])
accept(6, {sa_family=0x74 /* AF_??? */, sa_data="NewPossibleCon"}, [1952671086]) = 8
gettimeofday({1416523625, 1936027769}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, [{0x5f50493e, 1953853266}, {0x2f3c6465, 1350001998}], 2) = 57
sendto(4, 0xbfbfde3e, 76, 0, NULL, 0) = 76
gettimeofday({...}, NULL) = 0
select(9, [?], NULL, NULL, {...}) = 1 ()
recvfrom(8, 0xbfbfe26c, 2048, 0, NULL, NULL) = 620
gettimeofday({...}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, 0xbfbfe1d8, 2) = 61
sendto(4, 0xbfbfd57e, 80, 0, NULL, 0) = 80
gettimeofday({...}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, 0xbfbfe1d8, 2) = 94
sendto(4, 0xbfbfd57e, 113, 0, NULL, 0) = 113
sendto(8, "HTTP/1.1 200 OK\r\nContent-Type: t"..., 501, 0, NULL, 0) = 501
close(8) = 0
gettimeofday({796162149, 225209720}, NULL) = 0
select(9, [1 3 8], NULL, NULL, {1701867372, 1819113504}) = 1 (in [1 2 3 5 6 8])
accept(6, {sa_family=0x50 /* AF_??? */, sa_data="</NewNATEnable"}, [792477284]) = 8
gettimeofday({1699166837, 1413566068}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, [{0x50495352, 1952543827}, {0x65527375, 1852797043}], 2) = 57
sendto(4, 0xbfbfde3e, 76, 0, NULL, 0) = 76
gettimeofday({...}, NULL) = 0
select(9, [?], NULL, NULL, {...}) = 1 ()
recvfrom(8, 0xbfbfe26c, 2048, 0, NULL, NULL) = 657
gettimeofday({...}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, 0xbfbfe1d8, 2) = 61
sendto(4, 0xbfbfd57e, 80, 0, NULL, 0) = 80
gettimeofday({...}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, 0xbfbfe1d8, 2) = 82
sendto(4, 0xbfbfd57e, 101, 0, NULL, 0) = 101
sendto(8, "HTTP/1.1 200 OK\r\nContent-Type: t"..., 447, 0, NULL, 0) = 447
close(8) = 0
gettimeofday({796162149, 225209720}, NULL) = 0
select(9, [1 3 8], NULL, NULL, {1701867372, 1819113504}) = 1 (in [1 2 3 5 6 8])
accept(6, {sa_family=0x65 /* AF_??? */, sa_data="</s:Envelope>\r"}, [792477194]) = 8
gettimeofday({1699166837, 1413566068}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, [{0x50495352, 1952543827}, {0x65527375, 1852797043}], 2) = 58
sendto(4, 0xbfbfde3e, 77, 0, NULL, 0) = 77
gettimeofday({...}, NULL) = 0
select(9, [?], NULL, NULL, {...}) = 1 ()
recvfrom(8, 0xbfbfe26c, 2048, 0, NULL, NULL) = 210
gettimeofday({...}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, 0xbfbfe1d8, 2) = 62
sendto(4, 0xbfbfd57e, 81, 0, NULL, 0) = 81
sendto(8, "HTTP/1.1 200 OK\r\nContent-Type: t"..., 2702, 0, NULL, 0) = 2702
close(8) = 0
gettimeofday({796162149, 225209720}, NULL) = 0
select(9, [1 3 8], NULL, NULL, {1852599672, 1965178227}) = -1 EINTR (Interrupted system call)
--- SIGINT (Interrupt: 2) ---
--- SIGINT (Interrupt: 2) ---
syscall_416(0x2, 0xbfbfe784, 0xbfbfe76c) = 0
gettimeofday({1933209202, 1835362403}, NULL) = 0
getpid() = 32214 (ppid 0)
writev(2, [{0x752d7361, 762343024}, {0x3a67726f, 1769366884}], 2) = 46
sendto(4, 0xbfbfdaee, 65, 0, NULL, 0) = 65
syscall_417(0xbfbfe7f0) = -1 (errno 4)
close(5) = 0
close(6) = 0
sendto(7, 0xbfbfe8ec, 149, 0, {...}, 16) = 149
sendto(7, 0xbfbfe8ec, 221, 0, {...}, 16) = 221
sendto(7, 0xbfbfe8ec, 217, 0, {...}, 16) = 217
sendto(7, 0xbfbfe8ec, 197, 0, {...}, 16) = 197
sendto(7, 0xbfbfe8ec, 229, 0, {...}, 16) = 229
sendto(7, 0xbfbfe8ec, 211, 0, {...}, 16) = 211
sendto(7, 0xbfbfe8ec, 213, 0, {...}, 16) = 213
sendto(7, 0xbfbfe8ec, 213, 0, {...}, 16) = 213
close(7) = 0
unlink("/var/run/miniupnpd.pid") = 0
close(4) = 0
exit(0) = ?
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1385

PostPosted: Fri Oct 03, 2008 4:33 pm    Post subject: Reply with quote

I think there is one workaround for this problem :
Add a second IP to the network interface to the LAN, make mediatomb run on one IP and miniupnpd on the other.
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
cykotix



Joined: 19 Jun 2008
Posts: 14

PostPosted: Fri Oct 03, 2008 4:54 pm    Post subject: Reply with quote

That would work if I could bind the port to a specific IP but unfortunately it always shows up as:

magoo# netstat -an | grep 1900
udp4 0 0 *.1900 *.*

Unless you know of a way to bind that?
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1385

PostPosted: Mon Oct 06, 2008 3:57 pm    Post subject: Reply with quote

Hello, I found a way to make MiniUPnPd and Mediatomb cooperate.
I'm using MiniSSDPd for handling SSDP stuff (except NOTIFY)

You need to get thoses files :
mediatomb_minissdp-20081006.patch
minissdpd-20081006.tar.gz
miniupnpd-20081006.tar.gz

I made the patch using mediatomb-0.11.0.

First run MiniSSDPd. It will open the udp *:1900 socket.
When MiniSSDPd is running, MiniUPnPd and patched MediaTomb will communicate with it (using a unix socket) to publish their devices/services.

I hope it will work for you !
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
cykotix



Joined: 19 Jun 2008
Posts: 14

PostPosted: Mon Oct 06, 2008 6:12 pm    Post subject: Reply with quote

I'm attempting to do this now. Quick question though. I've started minissdpd with only `-i 192.168.5.1` as I only care about SSDP on my internal network. It creates the socket successfully and udp *:1900 opens. However, starting miniupnpd still yields:

Oct 6 14:05:23 magoo miniupnpd[40330]: HTTP listening on port 5555
Oct 6 14:05:23 magoo miniupnpd[40330]: bind(udp): Address already in use

However, it still starts unlike when mediatomb was running before it. Just wanted to verify as to whether or not I should be concerned.

Also, does this patch for mediatomb require minissdpd to be installed or is this something that could be submitted to the mediatomb group to be included in any future releases and work standalone?

I'll let you know shortly whether or not the patch works for me....
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1385

PostPosted: Mon Oct 06, 2008 6:25 pm    Post subject: Reply with quote

cykotix wrote:
I'm attempting to do this now. Quick question though. I've started minissdpd with only `-i 192.168.5.1` as I only care about SSDP on my internal network. It creates the socket successfully and udp *:1900 opens.

Starting MiniSSDPd with several ip is only usefull when you have several internal networks.
cykotix wrote:
However, starting miniupnpd still yields:

Oct 6 14:05:23 magoo miniupnpd[40330]: HTTP listening on port 5555
Oct 6 14:05:23 magoo miniupnpd[40330]: bind(udp): Address already in use

However, it still starts unlike when mediatomb was running before it. Just wanted to verify as to whether or not I should be concerned.

MiniUPnPd first try to open the SSDP port by itself and fallback to minissdpd usage if it fails.
cykotix wrote:

Also, does this patch for mediatomb require minissdpd to be installed or is this something that could be submitted to the mediatomb group to be included in any future releases and work standalone?

The patch doesnt require minissdpd. If minissdpd is not running, the patch should not modify the behaviour of Mediatomb.
I think it could be submitted but it needs some work to handle errors correctly.
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.