[Android Apps and Games] Dalizz:
Hi,

I recently installed BubbleUpnp server on my Ubuntu Server 16.04. Also bought the Android app. I'm having some troubles with the Ubuntu ufw/iptables firewall blocking the Android app connecting the server. App just doesn't find the server.

If I disable the firewall, everything works. I only plan to use BubbleUpnp for the Chromecast transcoding, and only in the local network.

Firewall configuration:

-Incoming ports 1900/udp, 58050/tcp, 58051/tcp open (from local network 192.168.x.x)

-Everything outgoing allowed

Here's the server log:

[main (1) ] INFO - 02:00:00.10 - Main : starting BubbleUPnP Server 0.9-update21...
[main (1) ] INFO - 02:00:00.12 - Main : os.arch: amd64, x86: true
[main (1) ] INFO - 02:00:00.12 - Main : java.home: /usr/lib/jvm/java-8-oracle/jre
[main (1) ] INFO - 02:00:00.13 - Main : java.vendor: Oracle Corporation
[main (1) ] INFO - 02:00:00.14 - Main : java.version: 1.8.0_111
[main (1) ] INFO - 02:00:00.14 - Main : java.class.path: BubbleUPnPServerLauncher.jar
[main (1) ] INFO - 02:00:00.15 - Main : file.encoding: UTF-8
[main (1) ] INFO - 02:00:00.15 - Main : default charset: UTF-8
[main (1) ] INFO - 02:00:00.16 - Main : bin dir: /usr/share/bubbleupnpserver
[main (1) ] INFO - 02:00:00.933 - d : >>> Starting UPnP service...
[main (1) ] INFO - 02:00:00.933 - d : Using configuration: com.bubblesoft.bubbleupnpserver.server.Main$a
[main (1) ] INFO - 02:00:00.943 - b : Creating Router: org.fourthline.cling.e.b
[main (1) ] INFO - 02:00:00.960 - r : Created server (for receiving TCP streams) on: /192.168.0.103:45492
[main (1) ] INFO - 02:00:00.964 - h : Creating wildcard socket (for receiving multicast datagrams) on port: 1900
[main (1) ] INFO - 02:00:00.966 - h : Joining multicast group: /239.255.255.250:1900 on network interface: enp4s0
[main (1) ] INFO - 02:00:00.972 - a : Creating bound socket (for datagram input/output) on: /192.168.0.103
[main (1) ] INFO - 02:00:00.977 - d : <<< UPnP service started successfully
[main (1) ] INFO - 02:00:00.979 - i : Display name: enp4s0
[main (1) ] INFO - 02:00:00.979 - i : Name: enp4s0
[main (1) ] INFO - 02:00:00.980 - i : InetAddress: /192.168.0.103
[main (1) ] INFO - 02:00:00.980 - i : Interface Address
[main (1) ] INFO - 02:00:00.981 - i : Address: /192.168.0.103
[main (1) ] INFO - 02:00:00.981 - i : Broadcast: /192.168.0.255
[main (1) ] INFO - 02:00:00.982 - i : Prefix length: 24
[main (1) ] INFO - 02:00:00.983 - i : Up? true
[main (1) ] INFO - 02:00:00.983 - i : Loopback? false
[main (1) ] INFO - 02:00:00.983 - i : PointToPoint? false
[main (1) ] INFO - 02:00:00.984 - i : Supports multicast? true
[main (1) ] INFO - 02:00:00.984 - i : Virtual? false
[main (1) ] INFO - 02:00:00.985 - i : Hardware address: [0, 37, 34, -16, 1, -122]
[main (1) ] INFO - 02:00:00.985 - i : MTU: 1500
[main (1) ] INFO - 02:00:00.988 - Main : started monitor network changes task, interval=30
[main (1) ] INFO - 02:00:00.996 - Main : waiting for IGD...
[main (1) ] INFO - 02:00:10.997 - Main : IGD connection service not found
[main (1) ] INFO - 02:00:11.11 - Main : default route: gateway: 192.168.0.2, network interface: enp4s0
[main (1) ] INFO - 02:00:11.12 - Main : using bind address from network interface list
[main (1) ] INFO - 02:00:11.17 - z : successfully added iptables rule 'iptables -I INPUT -d 192.168.0.103 -p tcp --dport 58050 -j ACCEPT'
[main (1) ] INFO - 02:00:11.20 - z : successfully added iptables rule 'iptables -I INPUT -d 192.168.0.103 -p tcp --dport 58051 -j ACCEPT'
[main (1) ] INFO - 02:00:11.21 - Main : bind interface: ip: 192.168.0.103, netmask: 255.255.255.0
[main (1) ] INFO - 02:00:11.22 - Main : using ffmpeg binaries from: system PATH
[main (1) ] INFO - 02:00:11.33 - Main : ffmpeg version 2.8.4-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.3 (Debian 4.9.3-10)
configuration: --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi --disable-indev=sndio --disable-outdev=sndio --cc=gcc-4.9
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100

[main (1) ] INFO - 02:00:11.36 - Main : ffmpeg found
[main (1) ] INFO - 02:00:11.37 - Main : ffmpeg supports SoX resampler
[main (1) ] INFO - 02:00:11.52 - Main : ffmpeg supports mp3 encoding (libmp3lame)
[main (1) ] INFO - 02:00:11.53 - Main : ffmpeg supports libvorbis encoder
[main (1) ] INFO - 02:00:11.53 - Main : ffmpeg supports flac encoder
[main (1) ] INFO - 02:00:11.54 - Main : ffmpeg supports libx264 encoder
[main (1) ] INFO - 02:00:11.54 - Main : ffmpeg doesn't support high quality aac encoding (libfdk_aac)
[main (1) ] INFO - 02:00:11.68 - Main : ffmpeg supports matroska encoding
[main (1) ] INFO - 02:00:11.69 - Main : ffmpeg supports mpegts encoding
[main (1) ] INFO - 02:00:11.81 - Main : ffmpeg supports experimental aac encoder
[main (1) ] INFO - 02:00:11.115 - Main : ffmpeg supports -id3v2_version option
[main (1) ] INFO - 02:00:11.116 - Main : ffmpeg supports the -seekable option
[main (1) ] INFO - 02:00:11.116 - Main : ffmpeg supports the -codec option
[main (1) ] INFO - 02:00:11.126 - Main : ffmpeg supports the scale video filter
[main (1) ] INFO - 02:00:11.132 - Main : ffmpeg supports the aac_adtstoasc bitstream filter
[main (1) ] INFO - 02:00:11.140 - Main : ffprobe found
[main (1) ] INFO - 02:00:12.32 - Options : successfully got WAN IP Address
[main (1) ] INFO - 02:00:12.77 - Options : gateway: xxxx (xxxx) #edited away :)
[main (1) ] INFO - 02:00:12.201 - b : created Super Media Server local device
[main (1) ] INFO - 02:00:12.207 - b : created BubbleUPnP Server local device
[cling-5 (17) ] INFO - 02:00:12.216 - c :

Manufacturer: Bubblesoft
Manufacturer URL: http://bubblesoftapps.com/bubbleupnpserver/
Model name: BubbleUPnP Server Services
Model description: BubbleUPnP Server Services
Model number: 0.9-update21
UDN: 1c20bfa0-5380-22be-ffff-ffffc893b8c3

[cling-4 (16) ] INFO - 02:00:12.220 - c :

Manufacturer: Bubblesoft
Manufacturer URL: http://xdaforums.com/showthread.php?t=1118891
Model name: BubbleUPnP Server
Model description: BubbleUPnP Server
Model number: 0.9-update21
UDN: 1c20bfa0-5380-22be-ffff-ffff8732071a

[main (1) ] INFO - 02:00:12.250 - b : started Google Cast device discovery on network interface: 192.168.0.103/192.168.0.103
[main (1) ] INFO - 02:00:12.254 - b$a : started Google Cast device discovery maintenance task, interval=300
[main (1) ] INFO - 02:00:12.272 - e : stream request idle time: 10800 seconds
[main (1) ] INFO - 02:00:12.333 - i : HV000001: Hibernate Validator 4.3.2.Final
[main (1) ] INFO - 02:00:12.423 - e : media access log is disabled
[main (1) ] INFO - 02:00:12.473 - b : started c.b.b.s.d{/SuperMediaServer,null}
[main (1) ] INFO - 02:00:12.491 - b : started c.b.b.s.d{/dev,null}
[main (1) ] INFO - 02:00:12.501 - b : started c.b.b.s.d{/res,null}
[main (1) ] INFO - 02:00:12.718 - b : started o.e.j.s.ServletContextHandler{/chromecast,null}
[main (1) ] WARNING - 02:00:12.718 - b : !RequestLog
[main (1) ] INFO - 02:00:12.721 - b : started o.e.j.s.ServletContextHandler{/stream,file:/root/.bubbleupnpserver/}
[main (1) ] INFO - 02:00:12.736 - b : started o.e.j.s.ServletContextHandler{/proxy,null}
[main (1) ] INFO - 02:00:12.742 - b : started c.b.b.s.d{/,jar:file:BubbleUPnPServer.jar!/}
[main (1) ] INFO - 02:00:12.765 - b : Creating Jetty7 async servlet handler for server jetty/7.6.15.v20140411
[main (1) ] INFO - 02:00:12.776 - b : Started a@192.168.0.103:58050
[main (1) ] INFO - 02:00:12.777 - e : started Jetty connector on 192.168.0.103:58050
[main (1) ] INFO - 02:00:13.77 - b : Enabled Protocols [SSLv2Hello, TLSv1, TLSv1.1, TLSv1.2] of [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2]
[main (1) ] INFO - 02:00:13.84 - b : Started d@192.168.0.103:58051
[main (1) ] INFO - 02:00:13.84 - e : started Jetty connector on 192.168.0.103:58051
[main (1) ] INFO - 02:00:13.85 - b : Started a@127.0.0.1:58050
[main (1) ] INFO - 02:00:13.86 - e : started Jetty connector on 127.0.0.1:58050
[main (1) ] INFO - 02:00:13.91 - b : Started d@127.0.0.1:58051
[main (1) ] INFO - 02:00:13.91 - e : started Jetty connector on 127.0.0.1:58051
[main (1) ] INFO - 02:00:13.92 - d : started discovery maintenance task, interval=300
[main (1) ] INFO - 02:00:13.95 - Main : initial update check scheduled in 10h 29 min

This line here is interesting:

[main (1) ] INFO - 02:00:00.960 - r : Created server (for receiving TCP streams) on: /192.168.0.103:45492

If I open this port 45492, the app finds the server. But this port seems to be dynamic since it changes every time BubbleUpnp server is started. I can also see in the firewall log that my tablet (with the app) tries to connect to this port and gets blocked.

What is the purpose of this port and can it be bound to be static?

Any other ideas?

Also tried to reboot tablet, server & router many times, even tried different JRE's.