Giter VIP home page Giter VIP logo

Comments (14)

rtrouton avatar rtrouton commented on May 29, 2024 1

Correct, which is why I referenced the "host" command in my earlier note. Ultimately, host is doing a DNS lookup. If the DNS lookup fails, the script stops its execution because failing that check means that it can't guarantee that the rest of the script will work correctly.

As with many things Mac-related, check your DNS.

from rtrouton_scripts.

rtrouton avatar rtrouton commented on May 29, 2024

Sounds like a curl issue and that you're trying to download from a web server via HTTPS.

The curl command in the script doesn't do certificate validation, so I'm betting it's a timeout issue unless you've changed the curl function as written in the script.

from rtrouton_scripts.

Tecnico1931 avatar Tecnico1931 commented on May 29, 2024

yea web server is https

from rtrouton_scripts.

rtrouton avatar rtrouton commented on May 29, 2024

I'd recommend a couple of things:

  1. Tracking down what that error message actually means.
  2. Getting HTTPS out of the loop and testing against an HTTP server. If the script works when downloading the .zip file from HTTP, the problem is outside the scope of the script.

from rtrouton_scripts.

Tecnico1931 avatar Tecnico1931 commented on May 29, 2024

placed the file in a http download location now getting this

2014-05-07 10:15:05 ======== Starting CasperCheck ========
2014-05-07 10:15:05 Checking for active network connection.
2014-05-07 10:15:05 Network connection appears to be live.
2014-05-07 10:15:05 Pausing for two minutes to give WiFi and DNS time to come online.
2014-05-07 10:17:05 Unable to verify access to site network. Exiting CasperCheck.
2014-05-07 10:17:05 ======== CasperCheck Finished ========

from rtrouton_scripts.

rtrouton avatar rtrouton commented on May 29, 2024

Do you have the fully qualified domain name of your JSS listed in the following variable?:

jss_server_address="server_name_here.domain.com"

It should not be this: jss_server_address="http://server_name_here.domain.com"

If you do not have "http://" in the "jss_server_address" variable, it may be a DNS lookup issue. That error is triggered by the "host" command trying to do a DNS lookup of the server address defined in the "jss_server_address" variable and the lookup not succeeding.

from rtrouton_scripts.

Tecnico1931 avatar Tecnico1931 commented on May 29, 2024

I have just jss_server_address="server_name_here.domain.com" but we do use public ips for most of our workstations not sure if that's an issue.

from rtrouton_scripts.

rtrouton avatar rtrouton commented on May 29, 2024

Can you ping the JSS from the affected Mac, using the DNS address that you've put into the "jss_server_address" variable?

from rtrouton_scripts.

Tecnico1931 avatar Tecnico1931 commented on May 29, 2024

yes

from rtrouton_scripts.

rtrouton avatar rtrouton commented on May 29, 2024

You may want to increase the sleep amount listed in line 367:

sleep 120

Try setting it to:

sleep 240

Your DNS may not be coming online in two minutes. See if increasing it to four minutes fixes the issue.

from rtrouton_scripts.

Tecnico1931 avatar Tecnico1931 commented on May 29, 2024

my issue seem to be coming from:

CheckSiteNetwork function adapted from Facebook's check_corp function script.

check_corp script available on Facebook's IT-CPE Github repo:

check_corp:

This script verifies a system is on the corporate network.

Input: CORP_URL= set this to a hostname on your corp network

Optional ($1) contains a parameter that is used for testing.

Output: Returns a check_corp variable that will return "True" if on

corp network, "False" otherwise.

If a parameter is passed ($1), the check_corp variable will return it

This is useful for testing scripts where you want to force check_corp

to be either "True" or "False"

USAGE:

check_corp # No parameter passed

check_corp "True" # Parameter of "True" is passed and returned

site_network="False"
ping=host -W .5 $jss_server_address

If the ping fails - site_network="False"

[[ $? -eq 0 ]] && site_network="True"

Check if we are using a test

[[ -n "$1" ]] && site_network="$1"

from rtrouton_scripts.

Tecnico1931 avatar Tecnico1931 commented on May 29, 2024

Got it working :-)

from rtrouton_scripts.

rtrouton avatar rtrouton commented on May 29, 2024

Great! Glad to hear it.

from rtrouton_scripts.

Manuel4131 avatar Manuel4131 commented on May 29, 2024

I change the DNS server in /etc/resolv.conf for my Mac. Where can I modify the DNS server in the windows system?

from rtrouton_scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.