none
Elastic Job Agent exists but not showing in Azure Portal RRS feed

  • Question

  • I created an Elastic Job Agent but it is nowhere to be seen in Azure Portal.  I now can't add an Agent due to JobAgentDatabaseAlreadyLinked error. I've tried FireFox, Chrome and Edge (including InPrivate) and it's nowhere to be seen.

    I was looking at https://docs.microsoft.com/en-us/azure/sql-database/elastic-jobs-overview  … and had completed step 2 - creating the Elastic Job Agent in the Portal.

    I continued with the Elastic Job setup and everything works fine! The Elastic Job ran on schedule and completed successfully.  It's just that I can only see the results through SQL on the Jobs database - not through the Azure Portal...!

    Regards,

    John M

    Thursday, January 3, 2019 3:28 PM

All replies

  • I created an Elastic Job Agent but it is nowhere to be seen in Azure Portal.  I now can't add an Agent due to JobAgentDatabaseAlreadyLinked error. I've tried FireFox, Chrome and Edge (including InPrivate) and it's nowhere to be seen.

    I was looking at https://docs.microsoft.com/en-us/azure/sql-database/elastic-jobs-overview  … and had completed step 2 - creating the Elastic Job Agent in the Portal.

    I continued with the Elastic Job setup and everything works fine! The Elastic Job ran on schedule and completed successfully.  It's just that I can only see the results through SQL on the Jobs database - not through the Azure Portal...!

    Regards,

    John M

    Good day John and happy new year

    Can you please explain which result you expect to see in the portal?
    And if you can, then please add the screenshot of what you get instead

    Once the job is running it execute the queries which are in the job's steps has in the script. What you should see in the portal is only the status (log) of the execution. It should be like bellow image

    This is the exact same information which you can get by executing the bellow query:

    select * from jobs.job_executions

     

    If you don't see the status of the executions, then please try to execute the query and check if you can get the log info


    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]


    Thursday, January 3, 2019 7:51 PM
    Moderator
  • Hello,

    I can reproduce the issue, once an elastic job agent is created it does not show on the portal.


    This feature is in preview at this time. I will notify Mike Ubezzi or maybe he will read this thread before and he will notify the Azure SQL Database team about this issue.


    Hope this helps.


    Regards,

    Alberto Morillo
    SQLCoffee.com

    Thursday, January 3, 2019 9:14 PM
  • Hi Alberto,

    Please elaborate how you reproduce the issue

    As you can see in the image above, I can see the agent in the portal. Do you create it using PowerShell for example?


    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]


    Thursday, January 3, 2019 10:07 PM
    Moderator
  • Hi Ronen, Thanks for your reply.

    I created the Elastic Job Agent in the Portal.  Once created, it cannot be seen in the Portal - i.e. I can Filter for Resource Types Elastic Job Agent but there are No Results.  HOwever, the Jobs setup works fine and completes normally so i get results from the select * from jobs.job_executions query.

    Looking at the PowerShell instructions, I can see a step to enable the elastic jobs preview.  However, this will not have been done following the Portal instructions. See https://docs.microsoft.com/en-us/azure/sql-database/elastic-jobs-powershell#enable-the-elastic-jobs-preview-for-your-subscription

    Can the feature be enabled through the Portal?

    Friday, January 4, 2019 10:01 AM
  • Hi Ronen, Thanks for your reply.

    I created the Elastic Job Agent in the Portal.  Once created, it cannot be seen in the Portal - i.e. I can Filter for Resource Types Elastic Job Agent but there are No Results.  HOwever, the Jobs setup works fine and completes normally so i get results from the select * from jobs.job_executions query.

    Looking at the PowerShell instructions, I can see a step to enable the elastic jobs preview.  However, this will not have been done following the Portal instructions. See https://docs.microsoft.com/en-us/azure/sql-database/elastic-jobs-powershell#enable-the-elastic-jobs-preview-for-your-subscription

    Can the feature be enabled through the Portal?

    Hi,

    >> I created the Elastic Job Agent in the Portal.  Once created, it cannot be seen in the Portal

    Very strange...
    I lectured about Elastic Jobs in the last year and more on any step and any new version in including the current version, and I never had this issue.

    to clarify, you said that you created it using the portal. Is this mean that you used the "add" option in the this blade (if not then this is the way to go):
    https://portal.azure.com/#blade/HubsExtension/Resources/resourceType/Microsoft.Sql%2Fservers%2FjobAgents

    And this is where you should see it after you create the job

    >> Looking at the PowerShell instructions, I can see a step to enable the elastic jobs preview.  However, this will not have been done following the Portal instructions.

    Using the portal you should explicitly see that this is a preview and you must approve it before you can use it.

    My guess is that you are searching the job in the wrong place - for example you check the old version of Elastic Jobs which is not supported for new jobs but exists for these who created jobs in the old version. This is common mistake :-)

    The simply way to use Elastic Jobs in the portal is to use the search-box. Even in the search you should clearly see the "preview"

    >> Can the feature be enabled through the Portal?

    I am not sure what you mean by enabled the feature. The "Elastic Job agents" can be created in the Portal and this is my preferred option. While creating the Elastic Job agents in the portal you will need to confirm that you accept the preview terms.

    Next everything can be done with simple queries, which is my preferred option as this is a tool for DBAs and not for PowerShell developers. Transact SQL fully supports Elastic Jobs.

    >> so i get results from the select * from jobs.job_executions query

    The result of this query in the portal is under the Job Agent, as these are the executions made by the Agent. The Job is simply a definition of steps and queries (entities). It does not do anything by itself. The Agent is what executes the Jobs and we manage/monitor the Agent and not the jobs. It's just like on-premises SQL Server Jobs in this sense. You monitor the executions and not the job elements, and these are made by SQL Server Agent.

    Don't confuse the "Elastic Job agent" with the "Elastic Job". These are different components

    Please add the screenshot of what you see when you go to the "Elastic Job agents". Again, the portal does not support fully managing the jobs, steps and all the components yet. You should create the "Elastic Job agents" in the portal and manage all the rest using PowerShell or Transact-SQL queries (my recommendation)


    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]

    Friday, January 4, 2019 10:57 AM
    Moderator
  • 

    Hi Ronen, Thanks again.  I agree it is strange.  But I'm starting to believe that systems know it is me and start doing strange things just to wreck my head!

    I created the Elastic Job Agent through the Portal using the Add button as you referenced.  And I remember accepting the Preview Terms. I've included a screenshot below showing No Results when I filter by Elastic Job Agent.

    Does accepting the Preview Terms on the Add Elastic Job Agent dialog in the Portal equate to enabling the Elastic Job Agent Feature in Powershell? (See Register-AzureRmProviderFeature -FeatureName sqldb-JobAccounts -ProviderNamespace Microsoft.Sql from https://docs.microsoft.com/en-us/azure/sql-database/elastic-jobs-powershell#enable-the-elastic-jobs-preview-for-your-subscription)

    Friday, January 4, 2019 11:15 AM
  • Hi,

    Check your filter condition.

    You filter 7 subscriptions out of 8 and you probably miss the one with the Elastic Job Agent

    Make sure that you select all in all filters 


    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]

    Friday, January 4, 2019 1:02 PM
    Moderator
  • Ah Dang!  Sorry... my bad!  I normally exclude a Free Trial subscription that is obsolete now.

    It's definitely not there...!

    Friday, January 4, 2019 2:57 PM
  • Hello,

    @Ronen My Azure portal is showing the screen exactly as John has posted his screen on his last reply. I used the portal to create the agent and followed instructions of the documentation (URL) provided by John.


    Hope this helps.


    Regards,

    Alberto Morillo
    SQLCoffee.com



    Friday, January 4, 2019 3:10 PM
  • Hi AlbertoJohn

    I recorded a fast test show that everything works well for me, as expected.

    John, let me speak to Alberto on skype. Since I know Alberto we can share desktop and see what is the issue, assuming he have the time. Once we will find it, we can come back with an answer or if needed we can contact the team directly and report a bug.

    https://youtu.be/CQTKoAS5pOg

    Alberto, can you please contact me on Skype if this fit you. I want to see exactly what you do live and maybe we can understand the issue (it might be simple like refreshing the Portal dashboard or a real bug). 


    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]




    Saturday, January 5, 2019 10:39 AM
    Moderator
  • Good day John,

    I had a long meeting with Alberto yesterday and the bottom line is that everything works as expected. Once we followed step by step he could see the Agents as expected.

    As much as I understand (or maybe better say guess) the issue can be related to a cache which led you to use the old version or by using the old version explicitly by mistake, it can be related to a case where you simply created the Agent in one place (which is why it worked) but you looked in another place which is why you did not find it (for example using different account or subscription), or you created a different service with a name almost similar to the one we need to use.

    Let's try to make it work for you as well :-)

    In order to make sure that we do not use any old version we will create everything from scratch starting with a new Resource Group. Jobs can run against databases in different subscriptions, servers, and resource groups, which mean you can use a new resource group to manage the Agent as we will do here. Follow this step by step please:

    1. Create new resource group
    2. inside the resource group create new virtual server - make sure the server is in the new resource1
    3. Inside the virtual server create new empty database size S0
    4. use the search-box and write: Elastic
    5. Under "SERVICES" find the service named "Elastic Job Agents (preview)"
      IMPORTANT! there might be other services name Elastic Job Agent, do not select one of these! name sure you select the preview service
    6. In the "Elastic Job agents" blade click "add" and create new Agent
    7. Once the Agent is ready you should see it in the Portal - make sure to refresh the list

    Please inform us if this work

    * the important point here is to start from scratch, at least first time until you get the procedure and everything works as expected


    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]


    Sunday, January 6, 2019 10:15 PM
    Moderator
  • Hi Ronen, Thanks for looking into this...

    So, ok - i followed your steps and the Elastic Jobs Agent is showing up correctly!  The only difference I can think of is that the Preview Terms were already accepted...

    Now, I can see, from the Activity Log, that I created [PSC PM Update] on Dec 21 in the Resource Group pscinsight (this is not visible in the portal).  I then tried to create [PSC-PM] (twice) on Jan 02 but this failed.  The create of JMTestJobAgent in Resource Group JMTest succeeded today.  And then an attempt to create PSCJobsAgent in pscinsight failed today.

    It looks like the best thing to do is delete everything and start again?


    Monday, January 7, 2019 11:01 AM
  • Hi Ronen, Thanks for looking into this...

    So, ok - i followed your steps and the Elastic Jobs Agent is showing up correctly!  The only difference I can think of is that the Preview Terms were already accepted...

    Now, I can see, from the Activity Log, that I created [PSC PM Update] on Dec 21 in the Resource Group pscinsight (this is not visible in the portal).  I then tried to create [PSC-PM] (twice) on Jan 02 but this failed.  The create of JMTestJobAgent in Resource Group JMTest succeeded today.  And then an attempt to create PSCJobsAgent in pscinsight failed today.

    It looks like the best thing to do is delete everything and start again?

    Hi :-)

    >> So, ok - i followed your steps and the Elastic Jobs Agent is showing up correctly!

    I am glad to hear :-)

    >> It looks like the best thing to do is delete everything and start again?

    Yes, this is your best option

    It will make sure you are using the new version on "a clean page"

    * This is the disadvantage of using preview product... You might find out that the product was changed in from time to time you must clean all and start from scratch using the new version.

    Note! My recommendation at this point of the time is to create the Agent Using the Portal, and manage the other elements using Transact-SQL

    :-)


    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]



    Monday, January 7, 2019 1:52 PM
    Moderator
  • Very frustrated now...  I can't delete the old setup! 

    If I try to delete the Jobs database, I get an error that it is used by a job account PSC PM Update.


    I don't know what a job account is and can't find one in Azure.

    Through PowerShell (which i know very little about), i can find that there is a Job Agent called PSC PM Update.  but if i try to remove it , it throws an error saying it's not there!

    My problem now is that i have an agent that is running every day that i can't get rid of...

    Any idea how i should progress?

      
    Wednesday, January 16, 2019 6:06 PM
  • Hi John,

    This is totally different topic and it is highly recommended to keep each thread focused on specific topic/issue. Always open thread -> close it -> open anew one if there is another issue and if it might be related so you can add link to previous thread :-)

    Since this issue need to examine your specific account I think it can be good idea to open internal support ticket in this case:
    https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/overview



    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]

    Thursday, January 17, 2019 1:19 PM
    Moderator
  • I can reproduce the issue and for sure it is bug.

    Cheers,

    Shashank

    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

    My TechNet Wiki Articles

    MVP

    Friday, June 7, 2019 6:12 PM
  • Hi Shanky

    If you are talking about the original issue "once an elastic job agent is created it does not show on the portal" then I worked with Alberto on this by sharing his screen and as I mentioned above the issue was related to the using the old version of elastic job which is different from the new one and does not exists in the same list

    At least this what Alberto had at that time, and after he followed the instructions I gave above step by step then it worked for him well.

    If you are talking about the issue with " can't delete the old setup" then this was not related to my answer. In this case I recommended to open a ticket in the portal

    In any case (both cases) if you say that you can reproduce a bug then it will be useful if you can post the exact steps😃

    note: This is pretty old thread ans I am not sure that what we have today is relevant to what was 6 months ago. The Elastic Job was changed so much in this time that even if a behaviour seems the same it might be not relevant to the reasons 6 months ago


    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]


    Sunday, June 9, 2019 1:38 AM
    Moderator
  • My issue is not related to deletion, its related to Elastic Job agent. The steps are simple

    1. Create sql database with S1 size or above

    2 create Elastic Job agent from create resource.

    3. Leave it for a day and next day you might not find it. Anyways I will log a call with MS support to see this I am sure this is not a mistake from my side but a bug

    PS: I did saw what you told to Alberto but that is not applicable to me


    Cheers,

    Shashank

    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

    My TechNet Wiki Articles

    MVP


    Sunday, June 9, 2019 4:07 AM
  • I am facing the original issue. I created an Elastic Job Agent using the portal and I cannot see it now. 

    Monday, August 19, 2019 9:06 AM
  • Hi Mir,

    Sorry to hear that this can still cause problems...! I don't know if you have the same issue.  In my case, I had to open a support call so that the Elastic Job Agent artifacts could be seen in the portal and I could delete them!

    Deleting everything and starting again seemed to be the most appropriate approach.

    Regards,

    JohnM

    Monday, August 19, 2019 11:27 AM
  • Hi John,

    Did you find a solution for the job agent being stuck?  I have a similar scenario and am unable to remove/delete the database I created as SQL Azure believes the job is still linked to it?

    Thanks

    Keegan

    Tuesday, September 10, 2019 4:45 AM
  • Hello All,

    I too am experiencing this exact set off issues. Created an Elastic Job Agent via the Azure Portal, agreed to the terms and it was successfully deployed but it would not show up on the Elastic Job agents 'page'. However, if I clicked on the link Notifications Ribbon that provided the direct link, I could get to the page that showed the elastic job details (executions etc). I even copied it to the dashboard. However, when I would click on my dashboard 'link' it would say that this resource is unavailable. Unfortunately the Notification tab seems to clear out messages after a bit of time and I didn't save the direct URL to the Elastic Job Agent details page. Now I am trying to delete everything related to it and the database is still saying it is being used by that job account.

    Thanks,

    Eric

    Thursday, September 12, 2019 10:18 PM
  • After contacting MS Support for this issue, it appears to be a setting for the resource group as the MS rep replied with the fact that they "performed a change on our side to update the resources listed in the Azure Portal".

    Tuesday, September 17, 2019 6:24 PM