title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Why does AssetUPnP listen on port 80?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • riwi
    • Dec 2016
    • 10

    Why does AssetUPnP listen on port 80?

    Hello,
    I am using AssetUPnP under slackware Linux without major issues for a few years already. Now recently I found that when the Linux server is rebooted, the Appache httpd complains it can't connect with port 80 because another process is listening on port 80. This process is AssetUPnP.
    I have now upgraded from 5.1.1 beta to version 6.7

    * netstat -ntulp
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 192.168.1.11:80 0.0.0.0:* LISTEN 2831/AssetUPnP

    root@riwixeon:/etc/rc.d* ./rc.httpd start
    (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
    (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    AH00015: Unable to open logs

    The httpd starts late because the www folder is mounted quite late. So AssetUPnP is already started before httpd is.
    I can fix this manually by killing AssetUPnP

    * ps -ef | grep Asset
    root 2482 1 0 20:05 ? 00:00:00 /home/richard/asset_upnp/bin/AssetUPnP/AssetUPnP --ipaddress 192.168.1.11
    root 2489 2482 0 20:05 ? 00:00:00 /home/richard/asset_upnp/bin/AssetUPnP/AssetUPnP --fork-is-webconfig --ipaddress 192.168.1.11 --control-pipe 5
    root 2490 2482 0 20:05 ? 00:00:00 /home/richard/asset_upnp/bin/AssetUPnP/AssetUPnP --fork-is-umedialibrary --assetid 0 --control-pipe 11
    root 2831 2482 0 20:05 ? 00:00:00 /home/richard/asset_upnp/bin/AssetUPnP/AssetUPnP --fork-is-upnp --assetid 0 --ipaddress 192.168.1.11 --control-pipe 9
    root 18011 4366 0 20:15 pts/0 00:00:00 grep Asset

    kill 2482
    kill 2490

    Then I can start httpd :
    * /etc/rc.d/rc.httpd start

    And then AssetUPnP :
    * /home/richard/asset_upnp/bin/AssetUPnP/AssetUPnP --ipaddress 192.168.1.11 &
    [1] 17247
    root@riwixeon:/etc/rc.d* Starting Asset web interface at http://192.168.1.11:45537
    pid:17248 Entering mainloop
    pid:17251 Entering mainloop
    pid:17250 Entering media library mainloop

    Why is AssetUPnP taking port 80? When I point a browser at is it will only show a blank page.
    What is the best way to "kill AssetUPnP" when I need/want to? Just the kill on the 2 pid's?. Or is there a nicer shutdown script/command?
    Can I prevent AssetUPnP from taking port 80?

    Regards, Richard
  • PeterP
    Super Moderator
    • Jul 2011
    • 1365

    #2
    Re: Why does AssetUPnP listen on port 80?

    Thanks for the detailed bug report, the problem is being investigated.

    In meanwhile, you can gracefully shut Asset down with --shutdown switch.

    What happens if you open the spurious port80 server in a web brorwser?

    Which exact Asset build is this? x86-64 or other?
    Last edited by PeterP; 08-18-2020, 01:57 PM.

    Comment

    • riwi
      • Dec 2016
      • 10

      #3
      Re: Why does AssetUPnP listen on port 80?

      Originally posted by PeterP
      Thanks for the detailed bug report, the problem is being investigated.

      In meanwhile, you can gracefully shut Asset down with --shutdown switch.

      What happens if you open the spurious port80 server in a web brorwser?

      Which exact Asset build is this? x86-64 or other?

      Thanks. I will use the --shutdown option in the future
      root@riwixeon:~* /home/richard/asset_upnp/bin/AssetUPnP/AssetUPnP --shutdown
      Asset shut down successfully.


      Yes this is 64bit x86

      root@riwixeon:~* uname -a
      Linux riwixeon 4.4.227 *2 SMP Thu Jun 11 15:07:16 CDT 2020 x86_64 Intel(R) Xeon(R) CPU D-1518 @ 2.20GHz GenuineIntel GNU/Linux

      OK, so I stopped httpd, started Asset again

      root@riwixeon:~* netstat -ntulp | grep Asset
      tcp 0 0 192.168.1.11:80 0.0.0.0:* LISTEN 2625/AssetUPnP
      tcp 0 0 192.168.1.11:45537 0.0.0.0:* LISTEN 2622/AssetUPnP
      udp 0 0 0.0.0.0:1900 0.0.0.0:* 2625/AssetUPnP


      Now when I use a browser and connect with 192.168.1.11:80 it shows a blank page (not a timeout or 404 message)

      Comment

      • riwi
        • Dec 2016
        • 10

        #4
        Re: Why does AssetUPnP listen on port 80?

        I am not sure if my reply was lost. I don't see it here.

        It is x86_64
        uname -a
        Linux riwixeon 4.4.227 *2 SMP Thu Jun 11 15:07:16 CDT 2020 x86_64 Intel(R) Xeon(R) CPU D-1518 @ 2.20GHz GenuineIntel GNU/Linux


        /etc/rc.d/rc.httpd stop
        /home/richard/asset_upnp/bin/AssetUPnP/AssetUPnP --shutdown
        /home/richard/asset_upnp/bin/AssetUPnP/AssetUPnP --ipaddress 192.168.1.11 &

        netstat -ntulp | grep Asset
        tcp 0 0 192.168.1.11:80 0.0.0.0:* LISTEN 2625/AssetUPnP
        tcp 0 0 192.168.1.11:45537 0.0.0.0:* LISTEN 2622/AssetUPnP
        udp 0 0 0.0.0.0:1900 0.0.0.0:* 2625/AssetUPnP


        pointing a browser at 192.168.1.11:80 just gives an empty white screen. No error or 404 message.

        Comment

        • PeterP
          Super Moderator
          • Jul 2011
          • 1365

          #5
          Re: Why does AssetUPnP listen on port 80?

          Thanks for the details.
          Is anything on your system taking port 26125? Because that's what Asset is supposed to be using, but apparently it's using port 80 instead for you for some reason.

          Comment

          • PeterP
            Super Moderator
            • Jul 2011
            • 1365

            #6
            Re: Why does AssetUPnP listen on port 80?

            Please try:


            Apparently there was a bug with --ipaddress on systems that did not specifically disallow listening on port 80.

            Comment

            • riwi
              • Dec 2016
              • 10

              #7
              Re: Why does AssetUPnP listen on port 80?

              Originally posted by PeterP
              Thanks for the details.
              Is anything on your system taking port 26125? Because that's what Asset is supposed to be using, but apparently it's using port 80 instead for you for some reason.
              When I have http started first then Asset takes port 26125 instead :

              root@riwixeon:/home/richard/scripts* netstat -ntulp | grep Asset
              tcp 0 0 192.168.1.11:26125 0.0.0.0:* LISTEN 11381/AssetUPnP
              tcp 0 0 192.168.1.11:45537 0.0.0.0:* LISTEN 11378/AssetUPnP
              udp 0 0 0.0.0.0:1900 0.0.0.0:* 11381/AssetUPnP

              Comment

              • riwi
                • Dec 2016
                • 10

                #8
                Re: Why does AssetUPnP listen on port 80?

                Originally posted by PeterP
                Please try:


                Apparently there was a bug with --ipaddress on systems that did not specifically disallow listening on port 80.
                I have tried 6.8. beta but It still has the same result.

                While httpd is not running :
                root@riwixeon:/home/richard/asset_upnp/bin/AssetUPnP* netstat -ntulp | grep Asset
                tcp 0 0 192.168.1.11:80 0.0.0.0:* LISTEN 27375/AssetUPnP
                tcp 0 0 192.168.1.11:45537 0.0.0.0:* LISTEN 27372/AssetUPnP
                udp 0 0 0.0.0.0:1900 0.0.0.0:* 27375/AssetUPnP

                Asset UPnP: riwixeon
                Library Contains 2376 Tracks, 203 Albums
                Version: R6.8 beta 1 [Linux-x64]; Functionality: Premium Registered

                When I start httpd first it will take port 80. Then Asset takes 26125

                root@riwixeon:/home/richard/asset_upnp/bin/AssetUPnP* netstat -ntulp | grep Asset
                tcp 0 0 192.168.1.11:26125 0.0.0.0:* LISTEN 13104/AssetUPnP
                tcp 0 0 192.168.1.11:45537 0.0.0.0:* LISTEN 13101/AssetUPnP
                udp 0 0 0.0.0.0:1900 0.0.0.0:* 13104/AssetUPnP

                I need to specify --ipaddress because this PC also functions as my router/firewall and has multiple interfaces. eth0 and eth1 towards the ISPs and eth2 (10Gbe) to my internal lan.

                Comment

                • riwi
                  • Dec 2016
                  • 10

                  #9
                  Re: Why does AssetUPnP listen on port 80?

                  I made some sort of mistake with twestnig 5.8B1. Not sure what happened becasue I still saw 80 being used.
                  I did the INSTALL.sh again (while asset was not running. Then I moved the folder away from /root to where I want it.

                  * ps -ef | grep httpd
                  root 12693 1 0 20:46 ? 00:00:00 /usr/sbin/httpd -k start
                  apache 12694 12693 0 20:46 ? 00:00:00 /usr/sbin/httpd -k start
                  apache 12695 12693 0 20:46 ? 00:00:00 /usr/sbin/httpd -k start
                  apache 12696 12693 0 20:46 ? 00:00:00 /usr/sbin/httpd -k start
                  apache 12702 12693 0 20:46 ? 00:00:00 /usr/sbin/httpd -k start
                  root 21660 379 0 21:14 pts/2 00:00:00 grep httpd
                  root@riwixeon:/home/richard/asset_upnp/Asset-R6.8b1-Linux-x64* /etc/rc.d/rc.httpd stop

                  ps -ef | grep Asset
                  root 16772 1 0 21:11 pts/2 00:00:00 /root/bin/AssetUPnP/AssetUPnP
                  root 16775 16772 0 21:11 pts/2 00:00:00 /root/bin/AssetUPnP/AssetUPnP --fork-is-webconfig --control-pipe 7
                  root 16776 16772 0 21:11 pts/2 00:00:00 /root/bin/AssetUPnP/AssetUPnP --fork-is-umedialibrary --assetid 0 --control-pipe 14
                  root 16777 16772 0 21:11 pts/2 00:00:00 /root/bin/AssetUPnP/AssetUPnP --fork-is-upnp --assetid 0 --control-pipe 12
                  root 28231 379 0 21:18 pts/2 00:00:00 grep Asset
                  root@riwixeon:/home/richard/asset_upnp/bin/AssetUPnP* ./AssetUPnP --shutdown

                  * ./AssetUPnP --ipaddress 192.168.1.11 &
                  [1] 29302
                  root@riwixeon:/home/richard/asset_upnp/bin/AssetUPnP* Starting Asset web interface at http://192.168.1.11:45537
                  pid:29303 Entering mainloop
                  pid:29306 Entering mainloop
                  pid:29305 Entering media library mainloop

                  root@riwixeon:/home/richard/asset_upnp/bin/AssetUPnP* netstat -ntulp | grep Asset
                  tcp 0 0 192.168.1.11:26125 0.0.0.0:* LISTEN 29306/AssetUPnP
                  tcp 0 0 192.168.1.11:45537 0.0.0.0:* LISTEN 29303/AssetUPnP
                  udp 0 0 0.0.0.0:1900 0.0.0.0:* 29306/AssetUPnP

                  This time it worked OK and it took 26125

                  Sorry for the confusion. Thanks for the quick update

                  Comment

                  • PeterP
                    Super Moderator
                    • Jul 2011
                    • 1365

                    #10
                    Re: Why does AssetUPnP listen on port 80?

                    Thanks for verifying. This was one interesting bug - apparently only manifesting itself if --ipaddress was specified and the system allowed Asset to take port 80, which wasn't the case on any of my test machines.
                    If port 80 was busy or unavailable, everything worked normally - 26125 was taken like it should be.

                    Comment

                    Working...

                    ]]>