jamf / NetSUS

NetBoot and Software Update Server
https://jamfnation.jamfsoftware.com/viewProduct.html?id=180
304 stars 69 forks source link

Unable to read NBImageInfo.plist. Edit the Image to correct this issue #127

Closed pickworth closed 5 years ago

pickworth commented 5 years ago

Having an issue in the latest NetSUS release, image created from latest Mojave Installer using AutoDMG then Imagr. I also tried making the image with DeployStudio which didn't work either.

System Info:

Inside the NBI:

user@host:/srv/NetBoot/NetBootSP0/10.14.3AutoImagrNBI.nbi$ file NBImageInfo.plist
NBImageInfo.plist: XML 1.0 document, ASCII text

user@host:/srv/NetBoot/NetBootSP0/10.14.3AutoImagrNBI.nbi$ ll
total 11764804
drwxrwxrwx 3 smbuser users        4096 Feb 17 07:39 ./
drwxr-xr-x 3 smbuser root         4096 Feb 17 07:48 ../
-rwxrwxrwx 1 smbuser users        2059 Feb 17 07:39 NBImageInfo.plist*
-rwxrwxrwx 1 smbuser users 12047138816 Feb 17 07:39 NetBoot.dmg*
drwxrwxrwx 4 smbuser users        4096 Feb 17 07:39 i386/

Stuck on message "Unable to read NBImageInfo.plist. Edit the Image to correct this issue" however, editing the image via webUI does not seem to do anything at all. The file exists with appropriate permissions

image

Editing the image as suggested, seems to have no effect (Still stuck saying the same error):

image

Not sure what else to try.

Please let me know if there is any other info required or troubleshooting steps that I can take.

Thanks

pickworth commented 5 years ago

Oh, just to clarify, when I click the image edit button in the UI, initially all of those fields are empty. I Typed in manually "mojave" as the name and "1" as the Image Index. Clicking save closes the dialog with no effect. Reopening the edit dialog will go back to blank values again.

Upon Opening the image edit dialog, The following errors appear in the JS console: image

setting a breakpoint, it seems to be trying to parse the following text as JSON (which obviously wont work) that was returned from the /webadmin/netbootCtl.php script.

File "/var/appliance/nbi_settings.py", line 49
    print dumps(plistObj)
              ^
SyntaxError: invalid syntax
pickworth commented 5 years ago

installation.log Ignore the Apache listen error

duncan-mccracken commented 5 years ago

Please note, when you did the installation, you would have been notified that Ubuntu 18.04 Support is currently experimental... (ref: line #7 of the install log) This looks like it relates to the default python version (python3) which is installed in Ubuntu 18. Most likely you'll be having issues with SUS, too. With some rudimentary testing on Ubuntu 18.0.4.1 the issue is not present, but it seems the default python version on Ubuntu 18.04.2 has gone to python3.

Can you try explicitly installing python2 on the base OS and see if that resolves the issue, if so the installer can be updated to include that step.

Duncan

pickworth commented 5 years ago

trying now for you

pickworth commented 5 years ago
user@host:/var/appliance# python --version
Python 3.6.7
user@host:/var/appliance# sudo apt install python-minimal
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-minimal is already the newest version (2.7.15~rc1-1).
python-minimal set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
user@host:/var/appliance# python --version
Python 3.6.7
user@host:/var/appliance# ls /usr/bin/python*
/usr/bin/python            /usr/bin/python3.6-config   /usr/bin/python3-jsonpointer
/usr/bin/python2           /usr/bin/python3.6m         /usr/bin/python3-jsonschema
/usr/bin/python2.7         /usr/bin/python3.6m-config  /usr/bin/python3m
/usr/bin/python2.7-config  /usr/bin/python3-config     /usr/bin/python3m-config
/usr/bin/python2-config    /usr/bin/python3-futurize   /usr/bin/python3-pasteurize
/usr/bin/python3           /usr/bin/python3-jsondiff   /usr/bin/python3-pbr
/usr/bin/python3.6         /usr/bin/python3-jsonpatch  /usr/bin/python-config
user@host:/var/appliance# update-alternatives --list python
/usr/bin/python3.6
user@host:/var/appliance# update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
user@host:/var/appliance#  update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2
user@host:/var/appliance# update-alternatives --config python
There are 2 choices for the alternative python (providing /usr/bin/python).

  Selection    Path                Priority   Status
------------------------------------------------------------
  0            /usr/bin/python3.6   2         auto mode
  1            /usr/bin/python2.7   1         manual mode
* 2            /usr/bin/python3.6   2         manual mode

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in manual mode
user@host:/var/appliance# python --version
Python 2.7.15rc1
pickworth commented 5 years ago

seems to still work, rolling back my changes works too

pickworth commented 5 years ago

This is a relatively clean install of ubuntu 18.04 server edition (no snaps) with the following added:

  116  apt update && apt install nginx
  529  apt update
  530  apt upgrade
  531  sudo apt-get update
  532  sudo apt-get install software-properties-common
  533  sudo add-apt-repository universe
  534  sudo add-apt-repository ppa:certbot/certbot
  535  sudo certbot --nginx
  536  certbot
  537  sudo apt-get install certbot python-certbot-nginx
  602  sudo apt install certbot-dns-google
  604  sudo apt install python-pip
  605  pip install certbot-dns-google
  616  apt install python3-pip
  617  pip3 install certbot-dns-google
  697  apt install git-credential-store
  880  sudo apt install python-minimal

I just realised that installing certbot required python3, so I had to install that manually. Seems like I already had python2 installed at the time, so I think you are actually right about ubuntu coming with python2 by default, in my case anyway.