Jamf Nation, hosted by Jamf, is the largest Apple IT management community in the world. Dialog with your fellow IT professionals, gain insight about Apple device deployments, share best practices and bounce ideas off each other. Join the conversation.

# On-Prem Jamf Pro Customers Upgrading to 10.7.x or 10.8.x

## Overview

For on-premise Jamf Pro customers upgrading to 10.7.x or 10.8.x, follow the instructions in this article before upgrading. This will help determine whether your environment is affected by the following two known issues with smart computer groups:

• [PI-006260] In Jamf Pro, binary communication fails when using a smart computer group with "Computer Group" criteria that includes a non-existent smart group.
• [PI-006265] In Jamf Pro, smart computer group criteria values for "Computer Group" are case-sensitive, causing membership to calculate incorrectly if the case used in the specified smart group name does not match.

Note: PI-006265 has been fixed in Jamf Pro 10.7.1.

## Procedure

If you are not comfortable performing the instructions in the following procedure, contact Jamf Support for assistance and reference this Knowledge Base article.

### Step 1

Open the command line interface and access the MySQL command line following the instructions for your platform:

Linux
Open the command line interface and access the MySQL command line as "root" by typing:
mysql -u root -p
use <database name>
Example: use jamfsoftware

Windows
Open the MySQL command line client and enter the root password for MySQL:
use <database name>
Example: use jamfsoftware

macOS
Open Terminal and access the MySQL command line as "root" by typing:
mysql -u root -p
use <database name>
Example: use jamfsoftware

If MySQL is not in the path or it is installed in a custom location, access the MySQL command line by updating the path or by typing:
/path/to/mysql -u root -p

Note: The default path for MySQL is /usr/local/mysql/bin/.

### Step 2

Run the following two select statements:

select computer_group_id,criteria,criteria_display from smart_computer_group_criteria where criteria not in (select computer_group_name from computer_groups) and search_field="Computer Group";
select computer_group_id,criteria,criteria_display from smart_computer_group_criteria where binary criteria not in (select binary computer_group_name from computer_groups) and search_field="Computer Group";

### Step 3

If either statement returns data, contact Jamf Support and reference this Knowledge Base article.

If the queries return an empty set, proceed with the upgrade to Jamf Pro 10.7.x or 10.8.x.

Order by:
SOLVED Posted: by corrymc

When I run the command it says ERROR 1046 (3D000): No database selected.

I think something was left out of the steps?

SOLVED Posted: by dan-snelson

Thanks for the well-written, straight-forward heads-up.

SOLVED Posted: by dan-snelson

@corrymc Looks like use <database name>; isn't included in the macOS instructions.

SOLVED Posted: by anamosa

Same message: ERROR 1046 (3D000): No database selected.

SOLVED Posted: by afarnsworth

Don't forget the ; at the end of the each command

SOLVED Posted: by dgreening

Yeah, you need to issue a

use jamfsoftware;

command first. The second command caught two nested groups which had incorrectly capitalized names, and I fixed them. Both return blank now. The "computer_group_id" in the command return references the Smart Group ID of the ones that have offendingly capitalized names for nested groups. Change the capitalization so it matches up and its gravy.

SOLVED Posted: by PCalomeni

SOLVED Posted: by whaking2k

Just checking to make sure this is correct.

mysql> use jamfsoftware
Database changed
mysql> select computer_group_id,criteria,criteria_display from smart_computer_gr
oup_criteria where criteria not in (select computer_group_name from computer_gro
ups) and search_field="Computer Group";
Empty set (0.00 sec)

mysql>

SOLVED Posted: by rigualj

That's correct @whaking2k

SOLVED Posted: by tguyers360

thanks for this info Jamf, I only had 1 error so used the classic API GET /computergroups/id/{id} to find the group id then corrected the info in my jss smart group

SOLVED Posted: by jlister

Just to confirm, this is specific to "Computer Groups" and not to "Device Groups" (iOS devices)?

SOLVED Posted: by echave

I was having a lot of issues just launching MySql from the Mac Terminal. Then a few specific SQL errors, such as:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Ignoring that, I forced it to connect to the local host and ignore the socket error. Then I was able to run the SQL commands.

So success with:
>mysql -u root -h 127.0.0.1
>use jamfsoftware
both SQL commands individually.

SOLVED Posted: by ajfunk

My MySQL Command Line Client (Windows) closes after I enter the password...

SOLVED Posted: by mike.paul

@ajfunk , The behavior your talking about on Windows happens if you enter the incorrect password for root.

If you are unable to find the password for root and want to run this query currently you can log into mysql using Command Prompt by typing the full path to mysql (or dragging and dropping my mysql binary into the prompt) and logging in with the account you created for Jamf to connect with as is specified in the C:\path\to\JSS\Tomcat\webapps\ROOT\WEB-INF\xml\DataBase.xml.

The command you would run to log in with that account would be something similar to following:

"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe" -u jamfsoftware -p

Then you would use the same steps as above to specify the database you want to use and then run the query given above.

SOLVED Posted: by mike.paul

@echave, the behavior your talking about is a known issue of running MySQL on macOS. You can typically temporarily resolve that error when connecting by restarting the MySQL service and then attempting to connect quickly once the service starts.

SOLVED Posted: by ajfunk

@mike.paul - tried that already, didn't work.

SOLVED Posted: by mike.paul

@ajfunk I am sorry to hear that didnt work. The behavior of the windows mysql CLI closing automatically after password entering is typically due to providing an incorrect password. Regardless, if MySQL is running you should be able to log into mysql using your jamf granted accounts since they have access to run the queries on the database, otherwise previous versions of Jamf wouldnt have been working. If these solutions do not resolve it for you unfortunately you would likely have to open a case with support. if you are able to resolve you're issue yourself if you could share your resolution so others possibly impacted the same can benefit from that as well. Thanks

SOLVED Posted: by Malcolm

To fix the flagged smart groups search an smart group and then in the address bar change the refrence number to the group of which is flagged, and browse to that group open the criteria, and amend the referencing computer group name to the case sensitive version it was referencing, and save it until each one is address.

then re run the above to ensure all errors are gone.

SOLVED Posted: by jwrn3

We use the same method as Malcolm to fix most of the problematic groups .

We additionally had some references to groups that no longer exist. The fix for this was to temporarily create the smart groups again (the smart criteria didn't matter, only the name had to match) and the SQL queries then returned no results. We have a support call open with Jamf as to why there were references to deleted groups still in the database.

SOLVED Posted: by ajfunk

@mike.paul - goober mistake on my part. wrong password, indeed. i got signed in and was able to run those statements, with empty sets returned. updating the server was successful, and post-upgrade testing passed. thank you for your help.

SOLVED Posted: by LeidenUniv

is this solved or only partly solved in 10.7.1?

SOLVED Posted: by MandyDroid

I just ran this prior to 10.7.1. I woudl assume that this relates to all upgrade from pre 10.7.x versions.

Thanks for the article!

• correction the article states "Note: PI-006265 has been fixed in Jamf Pro 10.7.1."
SOLVED Posted: by LeidenUniv

just heard from Jamf that you still have to run the commands when you upgrade from < 10.7 to 10.7.1

SOLVED Posted: by rob.distefano

Hey Jamf Nation,

We've recently discovered that PI-006260 may affect environments who have leveraged AutoPkgr and JSSImporter with the default recipes for their packaging workflow.

The SmartGroupTemplate.xml file tells JSSImporter to create or update a smart group called [SoftwareName]-update-smart. The criteria of this group are: - the computer has the software in question installed - the version does not match the newest version that AutoPkg found - the computer is a member of a group called "Testing" (which is created and maintained manually by the Jamf admin)

That last part is key.

The first step of the AutoPkgr workflow asks the user to

Create a static computer group on your JSS called Testing.

If we skip this step, the result is our Smart Groups created by the JSSImporter reference a Static Group “Testing” which does not exist; ultimately resulting in the symptoms described in PI-006260.

Fortunately we have valid workarounds available, but prevention is ultimately a better result altogether.

If you are unsure whether you may be affected by this, or have any other questions related to the upgrade process, do not hesitate to contact Jamf Support.

Thanks!

Rob Distefano
Jamf Customer Experience

SOLVED Posted: by anamosa

Connection id: 2280
Current database: NONE

Database changed
mysql> select computer_group_id,criteria,criteria_display from smart_computer_group_criteria where criteria not in (select computer_group_name from computer_groups) and search_field="Computer Group";
-----------------------------------------------
| computer_group_id | criteria | criteria_display |
-----------------------------------------------
| 146 | Testing | Testing |
| 143 | Testing | Testing |
-----------------------------------------------
2 rows in set (0.00 sec)

mysql> select computer_group_id,criteria,criteria_display from smart_computer_group_criteria where binary criteria not in (select binary computer_group_name from computer_groups) and search_field="Computer Group";
-----------------------------------------------
| computer_group_id | criteria | criteria_display |
-----------------------------------------------
| 146 | Testing | Testing |
| 143 | Testing | Testing |
-----------------------------------------------
2 rows in set (0.03 sec)

SOLVED Posted: by PhilS

Instructions for discovering what the actual database name is would be useful! (I presume the default value is "jamfsoftware" per the examples, but I'm going to be doing an upgrade for the first time (10.4.1 to 10.8.0) and I'd rather not have to guess...

SOLVED Posted: by its-rgu

I'm not too familiar with MySQL so it took me a while to get this right.
We are upgrading from 10.4 to 10.8.
If anyone wants a full run through on a windows server, these are the commands I used and it worked for me:

"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe" -u jamfdatabasename -p

use jamfdatabasename

select computer_group_id,criteria,criteria_display from smart_computer_group_criteria where criteria not in (select computer_group_name from computer_groups) and search_field="Computer Group";
Empty set (0.02 sec)

select computer_group_id,criteria,criteria_display from smart_computer_group_criteria where binary criteria not in (select binary computer_group_name from computer_groups) and search_field="Computer Group";
Emptyset (0.02 sec)

SOLVED Posted: by PhilS

Thanks its-rgu! My instance is on Ubuntu, but this gives me a good clue.

SOLVED Posted: by evaldes

Awesome.. I am re-assured that I can upgrade to 10.8. Thanks!