anandslab / AtoMiC-ToolKit

AtoMiC Toolkit simplifies HTPC / Home Server setup and management on Ubuntu and Debian variants including Raspbian. It currently supports: Couchpotato, Deluged, Emby, FFmpeg, Headphones, Htpcmanager, Jackett, Kodi, Lazylibrarian, Madsonic, Mono, Mylar, Nzbget, Nzbhydra, NzbToMedia, Ombi, Plex, Plexpy, Pyload, qBittorrent, Radarr, Sabnzbd+, Sickgear, Sickrage, Sonarr, Subsonic, Transmission, Unrar, Watcher, and Webmin.
https://www.smarthomebeginner.com
MIT License
851 stars 115 forks source link

Muximux/organizr install does not work on ubuntu 16 #237

Closed ismay closed 6 years ago

ismay commented 6 years ago

The problem

Muximux cannot be accessed on /muximux. My server url is media.home, so I'm expecting muximux to be available on media.home/muximux. However that returns a 404 from nginx. Other services can be accessed just fine. Just media.home (so port 80), returns a welcome to nginx message.

The access details:

Default port: muximux found in AtoMiC-ToolKit config.
Cannot determine port set in Muximux config.

Maybe that's the problem somehow? I'm reporting this for muximux, but I have the exact same problem with organizr (which also isn't available on media.home/organizr).

My Linux distribution and version is:

I'm seeing this behaviour on:

Link to install logs

https://gist.github.com/ismay/93fe8e051140e737a0377ae1b92d4e7f

I'm not a dummy, so I've checked these!

ismay commented 6 years ago

Ah, I see that using the ip of the server does work. So 192.168.10.5/muximux works. Using the hostname doesn't. Even though all my other ATK services are available at media.home:port. Any idea why? My router's dns just resolves the hostname for all computers on my network (otherwise the ports wouldn't work either), so it should be ATK related right?

TommyE123 commented 6 years ago

hi @ismay

Muximux, Organizr phpsysinfoand rutorrent all use Nginx to host the service and so work slightly differently to the other services you can install via ATK which uses a port.

We are working on updating this area at the moment and hope to have some enhancements out soon which will allow you to access the sites using your hostname as well.

If you want to get it working straight away, you can go to /etc/nginx/sites-available and edit AtoMiC-ToolKit-configured-sites and add your hostname (media.home) to the server_name line and then you can use media.home/muximux.

hope this helps Tom

ismay commented 6 years ago

Cool, thanks!

nemchik commented 6 years ago

@ismay The changes have been merged in. Could you update ATK and then try updating nginx? It should replace the config (I think) and then the hostname should work. You may need to run the update from Muxi's menu in order to get the URL to work again.

ismay commented 6 years ago

Updated it, and it works when I access the server by ip (192.168.1.5/muximux). But not when I use my custom domain extension (media.home/muximux), that returns a 404.

AtoMiC Muximux Installer Script

Press [Enter] key to continue or Ctrl+C to exit...

AtoMiC Nginx Installer Script
Failed to stop apache2.service: Unit apache2.service not loaded.
Failed to execute operation: No such file or directory

AtoMiC PHP Installer Script

--->Adding PHP repository...
PHP repository already exists

--->Refreshing packages list...
Done

--->Installing PHP...
Reading package lists... Done
Building dependency tree
Reading state information... Done
php7.1 is already the newest version (7.1.14-1+ubuntu16.04.1+deb.sury.org+1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

--->Installing prerequisites for PHP...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php7.1-sqlite3' for regex 'php7.1-sqlite'
php-mail is already the newest version (1.3.0-1).
openssl is already the newest version (1.1.0g-2.1+ubuntu16.04.1+deb.sury.org+1).
php-redis is already the newest version (3.1.6-1+ubuntu16.04.1+deb.sury.org+1).
php-memcached is already the newest version (3.0.4+2.2.0-1+ubuntu16.04.1+deb.sury.org+1).
libapache2-mod-php7.1 is already the newest version (7.1.14-1+ubuntu16.04.1+deb.sury.org+1).
php7.1-cli is already the newest version (7.1.14-1+ubuntu16.04.1+deb.sury.org+1).
php7.1-fpm is already the newest version (7.1.14-1+ubuntu16.04.1+deb.sury.org+1).
php7.1-bz2 is already the newest version (7.1.14-1+ubuntu16.04.1+deb.sury.org+1).
php7.1-common is already the newest version (7.1.14-1+ubuntu16.04.1+deb.sury.org+1).
php7.1-curl is already the newest version (7.1.14-1+ubuntu16.04.1+deb.sury.org+1).
php7.1-gd is already the newest version (7.1.14-1+ubuntu16.04.1+deb.sury.org+1).
php7.1-json is already the newest version (7.1.14-1+ubuntu16.04.1+deb.sury.org+1).
php7.1-mbstring is already the newest version (7.1.14-1+ubuntu16.04.1+deb.sury.org+1).
php7.1-mcrypt is already the newest version (7.1.14-1+ubuntu16.04.1+deb.sury.org+1).
php7.1-mysql is already the newest version (7.1.14-1+ubuntu16.04.1+deb.sury.org+1).
php7.1-sqlite3 is already the newest version (7.1.14-1+ubuntu16.04.1+deb.sury.org+1).
php7.1-tidy is already the newest version (7.1.14-1+ubuntu16.04.1+deb.sury.org+1).
php7.1-xml is already the newest version (7.1.14-1+ubuntu16.04.1+deb.sury.org+1).
php7.1-zip is already the newest version (7.1.14-1+ubuntu16.04.1+deb.sury.org+1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
---> PHP installation complete.

--->Stopping Nginx...
nginx.service is now: inactive

--->Removing Nginx repository...
OK

--->Removing Nginx Keys...
OK

--->Adding Nginx repository...
deb http://nginx.org/packages/mainline/ubuntu/ xenial nginx
deb-src http://nginx.org/packages/mainline/ubuntu/ xenial nginx

--->Adding Nginx Keys...
OK

--->Refreshing packages list...
Done

--->Installing Nginx...
Reading package lists... Done
Building dependency tree
Reading state information... Done
nginx is already the newest version (1.13.9-1~xenial).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

--->configuring NGINX
Set the correct folder permissions on /var/www for user www-data
Copied AtoMiC-ToolKit-configured-sites file over
Updated config file with correct PHP Version
Updated config file with current IPADDRESS
Updated config file with current HOSTNAME
Location file couchpotato.atomic.conf copied over
Location file deluge.atomic.conf copied over
Location file emby.atomic.conf copied over
Location file glances.atomic.conf copied over
Location file grafana.atomic.conf copied over
Location file headphones.atomic.conf copied over
Location file htpcmanager.atomic.conf copied over
Location file jackett.atomic.conf copied over
Location file lazylibrarian.atomic.conf copied over
Location file madsonic.atomic.conf copied over
Location file medusa.atomic.conf copied over
Location file muximux.atomic.conf copied over
Location file mylar.atomic.conf copied over
Location file netdata.atomic.conf copied over
Location file nzbget.atomic.conf copied over
Location file nzbhydra.atomic.conf copied over
Location file ombi.atomic.conf copied over
Location file organizr.atomic.conf copied over
Location file phpsysinfo.atomic.conf copied over
Location file plex.atomic.conf copied over
Location file plexpy.atomic.conf copied over
Location file pyload.atomic.conf copied over
Location file qbittorrent.atomic.conf copied over
Location file radarr.atomic.conf copied over
Location file resilio-sync.atomic.conf copied over
Location file rutorrent.atomic.conf copied over
Location file sabnzbd.atomic.conf copied over
Location file sickgear.atomic.conf copied over
Location file sickrage.atomic.conf copied over
Location file sonarr.atomic.conf copied over
Location file subsonic.atomic.conf copied over
Location file syncthing.atomic.conf copied over
Location file transmission.atomic.conf copied over
Location file ubooquity.atomic.conf copied over
Location file watcher.atomic.conf copied over
Location file webmin.atomic.conf copied over
Backed up existing nginx.conf file
Created new nginx.conf file

--->Starting Nginx...
nginx.service is now: active

--->Reload Nginx config file...
Done
---> Nginx installation complete.

--->Checking for previous version of Muximux...
No previous Muximux folder found to backup

--->Downloading latest Muximux...
Getting: https://github.com/mescon/Muximux.git
Cloning into '/var/www/muximux'...
remote: Counting objects: 267, done.
remote: Compressing objects: 100% (245/245), done.
remote: Total 267 (delta 17), reused 231 (delta 16), pack-reused 0
Receiving objects: 100% (267/267), 3.11 MiB | 2.96 MiB/s, done.
Resolving deltas: 100% (17/17), done.
Checking connectivity... done.

--->Setting permissions...
/var/www/muximux Done

--->Configuring Muximux Settings...
Set the correct folder permissions

--->All done. Muximux installation complete.
For access details, run the Muximux Access Details utility.

---> Copy Reverse Proxy file over.

--->Stopping Muximux...
Nothing found to stop
Symlinked muximux.atomic.conf location file

--->Reload Nginx config file...
Done

--->Starting Muximux...
Startup file not found.

Thank you for using the AtoMiC ToolKit.
Please visit https://gitter.im/htpcBeginner/AtoMiC-ToolKit to discuss or raise any issues.

Press [Enter] key to continue or Ctrl+C to exit...

Access details:

AtoMiC Muximux Access Details

Press [Enter] key to continue or Ctrl+C to exit...

--->Searching for possible port numbers...
Default port: muximux found in AtoMiC-ToolKit config.
Cannot determine port set in Muximux config.

--->Finding Muximux System details...

You may be able to access Muximux on any of the following URLs...
--->xx.xx.xx.xx/muximux from anywhere (requires port forwarding on router)
--->192.168.1.5/muximux from your local network
--->media/muximux from your local network
--->0.0.0.0/muximux on this system
If SSL is enabled, then use HTTPS instead of HTTP in the above URLs.

Your Muximux credentials are...
--->Username: Incompatibility. Cannot determine username.
--->Password: Incompatibility. Cannot determine password.

Thank you for using the AtoMiC ToolKit.
Please visit https://gitter.im/htpcBeginner/AtoMiC-ToolKit to discuss or raise any issues.

Press [Enter] key to continue or Ctrl+C to exit...
ismay commented 6 years ago

Somehow the upgrade also broke my radarr install. Removed muximux and reinstalled radarr and it still doesn't work. Weird.

nemchik commented 6 years ago

Radarr itself is broken right now. We're waiting for a fix to be released.

Your host name is media not media.home and the logs show that is what got configured.

ismay commented 6 years ago

Radarr itself is broken right now. We're waiting for a fix to be released.

Ok, so that's unrelated.

Your host name is media not media.home and the logs show that is what got configured.

Yeah, that's my host name, you're right. However, on my network I'm using the custom TLD .home (with pfsense). But it also works without, so that's not a big deal. It's just that it doesn't work when I append the .home.

A bigger problem is that after installing / uninstalling muximux through atk, accessing the machine over ssh doesn't work anymore. Is nginx now listening to all the ports?

ismay commented 6 years ago

A bigger problem is that after installing / uninstalling muximux through atk, accessing the machine over ssh doesn't work anymore. Is nginx now listening to all the ports?

Ah wait, this might be my Ubuntu 16 install acting up. šŸ¤¦ā€ā™‚ļø Nothing but problems with 16.. Let me check.

Edit: yeah that was me. So yeah, seems to be working šŸ‘ Thanks for the update!

nemchik commented 6 years ago

I've never heard of atk breaking ssh, and no nginx doesn't listen on all ports, just 80 and 443. SSH normally runs on 22.

If you absolutely need the .home extension you can edit the atk config found in /etc/nginx/sites-available/ and find the server_name line and add media.home to it. If you only add the .home to the existing hostname then it won't work without the hostname. So your line should look something like this: server_name media.home media 192.168.1.5 127.0.0.1 0.0.0.0. Once you save that you need to run sudo systemctl reload nginx and it should work.

ismay commented 6 years ago

I've never heard of atk breaking ssh, and no nginx doesn't listen on all ports, just 80 and 443. SSH normally runs on 22.

Yeah it was my mistake, see my earlier comment.

nemchik commented 6 years ago

Sorry, on mobile the comments don't show up while I'm typing a response :)

Anyway does this solve the issue? If not just let me know what else I can do to help.

ismay commented 6 years ago

Yeah definitely, for me it does. Thanks!

nemchik commented 6 years ago

Also p.s. if ATK runs an update on nginx (or you install another app that uses nginx) it will overwrite any custom configs, so you'll have to edit the file again. That's being worked on so it won't happen in the future hopefully.

TommyE123 commented 6 years ago

Are we OK to close this issue off now? :-)

ismay commented 6 years ago

Iā€™d say so yeah

TommyE123 commented 6 years ago

Thanks, Glad your working OK now!

ismay commented 6 years ago

Thanks! šŸ‘