Kurento RTSP to webRTC - webrtc

Im a developping a Samsung Smart TV app with Samsung's TOAST and Caph-angular. I am on Windows 10.
When I call our server, I get an RSRP url encoded with H264 but, on smart TVs, RSRP is not supported. Then I have to "transform" the RSRP url to some webRTC one (I know very little about all this so sorry if the terms are incorrect).
I searched here and there and found Kurento which seems to be able to answer my needs.
Before trying Kurento within my app, I wanted to test it on a few demos.
I was able to test one2many example without any problem but I am having trouble running rtsp2webrtc demo.
I git cloned kms-windows and https://github.com/lulop-k/kurento-rtsp2webrtc and tried to run the demo but the player is not displaying anything.
1) I double-click kms-windows\bin\kurento-media-server
2) I launch http-server in kurento-rtsp2webrtc
3) I reach http://localhost:8080/, type my sample rtsp url (rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov) and click on "start"
No error seems to happen, see console logs:
Local icecandidate {"candidate":"candidate:4033732497 1 udp 2113937151 192.168.0.104 62879 typ host generation 0 ufrag tZFB network-cost 50","sdpMid":"audio","sdpMLineIndex":0}
Local icecandidate {"candidate":"candidate:4033732497 2 udp 2113937150 192.168.0.104 62881 typ host generation 0 ufrag tZFB network-cost 50","sdpMid":"audio","sdpMLineIndex":0}
Local icecandidate {"candidate":"candidate:4033732497 1 udp 2113937151 192.168.0.104 62883 typ host generation 0 ufrag tZFB network-cost 50","sdpMid":"video","sdpMLineIndex":1}
Local icecandidate {"candidate":"candidate:4033732497 2 udp 2113937150 192.168.0.104 62885 typ host generation 0 ufrag tZFB network-cost 50","sdpMid":"video","sdpMLineIndex":1}
PlayerEndpoint-->WebRtcEndpoint connection established
oniceconnectionstatechange -> checking
icegatheringstate -> gathering
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:1 1 UDP 2013266431 192.168.0.104 61810 typ host","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:1 1 UDP 2013266431 192.168.0.104 61810 typ host","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:2 1 TCP 1019216127 192.168.0.104 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:2 1 TCP 1019216127 192.168.0.104 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:3 1 TCP 1015021823 192.168.0.104 52180 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:3 1 TCP 1015021823 192.168.0.104 52180 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:4 1 UDP 2013266431 fe80::6403:eba1:c2a3:9605 61812 typ host","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:4 1 UDP 2013266431 fe80::6403:eba1:c2a3:9605 61812 typ host","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:5 1 TCP 1019217663 fe80::6403:eba1:c2a3:9605 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:5 1 TCP 1019217663 fe80::6403:eba1:c2a3:9605 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:6 1 TCP 1015023359 fe80::6403:eba1:c2a3:9605 52182 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:6 1 TCP 1015023359 fe80::6403:eba1:c2a3:9605 52182 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:7 1 UDP 2013266431 fe80::f99b:72cd:cb28:1424 61814 typ host","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:7 1 UDP 2013266431 fe80::f99b:72cd:cb28:1424 61814 typ host","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:8 1 TCP 1019217663 fe80::f99b:72cd:cb28:1424 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:8 1 TCP 1019217663 fe80::f99b:72cd:cb28:1424 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:9 1 TCP 1015023359 fe80::f99b:72cd:cb28:1424 52184 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:9 1 TCP 1015023359 fe80::f99b:72cd:cb28:1424 52184 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:10 1 UDP 2013266431 192.168.56.1 61816 typ host","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:10 1 UDP 2013266431 192.168.56.1 61816 typ host","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:11 1 TCP 1019216895 192.168.56.1 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:11 1 TCP 1019216895 192.168.56.1 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:12 1 TCP 1015022591 192.168.56.1 52186 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:12 1 TCP 1015022591 192.168.56.1 52186 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:1 2 UDP 2013266430 192.168.0.104 61811 typ host","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:1 2 UDP 2013266430 192.168.0.104 61811 typ host","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:2 2 TCP 1019216126 192.168.0.104 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:2 2 TCP 1019216126 192.168.0.104 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:3 2 TCP 1015021822 192.168.0.104 52181 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:3 2 TCP 1015021822 192.168.0.104 52181 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:4 2 UDP 2013266430 fe80::6403:eba1:c2a3:9605 61813 typ host","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:4 2 UDP 2013266430 fe80::6403:eba1:c2a3:9605 61813 typ host","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:5 2 TCP 1019217662 fe80::6403:eba1:c2a3:9605 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:5 2 TCP 1019217662 fe80::6403:eba1:c2a3:9605 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:6 2 TCP 1015023358 fe80::6403:eba1:c2a3:9605 52183 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:6 2 TCP 1015023358 fe80::6403:eba1:c2a3:9605 52183 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:7 2 UDP 2013266430 fe80::f99b:72cd:cb28:1424 61815 typ host","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:7 2 UDP 2013266430 fe80::f99b:72cd:cb28:1424 61815 typ host","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:8 2 TCP 1019217662 fe80::f99b:72cd:cb28:1424 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:8 2 TCP 1019217662 fe80::f99b:72cd:cb28:1424 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:9 2 TCP 1015023358 fe80::f99b:72cd:cb28:1424 52185 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:9 2 TCP 1015023358 fe80::f99b:72cd:cb28:1424 52185 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:10 2 UDP 2013266430 192.168.56.1 61817 typ host","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:10 2 UDP 2013266430 192.168.56.1 61817 typ host","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:11 2 TCP 1019216894 192.168.56.1 9 typ host tcptype active","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:11 2 TCP 1019216894 192.168.56.1 9 typ host tcptype active","sdpMLineIndex":1,"sdpMid":"video"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:12 2 TCP 1015022590 192.168.56.1 52187 typ host tcptype passive","sdpMLineIndex":0,"sdpMid":"audio"}
Remote icecandidate {"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:12 2 TCP 1015022590 192.168.56.1 52187 typ host tcptype passive","sdpMLineIndex":1,"sdpMid":"video"}
Player playing ...
oniceconnectionstatechange -> connected
icegatheringstate -> complete
oniceconnectionstatechange -> completed
icegatheringstate -> complete
But the player does not display anything. I still see the spinner.
I tried adding a STUN server (not sure what it is or if I even need one, just saw this in docs or other stackoverflow issues) and it did not solve anything.
Could you please help me?
Did I do anything wrong or forget something?
And, in the future, when I want to implement this into my tv web app, will I only need to include kurento-client.js and kurento-utils.js files or will there be other things to take care of?
Thanks in advance

Stun server cannot traverse symmetric NAT's so for that purpose if your server is behind NAT then you should try using TURN server

if you Kurento server is behind the NAT - you need to use TURN server for it

Related

Why my WebRTC connection doesn't works at some networks?

I've customized Apprtc project (android version).
assume we have four internet connection (from different network connections):
NetA -- NetB
NetC -- NetD
I can connect from NetA to NetB, but i can't connect from NetC to NetD!
I have set turn server and stun server but i don't know what is wrong.
--
When connecting from NetA to NetB (success):
Offer SDP:
"v=0\r\no=- 632333030865012591 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS ARDAMS___\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 9 102 0 8 105 13 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 .............."
"candidate:2580031558 1 udp 2122260223 100.95.184.57 37422 typ host generation 0 ufrag NL4P network-id 3 network-cost 900"
"candidate:411053810 1 udp 1686052607 5.116.182.156 1026 typ srflx raddr 100.95.184.57 rport 37422 generation 0 ufrag NL4P network-id 3 network-cost 900"
"candidate:3902036248 1 udp 41885695 34.197.185.148 52061 typ relay raddr 5.116.182.156 rport 1026 generation 0 ufrag NL4P network-id 3 network-cost 900"
"candidate":"candidate:2786567656 1 udp 25108223 34.197.185.148 52062 typ relay raddr 5.116.182.156 rport 1032 generation 0 ufrag NL4P network-id 3 network-cost 900"
Answer SDP:
"v=0\r\no=- 3736097442176838392 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS ARDAMS___\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 9 102 0 8 105 13 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:7upj\r\na............"
"candidate:1892013251 1 udp 2122260223 192.168.7.7 37718 typ host generation 0 ufrag 7upj network-id 3 network-cost 10"
"candidate:3650771734 1 udp 1686052607 151.242.87.74 37718 typ srflx raddr 192.168.7.7 rport 37718 generation 0 ufrag 7upj network-id 3 network-cost 10"
"candidate:3902036248 1 udp 41885695 34.197.185.148 52063 typ relay raddr 151.242.87.74 rport 37718 generation 0 ufrag 7upj network-id 3 network-cost 10"
"candidate":"candidate:2786567656 1 udp 25108223 34.197.185.148 52064 typ relay raddr 151.242.87.74 rport 45889 generation 0 ufrag 7upj network-id 3 network-cost 10"
--
When connecting from NetC to NetD (failed):
Offer SDP:
"v=0\r\no=- 280763199112942253 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS ARDAMS___\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 9 102 0 8 105 13 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:UPpi\r\na=ice-pwd:Ow2J0AHuS86I0o0yZ5MOv6a/\r\na=ice-options:renomination\r\na=fingerprint:sha-256................."
"candidate":"candidate:2580031558 1 udp 2122260223 100.95.184.57 34267 typ host generation 0 ufrag UPpi network-id 3 network-cost 900"
"candidate":"candidate:411053810 1 udp 1686052607 5.116.182.156 1287 typ srflx raddr 100.95.184.57 rport 34267 generation 0 ufrag UPpi network-id 3 network-cost 900"
"candidate":"candidate:3902036248 1 udp 41885695 34.197.185.148 58779 typ relay raddr 5.116.182.156 rport 1287 generation 0 ufrag UPpi network-id 3 network-cost 900"
"candidate":"candidate:2786567656 1 udp 25108223 34.197.185.148 58780 typ relay raddr 5.116.182.156 rport 1201 generation 0 ufrag UPpi network-id 3 network-cost 900"
Answer SDP:
"v=0\r\no=- 6478139475592243492 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS ARDAMS___\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 9 102 0 8 105 13 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:Js6x\r\na=ice-pwd:5tyUT023mAERirumK7aal+9F\r\na=ice-options:renomination\r\na=fingerprint:sha-256 45:97:7F:BC:37:90:4D:B6:35:E5:23:C8:12:09:5A:43:D7:4B:03:EC:A0:7B:70:EB:E4:DB:12:B8:7B:1C:6E:5D\r\na=setup:active.............."
"candidate","label":0,"id":"audio","candidate":"candidate:1106113138 1 udp 2122260223 192.168.1.169 44238 typ host generation 0 ufrag Js6x network-id 3 network-cost 10"
"candidate":"candidate:3232101574 1 udp 1686052607 151.247.139.59 44238 typ srflx raddr 192.168.1.169 rport 44238 generation 0 ufrag Js6x network-id 3 network-cost 10"
"candidate":"candidate:3902036248 1 udp 41885695 34.197.185.148 58781 typ relay raddr 151.247.139.59 rport 44238 generation 0 ufrag Js6x network-id 3 network-cost 10"
"candidate":"candidate:2786567656 1 udp 25108223 34.197.185.148 58782 typ relay raddr 151.247.139.59 rport 36519 generation 0 ufrag Js6x network-id 3 network-cost 10"
"candidate":"candidate:238873586 1 udp 2122194687 100.116.182.76 48966 typ host generation 0 ufrag Js6x network-id 4 network-cost 900"
"candidate":"candidate:3266434145 1 udp 1685987071 91.251.147.158 16369 typ srflx raddr 100.116.182.76 rport 48966 generation 0 ufrag Js6x network-id 4 network-cost 900"
"candidate":"candidate:3902036248 1 udp 41820159 34.197.185.148 58783 typ relay raddr 91.251.147.158 rport 16369 generation 0 ufrag Js6x network-id 4 network-cost 900"
"candidate":"candidate:2786567656 1 udp 25042687 34.197.185.148 58784 typ relay raddr 91.251.147.158 rport 16222 generation 0 ufrag Js6x network-id 4 network-cost 900"
EDIT :
Thanks to all. I found my problem is from my turn server. I can connect in any situation when using appr.tc ice servers (google turn servers). but i can't connect with my turn server. please check question about my turn server at this page :
Why my turn server doesn't work?
Take a look at this article Introduction to WebRTC protocols.
You need to set up STUN and TURN server, to pass the firewall. If peer is behind a firewall or a router, by connecting only to IP address you will hit router not the requested peer device. etc etc.
I would begin to test my TURN server if it is really working.
Disable direct links on your firewall (between NetC and NetD or just block the peer IP) to see if it is working via TURN. If not, then fix your TURN server or it's configuration.

Apache HTTP Server port doesn't respond

I'm forging a packet to start a TCP connection with port 80 (so I'm sending a TCP-SYN) and the HTTP Server does not respond at all.
I've ran netstat -natu during the all process and no change on the port 80 state:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 192.168.1.7:41562 151.101.61.140:443 ESTABLISHED
tcp 0 0 192.168.1.7:45660 216.58.214.161:80 ESTABLISHED
tcp 0 0 192.168.1.7:50852 151.101.193.69:80 TIME_WAIT
tcp 0 0 192.168.1.7:36450 64.233.184.95:443 ESTABLISHED
tcp 1 0 192.168.1.7:46960 162.213.33.49:443 CLOSE_WAIT
tcp6 0 0 :::80 :::* LISTEN
tcp6 0 0 ::1:631 :::* LISTEN
tcp6 1 0 ::1:35050 ::1:631 CLOSE_WAIT
udp 0 0 0.0.0.0:631 0.0.0.0:*
udp 0 0 0.0.0.0:49933 0.0.0.0:*
udp 0 0 0.0.0.0:5287 0.0.0.0:*
The port is always on LISTEN state, and upon receiving a TCP-SYN it should change to SYN_RECV right?
If it helps, a Wireshark capture of the packet I send:
So I can't seem to see what the problem is.
Have you noticed that you're using tcp6 (mean IPv6) but trying to open up the session using IPv4?
I guess that's why it's not opening the session. Try to align to IPv4.

Gateway Timeout: can't connect to remote host after reboot

I'm running apache2 on a CentOS 6.7 VM. My PHP website was working fine before a reboot but afterwards I'm getting 504 Gateway Timeout.
$ telnet <MYIP> 80
Trying <MYIP>...
Connected to <MYHOSTNAME>.
Escape character is '^]'.
HTTP/1.0 504 Gateway Timeout
Gateway Timeout: can't connect to remote host
Connection closed by foreign host.
I've been googling for hours but can't find anything that works. The website works locally i.e. if I wget http://localhost:80/.
My iptables is as follows:
$ sudo netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1556/rpcbind
tcp 0 0 0.0.0.0:35443 0.0.0.0:* LISTEN 1578/rpc.statd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1745/sshd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 1782/postmaster
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1866/master
tcp 0 0 ::ffff:127.0.0.1:8005 :::* LISTEN 2736/java
tcp 0 0 :::8009 :::* LISTEN 2736/java
tcp 0 0 :::111 :::* LISTEN 1556/rpcbind
tcp 0 0 :::80 :::* LISTEN 2854/httpd
tcp 0 0 :::8080 :::* LISTEN 2736/java
tcp 0 0 :::54644 :::* LISTEN 1578/rpc.statd
tcp 0 0 :::22 :::* LISTEN 1745/sshd
tcp 0 0 ::1:5432 :::* LISTEN 1782/postmaster
tcp 0 0 ::1:25 :::* LISTEN 1866/master
enter code here
Any ideas what could be wrong or how to troubleshoot this?
After having restarted apache many times and trying to set firewall rules again I did both again and it worked.
I've no clue what the issue was so still interested if anyone knows.

How to run tomcat7 web app through https over port 8443?

I have a vaadin 7 app running on tomcat 7 on an EC2 server. The app runs through port 8080, so I redirect my domain from 80 to 8080 using:
/sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
Now, I need to use an SSL certificate that should run on ports 8443 or 443, but checking my port using sudo netstat -nlp, I get this:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2332/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2371/sendmail
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2987/mysqld
tcp 0 0 :::8080 :::* LISTEN 3204/java
tcp 0 0 :::80 :::* LISTEN 3151/httpd
tcp 0 0 :::22 :::* LISTEN 2332/sshd
tcp 0 0 ::ffff:127.0.0.1:8005 :::* LISTEN 3204/java
tcp 0 0 :::8009 :::* LISTEN 3204/java
udp 0 0 0.0.0.0:68 0.0.0.0:* 2063/dhclient
udp 0 0 172.30.0.27:123 0.0.0.0:* 2356/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 2356/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 2356/ntpd
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 1742 2987/mysqld /var/lib/mysql/mysql.sock
unix 2 [ ACC ] STREAM LISTENING 10316 2151/dbus-daemon /var/run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 9565 1/init #/com/ubuntu/upstart
unix 2 [ ACC ] SEQPACKET LISTENING 9820 1578/udevd #/org/kernel/udev/udevd
So, as I understand, those ports aren't even there...How can I "activate" them and then use them for my https connection?
You are supposed to configure your certificate in your tomcat as shown here .
Then you should open those ports in the EC2 console as shown here.

Apache Not Starting

I can't seem to start Apache 2.2 on Windows7 listening on ports 80 and 8443.
I get the following error:
(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:8443 .
This error is usually caused by another app listening on the same port but I definitely don't have another application listening on port 8443.
I get this error no matter what port I tell ssl to listen on.
Any ideas?
Netstat dump:
Active Connections
Proto Local Address Foreign Address State PID
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4
Can not obtain ownership information
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 872
RpcSs
[svchost.exe]
TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 3500
[magentproc.exe]
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING 4
Can not obtain ownership information
TCP 0.0.0.0:1025 0.0.0.0:0 LISTENING 508
[wininit.exe]
TCP 0.0.0.0:1026 0.0.0.0:0 LISTENING 988
eventlog
[svchost.exe]
TCP 0.0.0.0:1027 0.0.0.0:0 LISTENING 472
Schedule
[svchost.exe]
TCP 0.0.0.0:1028 0.0.0.0:0 LISTENING 580
[lsass.exe]
TCP 0.0.0.0:1029 0.0.0.0:0 LISTENING 556
[services.exe]
TCP 0.0.0.0:5001 0.0.0.0:0 LISTENING 3500
[magentproc.exe]
TCP 0.0.0.0:5002 0.0.0.0:0 LISTENING 3500
[magentproc.exe]
TCP 0.0.0.0:5003 0.0.0.0:0 LISTENING 3500
[magentproc.exe]
TCP 0.0.0.0:5357 0.0.0.0:0 LISTENING 4
Can not obtain ownership information
TCP 0.0.0.0:8000 0.0.0.0:0 LISTENING 4
Can not obtain ownership information
TCP 0.0.0.0:50500 0.0.0.0:0 LISTENING 3500
[magentproc.exe]
TCP 0.0.0.0:54345 0.0.0.0:0 LISTENING 3500
[magentproc.exe]
TCP 10.125.247.11:139 0.0.0.0:0 LISTENING 4
Can not obtain ownership information
TCP 10.125.247.11:28530 172.19.41.40:8080 ESTABLISHED 4172
[OUTLOOK.EXE]
TCP 10.125.247.11:28532 172.19.41.40:8080 ESTABLISHED 4172
[OUTLOOK.EXE]
TCP 10.125.247.11:28555 172.19.41.40:8080 ESTABLISHED 4172
[OUTLOOK.EXE]
TCP 10.125.247.11:28556 172.19.41.40:8080 ESTABLISHED 4172
[OUTLOOK.EXE]
TCP 10.125.247.11:28560 172.19.41.40:8080 ESTABLISHED 4172
[OUTLOOK.EXE]
TCP 10.125.247.11:28563 172.19.41.40:8080 ESTABLISHED 4172
[OUTLOOK.EXE]
TCP 10.125.247.11:28564 172.19.41.40:8080 ESTABLISHED 3724
[communicator.exe]
TCP 10.125.247.11:28567 172.19.41.40:8080 ESTABLISHED 4172
[OUTLOOK.EXE]
TCP 10.125.247.11:28571 172.19.41.40:8080 ESTABLISHED 4172
[OUTLOOK.EXE]
TCP 10.125.247.11:28582 172.19.41.40:8080 ESTABLISHED 4172
[OUTLOOK.EXE]
TCP 10.125.247.11:28584 172.19.41.40:8080 ESTABLISHED 4172
[OUTLOOK.EXE]
TCP 10.125.247.11:28603 172.19.41.40:8080 ESTABLISHED 4172
[OUTLOOK.EXE]
TCP 10.125.247.11:28607 172.19.41.40:8080 ESTABLISHED 4172
[OUTLOOK.EXE]
TCP 10.125.247.11:28667 172.19.41.40:8080 ESTABLISHED 3724
[communicator.exe]
TCP 10.125.247.11:28669 172.19.41.40:8080 ESTABLISHED 3724
[communicator.exe]
TCP 10.125.247.11:29482 172.19.41.40:8080 ESTABLISHED 1692
[chrome.exe]
TCP 10.125.247.11:29486 172.19.41.40:8080 ESTABLISHED 1692
[ chrome.exe]
TCP 10.125.247.11:29489 172.19.41.40:8080 ESTABLISHED 1692
[chrome.exe]
TCP 10.125.247.11:29491 172.19.41.40:8080 ESTABLISHED 1692
[chrome.exe]
TCP 10.125.247.11:29493 172.19.41.40:8080 ESTABLISHED 1692
[chrome.exe]
TCP 10.125.247.11:29495 172.19.41.40:8080 ESTABLISHED 1692
[chrome.exe]
TCP 10.125.247.11:29498 172.19.41.40:8080 ESTABLISHED 1692
[chrome.exe]
TCP 10.125.247.11:29502 172.19.41.40:8080 ESTABLISHED 1692
[chrome.exe]
TCP 10.125.247.11:29505 172.19.41.40:8080 ESTABLISHED 1692
[chrome.exe]
TCP 10.125.247.11:29509 172.19.41.40:8080 ESTABLISHED 1692
[chrome.exe]
TCP 10.125.247.11:29513 172.19.41.40:8080 ESTABLISHED 1692
[chrome.exe]
TCP 10.125.247.11:29514 172.19.41.40:8080 ESTABLISHED 1692
[chrome.exe]
TCP 10.125.247.11:29515 172.19.41.40:8080 ESTABLISHED 1692
[chrome.exe]
TCP 127.0.0.1:1033 0.0.0.0:0 LISTENING 3212
[AccentureMobileMediaReminderClient.exe]
TCP [::]:80 [::]:0 LISTENING 4
Can not obtain ownership information
TCP [::]:135 [::]:0 LISTENING 872
RpcSs
[svchost.exe]
TCP [::]:445 [::]:0 LISTENING 4
Can not obtain ownership information
TCP [::]:1025 [::]:0 LISTENING 508
[wininit.exe]
TCP [::]:1026 [::]:0 LISTENING 988
eventlog
[svchost.exe]
TCP [::]:1027 [::]:0 LISTENING 472
Schedule
[svchost.exe]
TCP [::]:1028 [::]:0 LISTENING 580
[lsass.exe]
TCP [::]:1029 [::]:0 LISTENING 556
[services.exe]
TCP [::]:5357 [::]:0 LISTENING 4
Can not obtain ownership information
TCP [::]:8000 [::]:0 LISTENING 4
Can not obtain ownership information
UDP 0.0.0.0:123 *:* 1064
W32Time
[svchost.exe]
UDP 0.0.0.0:500 *:* 472
IKEEXT
[svchost.exe]
UDP 0.0.0.0:3702 *:* 1064
EventSystem
[svchost.exe]
UDP 0.0.0.0:3702 *:* 1064
EventSystem
[svchost.exe]
UDP 0.0.0.0:3702 *:* 2276
PeerDistSvc
[svchost.exe]
UDP 0.0.0.0:3702 *:* 1064
EventSystem
[svchost.exe]
UDP 0.0.0.0:3702 *:* 2276
PeerDistSvc
[svchost.exe]
UDP 0.0.0.0:3702 *:* 1064
EventSystem
[svchost.exe]
UDP 0.0.0.0:4500 *:* 472
IKEEXT
[svchost.exe]
UDP 0.0.0.0:5355 *:* 1228
Dnscache
[svchost.exe]
UDP 0.0.0.0:55306 *:* 1064
EventSystem
[svchost.exe]
UDP 0.0.0.0:55308 *:* 1064
EventSystem
[svchost.exe]
UDP 10.125.247.11:137 *:* 4
Can not obtain ownership information
UDP 10.125.247.11:138 *:* 4
Can not obtain ownership information
UDP 10.125.247.11:1900 *:* 3952
SSDPSRV
[svchost.exe]
UDP 10.125.247.11:62526 *:* 3952
SSDPSRV
[svchost.exe]
UDP 127.0.0.1:1900 *:* 3952
SSDPSRV
[svchost.exe]
UDP 127.0.0.1:53356 *:* 2644
[taskhost.exe]
UDP 127.0.0.1:56632 *:* 580
[lsass.exe]
UDP 127.0.0.1:57319 *:* 3724
[communicator.exe]
UDP 127.0.0.1:60703 *:* 3724
[communicator.exe]
UDP 127.0.0.1:62527 *:* 3952
SSDPSRV
[svchost.exe]
UDP 127.0.0.1:63140 *:* 4172
[OUTLOOK.EXE]
UDP [::]:123 *:* 1064
W32Time
[svchost.exe]
UDP [::]:500 *:* 472
IKEEXT
[svchost.exe]
UDP [::]:3702 *:* 1064
EventSystem
[svchost.exe]
UDP [::]:3702 *:* 2276
PeerDistSvc
[svchost.exe]
UDP [::]:3702 *:* 1064
EventSystem
[svchost.exe]
UDP [::]:3702 *:* 1064
EventSystem
[svchost.exe]
UDP [::]:3702 *:* 2276
PeerDistSvc
[svchost.exe]
UDP [::]:3702 *:* 1064
EventSystem
[svchost.exe]
UDP [::]:4500 *:* 472
IKEEXT
[svchost.exe]
UDP [::]:5355 *:* 1228
Dnscache
[svchost.exe]
UDP [::]:55307 *:* 1064
EventSystem
[svchost.exe]
UDP [::]:55309 *:* 1064
EventSystem
[svchost.exe]
UDP [::1]:1900 *:* 3952
SSDPSRV
[svchost.exe]
UDP [::1]:62525 *:* 3952
SSDPSRV
[svchost.exe]
UDP [fe80::cca:bedf:a696:8354%13]:546 *:* 988
Dhcp
[svchost.exe]
UDP [fe80::cca:bedf:a696:8354%13]:1900 *:* 3952
SSDPSRV
[svchost.exe]
UDP [fe80::cca:bedf:a696:8354%13]:62524 *:* 3952
SSDPSRV
[svchost.exe]
it cetainly looks that way .. now this is a long shot,, but check your /etc/services and see if the 8443 port is defined?
pcsync-https 8443/tcp # PCsync HTTPS
pcsync-https 8443/udp # PCsync HTTPS
pcsync-http 8444/tcp # PCsync HTTP
pcsync-http 8444/udp # PCsync HTTP
I was told by this:
If you are using the latest Skype, go to Tools -> Options -> Advanced -> connection. Disable the 'Use port 80 and 443 for alternatve.. '
Sign Out and Close all Skype windows.
Thanks for the advice. It Worked!!!