Answers.Body: <p>Just to close this loop in case anyone else needs it...</p>
  <p>This turned out to be a certificate issue.</p>
  <p>When using the Azure Database for MySQL single server, the root certificate defined in config/db.php is a combination of 2 certs (in a single file).</p>
  <p>The Azure Database for MySQL flexible server only requires a single certificate (which is neither of the two in the combo cert above).</p>
  <p>This link from Microsoft (specifically the Note section at the very top) outlines that requirment:</p>
  <p><a href="https://learn.microsoft.com/en-us/azure/mysql/single-server/concepts-certificate-rotation" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/mysql/single-server/concepts-certificate-rotation</a></p>
  <p>Robin</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-06-13T02:16:51.560Z
Answers.Text: you are welcome to mark this as "The Answer" as the cooldown period for doing so has gone by. Thanks for coming back to update!
Answers.UserDisplayName: cherrykoda
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-06-06T18:24:46.843Z
Answers.LastActivityDate: 2024-06-06T18:24:46.843Z
Answers.UserDisplayName: RobinH
Body: <p>I'm in a bit of jam here. Our Craft v3 site went down overnight, seeminly for no reason, and is just showing &quot;Service Unavailable - Our site is temporarily unavailable. Please try again later.&quot;.  What's maybe more concerning is when I try to access the admin portal, I get a message &quot;Service Unavailable - Craft isn't installed yet&quot;.
  As far as I'm aware, there were no changes made immediately prior to the site going down.</p>
  <p>Our Craft instance is running as an Azure App service (linux) - has been for a couple of years.</p>
  <p>I've tried restarting the app service (no change) and restoring it to before the site crashed (no change).</p>
  <p>Googling a bit, I see a bit of information around the &quot;service unavailable&quot; errors but, a lot of it seems to be during an install or upgrade.  Our issue, seemingly, happened out of the blue. I've gone through a few logs that I can find but nothing is really jumping out at me.</p>
  <p>I'm very much a Craft novice here.  We used to have a company that managed the site for us but we parted ways some time ago and have just left the site to run.</p>
  <p>Any suggestions or pointers would be much appreciated.</p>
  <p>Thanks,
  Robin</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-06-05T16:36:15.160Z
Comments.Text: The "Craft isn't installed yet" message usually means that your database connection has failed, hopefully that helps a bit!
Comments.UserDisplayName: James Smith
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-06-05T18:08:30.530Z
Comments.Text: Thanks @JamesSmith, I saw some mention of that.  Been searching on how to tell whether that's the case or not.  I saw someone mention that should be in a .env file but, to this point, I haven't found that.  FWIW, looking at some logs, I see the database server name (it's correct).  I'll keep looking.  Thanks for the pointer.
Comments.UserDisplayName: RobinH
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-06-05T20:03:37.403Z
Comments.Text: An update to my issue. The DB server our Craft install is using is an Azure DB for MySQL. Apparently Microsoft migrated that DB from a single to flexible model last night just moments before our site went down. Hardly a coincidence I'd say...  With that change, there's a new Root CA that is being auto applied to any connected app services - which includes my Craft install.  But, the MS docs say that if you're referencing the CA in your code, you'll have to manually update that.  I see a reference in db.config to a RootCA but it's to an enviroment variable. How would I find that variable?
Comments.UserDisplayName: RobinH
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-06-05T21:48:53.853Z
Comments.Text: Another update.  I completed the steps Microsoft outlined for the change they made and I'm still not able to connect to the DB from my app.  
  I can connect to the SQL server using mySQL commands and I can connect to a different DB on the server from a different app.  It's like something is blocking connection from this particular app to the DB.  For the life of me, I can't find what it is.  Is there some way to get logs or more detail around the DB connectivity - I haven't found anything on my own yet?
Comments.UserDisplayName: RobinH
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-06-06T08:03:54.280Z
Comments.Text: If you have the appropriate license this is probably something you should contact Craft support about so they can examine your precise situation. More detailed error messages should be available in your storage/logs directory.
Comments.UserDisplayName: James Smith
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-06-06T13:10:23.133Z
Comments.Text: Thanks James.  We opened a ticket with them late yesterday (after signing up for a monthly support subscription).
Comments.UserDisplayName: RobinH
Tags: <config><error-message><admin>
Title: Craft site shows "service unavailable" - Admin site shows "craft not installed yet"
ThreadText: # Craft site shows "service unavailable" - Admin site shows "craft not installed yet"
  
  (Asked by: username_0 on 2024-06-05)
  
  I'm in a bit of jam here. Our Craft v3 site went down overnight, seeminly for no reason, and is just showing "Service Unavailable - Our site is temporarily unavailable. Please try again later.". What's maybe more concerning is when I try to access the admin portal, I get a message "Service Unavailable - Craft isn't installed yet".
  As far as I'm aware, there were no changes made immediately prior to the site going down.
  
  Our Craft instance is running as an Azure App service (linux) - has been for a couple of years.
  
  I've tried restarting the app service (no change) and restoring it to before the site crashed (no change).
  
  Googling a bit, I see a bit of information around the "service unavailable" errors but, a lot of it seems to be during an install or upgrade. Our issue, seemingly, happened out of the blue. I've gone through a few logs that I can find but nothing is really jumping out at me.
  
  I'm very much a Craft novice here. We used to have a company that managed the site for us but we parted ways some time ago and have just left the site to run.
  
  Any suggestions or pointers would be much appreciated.
  
  Thanks,
  Robin
  
  **Tags:** config, error-message, admin
  
  > **Comments:**
  > **username_1**: The "Craft isn't installed yet" message usually means that your database connection has failed, hopefully that helps a bit!  
  > **username_0**: Thanks @username_1, I saw some mention of that.  Been searching on how to tell whether that's the case or not.  I saw someone mention that should be in a .env file but, to this point, I haven't found that.  FWIW, looking at some logs, I see the database server name (it's correct).  I'll keep looking.  Thanks for the pointer.  
  > **username_0**: An update to my issue. The DB server our Craft install is using is an Azure DB for MySQL. Apparently Microsoft migrated that DB from a single to flexible model last night just moments before our site went down. Hardly a coincidence I'd say...  With that change, there's a new Root CA that is being auto applied to any connected app services - which includes my Craft install.  But, the MS docs say that if you're referencing the CA in your code, you'll have to manually update that.  I see a reference in db.config to a RootCA but it's to an enviroment variable. How would I find that variable?  
  > **username_0**: Another update.  I completed the steps Microsoft outlined for the change they made and I'm still not able to connect to the DB from my app.   I can connect to the SQL server using mySQL commands and I can connect to a different DB on the server from a different app.  It's like something is blocking connection from this particular app to the DB.  For the life of me, I can't find what it is.  Is there some way to get logs or more detail around the DB connectivity - I haven't found anything on my own yet?  
  > **username_1**: If you have the appropriate license this is probably something you should contact Craft support about so they can examine your precise situation. More detailed error messages should be available in your storage/logs directory.  
  > **username_0**: Thanks username_1.  We opened a ticket with them late yesterday (after signing up for a monthly support subscription).  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2024-06-06. Score: 2
  
  Just to close this loop in case anyone else needs it...
  
  This turned out to be a certificate issue.
  
  When using the Azure Database for MySQL single server, the root certificate defined in config/db.php is a combination of 2 certs (in a single file).
  
  The Azure Database for MySQL flexible server only requires a single certificate (which is neither of the two in the combo cert above).
  
  This link from Microsoft (specifically the Note section at the very top) outlines that requirment:
  
  <https://learn.microsoft.com/en-us/azure/mysql/single-server/concepts-certificate-rotation>
  
  Robin
  
  > **Comments:**
  > **username_2**: you are welcome to mark this as "The Answer" as the cooldown period for doing so has gone by. Thanks for coming back to update!  
  
  ---
  
  