UPnP support
-
I dug into this further. Due to the following added changelogs miniupnpd starts three times.
[14721] Add rc.start_packages file
[14722] Use /etc/rc.start_packagesFirstly, the packages are being synced twice evident in dmesg and the logs where RRD is starting twice and then the below code in miniupnpd.inc starts the package. Then the rc.start_packages files starts it a third time.
start_service("miniupnpd");
restart_service("miniupnpd");In my previous posts look at the process ids. There are three different ones.
Oct 4 02:24:38 miniupnpd[1298]: received signal 15, exiting
Oct 4 02:24:35 miniupnpd[804]: received signal 15, exiting
Oct 4 02:23:11 miniupnpd[1010]: bind(udp): Address already in use
Oct 4 02:22:36 miniupnpd[804]: Unknown soap method -
I just fixed these issues. Please reinstall the miniupnpd package.
-
I just fixed these issues. Please reinstall the miniupnpd package.
Thanks alot. The changes work great.
-
miniupnpd version 20060930 commited, reinstall package to get to it.
Cheers.
-
miniupnpd version 20060930 commited, reinstall package to get to it.
Cheers.
Wow …
Oct 5 17:09:05 last message repeated 23845 times
Oct 5 17:08:34 miniupnpd[1359]: Unsupported HTTP Command SUBSCRIBE
Oct 5 17:08:34 miniupnpd[1359]: recv (state0): Connection reset by peer
Oct 5 17:08:34 last message repeated 5583 times
Oct 5 17:08:27 miniupnpd[1359]: Unsupported HTTP Command SUBSCRIBE
Oct 5 17:08:27 miniupnpd[1359]: recv (state0): Connection reset by peerIs this a new error or is the error just being displayed now. It has completely filled my system log in 15 min. Also the firewall log still fills with accepted packets.
-
Wow …
Oct 5 17:09:05 last message repeated 23845 times
Oct 5 17:08:34 miniupnpd[1359]: Unsupported HTTP Command SUBSCRIBE
Oct 5 17:08:34 miniupnpd[1359]: recv (state0): Connection reset by peer
Oct 5 17:08:34 last message repeated 5583 times
Oct 5 17:08:27 miniupnpd[1359]: Unsupported HTTP Command SUBSCRIBE
Oct 5 17:08:27 miniupnpd[1359]: recv (state0): Connection reset by peerIs this a new error or is the error just being displayed now. It has completely filled my system log in 15 min. Also the firewall log still fills with accepted packets.
What is UPNP communicating with? XBOX?
-
Wow …
Oct 5 17:09:05 last message repeated 23845 times
Oct 5 17:08:34 miniupnpd[1359]: Unsupported HTTP Command SUBSCRIBE
Oct 5 17:08:34 miniupnpd[1359]: recv (state0): Connection reset by peer
Oct 5 17:08:34 last message repeated 5583 times
Oct 5 17:08:27 miniupnpd[1359]: Unsupported HTTP Command SUBSCRIBE
Oct 5 17:08:27 miniupnpd[1359]: recv (state0): Connection reset by peerIs this a new error or is the error just being displayed now. It has completely filled my system log in 15 min. Also the firewall log still fills with accepted packets.
What is UPNP communicating with? XBOX?
Nope I just had Azereus open. Just like in the past with the older version. This is a clean RC3 install with a,b,c patches and the miniupnpd package.
-
Ruh roh. Looks like the new miniupnpd binary has added a regression then.
-
Ruh roh. Looks like the new miniupnpd binary has added a regression then.
I'd say so. I loaded the old binary version back and the error is gone.
-
Embedded users interested in this package have a look at http://forum.pfsense.org/index.php/topic,1788.msg13490.html#msg13490 :)
-
Upgraded and …
Oct 4 08:09:40 miniupnpd[1423]: Unknown soap method Oct 4 08:25:08 miniupnpd[1423]: Unknown soap method Oct 4 08:47:17 miniupnpd[1423]: Unknown soap method Oct 4 09:26:39 miniupnpd[1423]: Unknown soap method
-
Looks like something is dirty if it needs soap… ;D
-
From my post referenced above about adding miniupnpd on embedded.
http://forum.pfsense.org/index.php/topic,1788.msg13498.html#msg13498
Miniupnpd uses the miniupnp.sh script to start the service. This file contains your ip address and nic interface hardcoded. Not a big deal as the sync_package_miniupnpd() recreates it. However it doesn't seem to run this when syncing packages at startup. I looked in the code and it looks like the miniupnpd.xml file should have a custom_php_resync_config_command section which calles sync_package_miniupnpd(). I think the thought was that once its configured theres really no need to keep recreating the same startup file.
Shouldn't the below be added to the miniupnpd.xml file so the package is resynced at startup. Wouldn't hardly add any extra time to boot and would insure the package is configured properly.
<custom_php_resync_config_command>sync_package_miniupnpd();</custom_php_resync_config_command>
I could be wrong but I looked into the pfsense-utils.inc file and don't see how this would get called without the above xml section.
-
Hmm I have the latest version with that has the custom_php_resync_config_command added in the xml file. I receive the following error.
Syncing packages:
miniupnpdFatal error: Call to undefined function: get_real_wan_interface() in /usr/local/pkg/miniupnpd.inc on line 13
Executing rc.d items…
Starting /usr/local/etc/rc.d/*.sh... -
Try to reinstall the package. I just commited a change.
-
Try to reinstall the package. I just commited a change.
Well were making progress. I figured it was something as simple as including a file. Although now it stops here.
Warning: Invalid argument supplied for foreach() in /usr/local/pkg/miniupnpd.inc on line 28
foreach($_POST['interface_array'] as $iface) {
The issue is there is no post data. However it really comes down to an overthoght in the coding. Since the inferface_array is either pulled form the post data or the config. My thought is it should just read
foreach($interface_array as $iface) {
Since the if statement above is setting $interface_array = $_POST['interface_array']; it should still contain the array and properly go through each interface.
Also shouldn't the start_service("miniupnpd"); line be included in the if statment. If theres no interface array and no file is generated why should we start the service?
I'm going to make these changes on mine and see what happens. Will report back soon.
-
Alright with the above changes it works great now. No errors. I can see why pfSense takes so long to get to release 1.0. Lots of easily overlooked things that show up and to have to track them down and fix them all has go to be a major pain.
-
There is still a bug where it is resyncing packages twice causing issues. It you look at the log it takes longer for miniupnpd to exit than it does for the new one to start. Is there a way to make killall miniupnpd in the miniupnpd.sh file wait until it actually exits before proceeding?
Oct 7 00:58:56 check_reload_status: updating dyndns
Oct 7 00:58:42 check_reload_status: reloading filter
Oct 7 00:58:42 miniupnpd[1106]: Failed to open socket for SSDP. EXITING
Oct 7 00:58:42 miniupnpd[1106]: bind(udp): Address already in use
Oct 7 00:58:42 miniupnpd[1092]: received signal 15, exiting
Oct 7 00:58:35 php: : Resyncing configuration for all packages.
Oct 7 00:58:30 php: : Creating rrd graph index
Oct 7 00:58:30 php: : Creating rrd update script
Oct 7 00:58:30 php: : Informational: DHClient spawned /etc/rc.newwanip and the new ip is wan - 68.100.53.135.
Oct 7 00:58:21 login: login on console as root
Oct 7 00:58:01 sshlockout[868]: sshlockout starting up
Oct 7 00:58:01 sshlockout[868]: sshlockout starting up
Oct 7 00:58:01 login: login on console as root
Oct 7 00:57:50 check_reload_status: rc.newwanip starting
Oct 7 00:57:50 check_reload_status: check_reload_status is starting
Oct 7 00:57:44 miniupnpd[804]: received signal 15, exiting
Oct 7 00:57:44 miniupnpd[820]: Failed to open socket for SSDP. EXITING
Oct 7 00:57:44 miniupnpd[820]: bind(udp): Address already in use
Oct 7 00:57:43 miniupnpd[804]: Unknown soap method
Oct 7 00:57:43 miniupnpd[804]: Unknown soap method
Oct 7 00:57:37 dnsmasq[567]: reading /var/dhcpd/var/db/dhcpd.leases
Oct 7 00:57:36 php: : Resyncing configuration for all packages. -
Hopefully both problems have been addressed now.
-
Yep you got them. Works great.