Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Issues with JSSConnection #44

Closed
TaylorArmstrongB1 opened this issue Jan 13, 2020 · 11 comments
Closed

Issues with JSSConnection #44

TaylorArmstrongB1 opened this issue Jan 13, 2020 · 11 comments

Comments

@TaylorArmstrongB1
Copy link

New install. Testing both Sprice 2.0.1 and 3.0.0.b1.

JSSImporter 1.05 configured through AutoPKGR, appears to be working as expected.

When running Spruce, recieving the following errors:

Spruce 2.0.1:

Spruce-2.0.1 % ./spruce.py Traceback (most recent call last): File "./spruce.py", line 1955, in <module> main() File "./spruce.py", line 1942, in main JSSConnection.setup(connection) File "./spruce.py", line 207, in setup cls._jss = jss.JSS(**cls._jss_prefs) File "/Library/Python/2.7/site-packages/python_jss-1.5.0-py2.7.egg/jss/jamf_software_server.py", line 144, in __init__ self.distribution_points = distribution_points.DistributionPoints(self) File "/Library/Python/2.7/site-packages/python_jss-1.5.0-py2.7.egg/jss/distribution_points.py", line 89, in __init__ dpt = self._get_auto_configured_dp(repo) File "/Library/Python/2.7/site-packages/python_jss-1.5.0-py2.7.egg/jss/distribution_points.py", line 140, in _get_auto_configured_dp jss=self.jss) File "/Library/Python/2.7/site-packages/python_jss-1.5.0-py2.7.egg/jss/distribution_point.py", line 563, in __init__ self.is_mounted() File "/Library/Python/2.7/site-packages/python_jss-1.5.0-py2.7.egg/jss/distribution_point.py", line 301, in is_mounted valid_mount_strings = self._get_valid_mount_strings() File "/Library/Python/2.7/site-packages/python_jss-1.5.0-py2.7.egg/jss/distribution_point.py", line 379, in _get_valid_mount_strings ip_address = socket.gethostbyname(url) socket.gaierror: [Errno 8] nodename nor servname provided, or not known

Similar error with Spruce 3.0:

Spruce-3.0.0b1 % ./spruce.py JSS: <Jamf-hosted JSS URL> Preferences used: ~/Library/Preferences/com.github.autopkg.plist Traceback (most recent call last): File "./spruce.py", line 2054, in <module> main() File "./spruce.py", line 2041, in main connect(args) File "./spruce.py", line 2024, in connect JSSConnection.setup(connection) File "./spruce.py", line 210, in setup cls._jss = jss.JSS(**cls._jss_prefs) File "/Library/Application Support/JSSImporter/jss/jamf_software_server.py", line 203, in __init__ self.distribution_points = DistributionPoints(self) File "/Library/Application Support/JSSImporter/jss/distribution_points.py", line 89, in __init__ dpt = self._get_auto_configured_dp(repo) File "/Library/Application Support/JSSImporter/jss/distribution_points.py", line 152, in _get_auto_configured_dp jss=self.jss) File "/Library/Application Support/JSSImporter/jss/distribution_point.py", line 528, in __init__ self.is_mounted() File "/Library/Application Support/JSSImporter/jss/distribution_point.py", line 289, in is_mounted valid_mount_strings = self._get_valid_mount_strings() File "/Library/Application Support/JSSImporter/jss/distribution_point.py", line 367, in _get_valid_mount_strings ip_address = socket.gethostbyname(url) socket.gaierror: [Errno 8] nodename nor servname provided, or not known

Using a service account with full read permissions.

@grahampugh
Copy link
Member

Can you provide sanitised output of defaults read ~/Library/Preferences/com.github.autopkg.plist?

@TaylorArmstrongB1
Copy link
Author

TaylorArmstrongB1 commented Jan 13, 2020 via email

@TaylorArmstrongB1
Copy link
Author

TaylorArmstrongB1 commented Jan 13, 2020 via email

@grahampugh
Copy link
Member

I’d rather see the preferences with the repos still in, since that was the part seemingly causing the error.

@TaylorArmstrongB1
Copy link
Author

TaylorArmstrongB1 commented Jan 13, 2020 via email

@grahampugh
Copy link
Member

Can I clarify that you are using Jamf Cloud but a local SMB distribution point? This stuff might be irrelevant, as I guess the repo info should not be used by Spruce, but since it’s all tied up in python-jss, it might be.

@TaylorArmstrongB1
Copy link
Author

TaylorArmstrongB1 commented Jan 14, 2020 via email

@aarondavidpolley
Copy link

aarondavidpolley commented Feb 6, 2020

FWIW I was seeing this until I pulled out a distro point from ~/Library/Preferences/com.github.autopkg.plist that belongs to a different Jamf Pro server (UAT vs PROD in a particular environment). Leaving the 2 PROD ones in while connecting to PROD was fine.

aaron.polley@CN-C02V918LHTDD Spruce-3.0.0b1 % ./spruce.py -c    
WARNING: Executing a script that is loading libcrypto in an unsafe way. This will fail in a future version of macOS. Set the LIBRESSL_REDIRECT_STUB_ABORT=1 in the environment to force this into an error.
JSS: https://jss.myjss.com:8443
Preferences used: ~/Library/Preferences/com.github.autopkg.plist
Traceback (most recent call last):
  File "./spruce.py", line 2054, in <module>
    main()
  File "./spruce.py", line 2041, in main
    connect(args)
  File "./spruce.py", line 2024, in connect
    JSSConnection.setup(connection)
  File "./spruce.py", line 210, in setup
    cls._jss = jss.JSS(**cls._jss_prefs)
  File "/Library/Application Support/JSSImporter/jss/jamf_software_server.py", line 203, in __init__
    self.distribution_points = DistributionPoints(self)
  File "/Library/Application Support/JSSImporter/jss/distribution_points.py", line 89, in __init__
    dpt = self._get_auto_configured_dp(repo)
  File "/Library/Application Support/JSSImporter/jss/distribution_points.py", line 157, in _get_auto_configured_dp
    repo["name"]))
ValueError: Error auto-configuring distribution point 'distro.myjss.com'!

@aarondavidpolley
Copy link

Nevermind, looks like I have other problems. I'll make sure I'm on the latest AutoPkg/JSSImporter/python JSS and then circle back


aaron.polley@CN-C02V918LHTDD ~ % spruce3.py   
WARNING: Executing a script that is loading libcrypto in an unsafe way. This will fail in a future version of macOS. Set the LIBRESSL_REDIRECT_STUB_ABORT=1 in the environment to force this into an error.
JSS: https://jss.myjss.com:8443
Preferences used: ~/Library/Preferences/com.github.autopkg.plist
🌲  Building: Computer Groups Report... 🌲
🌲  Building: Computer Configuration Profile Report... 🌲
🌲  Building: Mobile Device Configuration Profile Report... 🌲
🌲  Building: Mobile Device Group Report... 🌲
🌲  Building: Computer Report... 🌲
🌲  Building: Mobile Apps... 🌲
Traceback (most recent call last):
  File "/usr/local/bin/spruce3.py", line 2054, in <module>
    main()
  File "/usr/local/bin/spruce3.py", line 2050, in main
    run_reports(args)
  File "/usr/local/bin/spruce3.py", line 1829, in run_reports
    results.append(func(**args_dict))
  File "/usr/local/bin/spruce3.py", line 1201, in build_apps_report
    session = requests.session()
NameError: global name 'requests' is not defined

@aarondavidpolley
Copy link

ok... with everything updated I have produced a report, but all of the emojis are In the format of:

N{evergreen tree}  Computer Report \N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree}\N{evergreen tree} 

@grahampugh
Copy link
Member

The emoji problem should be fixed in 3.0.0b3.
Also the length of the histograms were far too long, I don't think the calculations of columns took into account that emoji are far wider than normal characters. So, I divided the length of all bars by 3 which seems to make the bars fit better.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants