HTTP/HTTPS Share on RedHat (RHEL 7.2)

easyedc
Valued Contributor II

Turning on HTTP file sharing for my DP for the first time and getting an issue where my files seem to fail to download. I THINK everything is configured, I THINK all ports are open, but I get failures trying to download the installer. Just going to the URL does not download the file, which tells me something is obviously wrong. I've dug around as much as I could find, but can't much that seems to pertain.

 jamf policy -verbose
 verbose: JAMF binary already symlinked
 verbose: JAMF agent already symlinked
 verbose: Checking for an existing instance of this application...
Checking for policies triggered by "recurring check-in" for user "jec6932s"...
 verbose: Checking for active ethernet connection...
 verbose: Active ethernet connection found...
 verbose: Removing any cached policies for this trigger.
 verbose: Parsing servers...
 verbose: Parsing Policy Test HTTP Policy (12)...
 verbose: The Management Framework Settings are up to date.
 verbose: Found 1 matching policies.
Executing Policy Test HTTP Policy
 verbose: Starting install...
Downloading LWAPluginInstaller.pkg...
Downloading http://servername.org.com/Packages/TestPackage.pkg...
The network connection was interrupted while downloading the package from http://servername.org.com/Packages/TestPackage.pkg. Attempting to reconnect...
Downloading LWAPluginInstaller.pkg...
Downloading http://servername.org.com/Packages/TestPackage.pkg...
Error: LWAPluginInstaller.pkg is not available on the HTTP server.
Submitting log to https://jamftest.org.com:8443/
 verbose: Policy error code: 801

I think I've got the ports on my server open but things just fail....

$ netstat -tulpn | grep :80
(No info could be read for "-p": geteuid()=33849 but you should be root.)
tcp6       0      0 :::8080                 :::*                    LISTEN      -                   
tcp6       0      0 127.0.0.1:8005          :::*                    LISTEN      -                   
tcp6       0      0 :::8009                 :::*                    LISTEN      -

I think It's my symlink somewhere not in the right location. I'm on RHEL 7.2 and tried both

/var/www/

and

/var/www/html

Interestingly I noticed that the policy seems to be running the download against [http://servername.org.com/ ](link [http://servername.org.com/)but I would have expected it to run against [http://DNSEntry.org.com](link http://DNSEntry.org.com)/

5 REPLIES 5

donmontalvo
Esteemed Contributor III

HTTP supports resumable downloads, so this is normal:

Downloading http://servername.org.com/Packages/TestPackage.pkg...
The network connection was interrupted while downloading the package from http://servername.org.com/Packages/TestPackage.pkg. Attempting to reconnect...

This looks like the PKG is either not available, or the permissions are wrong, or maybe the package isn't replicated to the effected distribution point? Also, any chance you're load balancing your HTTP distribution points?

Downloading http://servername.org.com/Packages/TestPackage.pkg...
Error: LWAPluginInstaller.pkg is not available on the HTTP server.

RHEL 6 is very stable for distribution points, we never got to RHEL 7.

--
https://donmontalvo.com

franton
Valued Contributor III

@easyedc The one thing you didn't mention ... do the files being served have the correct ownership and permissions? Do an ls -al on the folder containing the packages. It should be owned by the apache user and a member of the apache group on your RHEL server.

Assuming they're both apache then chmod -R apache:apache /path/to/www

easyedc
Valued Contributor II

The caspershare is currently owned by my casperadmin user:

Packages]$ ls -la /caspershare/Packages/
total 9716
drwxr-xr-x 2 casperadmin users     116 Dec 16 14:16 .
drwxr-xr-x 5 casperadmin root       68 Nov 30 11:55 ..
-rwxr--r-- 1 casperadmin users    4096 Dec 16 14:16 ._LWAPluginInstaller.pkg
-rwxr--r-- 1 casperadmin users 9922840 Jun 10  2016 LWAPluginInstaller.pkg

Are you referring to the directory created by my symlink? Root took ownership when it created the symlink.

$ ls -la /var/www/html/
total 0
drwxr-xr-x 2 root root 21 Dec 19 09:33 .
drwxr-xr-x 4 root root 31 Dec 19 08:37 ..
lrwxrwxrwx 1 root root 22 Dec 19 09:33 Packages -> /caspershare/Packages/

tlarkin
Honored Contributor

Open up the file in a web browser, can you download it that way? That is the best way to test if HTTP is working, first take Casper out of the picture and see if you can browse to your Apache server in a web browser. If that works then there is probably a config issue between Casper and the Apache server. If that doesn't work you need to maybe configure the virtual hosts file to point it to your web docs folder where you are hosting packages.

franton
Valued Contributor III

As I stated earlier, you've got the wrong owner and group on your files and folder. Your web server can't see them as they're not owned by the web server.