[{"data":1,"prerenderedAt":786},["ShallowReactive",2],{"page-\u002Fblog\u002Fservicenow-mid-server-installation-configuration-troubleshooting\u002F":3,"related-\u002Fblog\u002Fservicenow-mid-server-installation-configuration-troubleshooting\u002F":767},{"id":4,"title":5,"author":6,"authorUrl":7,"body":8,"date":738,"dateUpdated":738,"description":739,"dqid":740,"excerpt":741,"extension":742,"faq":743,"headline":5,"meta":756,"navigation":543,"path":757,"seo":758,"socialImage":759,"stem":760,"tags":761,"__hash__":766},"content\u002Fblog\u002Fservicenow-mid-server-installation-configuration-troubleshooting.md","ServiceNow MID Server: Installation, Configuration, and Troubleshooting","Gabriel Fordan","https:\u002F\u002Fsn-tricks.com\u002Fabout",{"type":9,"value":10,"toc":721},"minimark",[11,15,20,42,49,53,91,95,135,138,141,145,160,241,246,253,263,266,271,274,294,304,308,323,327,331,338,359,366,370,373,410,414,417,619,625,635,639,642,657,661,674,678,704,717],[12,13,14],"p",{},"A ServiceNow MID Server is a Java service that runs inside your network and carries out work the cloud instance cannot do directly, such as Discovery probes, LDAP imports, and calls to internal REST or database endpoints. This guide covers MID Server installation, the configuration that matters, and how to troubleshoot one that is down or slow.",[16,17,19],"h2",{"id":18},"how-a-mid-server-communicates","How a MID Server communicates",[12,21,22,23,27,28,32,33,37,38,41],{},"The MID Server polls the instance over HTTPS on port 443. It picks up work from the ",[24,25,26],"strong",{},"ECC queue"," (",[29,30,31],"code",{},"ecc_queue"," table) as ",[34,35,36],"em",{},"output"," records, runs the probe or command locally, and posts the results back as ",[34,39,40],{},"input"," records.",[12,43,44,45,48],{},"Every connection starts from the MID Server. The instance never calls into your network, which is why the firewall team only needs to allow outbound traffic to ",[29,46,47],{},"https:\u002F\u002F\u003Cinstance>.service-now.com",".",[16,50,52],{"id":51},"before-you-install","Before you install",[54,55,56,63,69,75,85],"ul",{},[57,58,59,62],"li",{},[24,60,61],{},"Host:"," a dedicated Windows or Linux server. Check the current system requirements for your release. As a starting point, plan for 4 CPU cores, 8 GB of memory, and 40 GB of disk.",[57,64,65,68],{},[24,66,67],{},"Network:"," outbound 443 to the instance, plus access from the host to the targets it will reach.",[57,70,71,74],{},[24,72,73],{},"Time:"," the host clock must be accurate. Clock drift causes authentication and certificate errors.",[57,76,77,80,81,84],{},[24,78,79],{},"MID Server user:"," create a dedicated user on the instance and assign the ",[29,82,83],{},"mid_server"," role. Do not use a personal account or an admin account.",[57,86,87,90],{},[24,88,89],{},"Service account:"," on Windows, the service should run as a domain account with the rights Discovery needs on its targets, not as Local System.",[16,92,94],{"id":93},"install-the-mid-server","Install the MID Server",[96,97,98,105,111,114,117],"ol",{},[57,99,100,101,104],{},"On the instance, go to ",[24,102,103],{},"MID Server > Downloads"," and download the installer for your operating system. Use the installer from the same instance you will connect to, so the versions match.",[57,106,107,108,48],{},"Run the installer on the host. On Windows this is an MSI. On Linux, install the package or extract the archive into a path such as ",[29,109,110],{},"\u002Fservicenow\u002F\u003Cmid-server-name>",[57,112,113],{},"When prompted, enter the instance URL, the MID Server user name and password, and a unique MID Server name.",[57,115,116],{},"Start the service.",[57,118,119,120,123,124,127,128,131,132,48],{},"On the instance, open ",[24,121,122],{},"MID Server > Servers",". The new record appears with ",[24,125,126],{},"Validated"," set to ",[34,129,130],{},"No",". Open it and select ",[24,133,134],{},"Validate",[12,136,137],{},"A MID Server does no work until it is validated. Validation also encrypts the password stored on the host.",[12,139,140],{},"One host can run several MID Servers. Install each one in its own folder with its own service name.",[16,142,144],{"id":143},"key-configuration","Key configuration",[12,146,147,148,151,152,155,156,159],{},"Settings live in ",[29,149,150],{},"config.xml"," in the ",[29,153,154],{},"agent"," folder, and most can also be set as ",[24,157,158],{},"Configuration Parameters"," on the MID Server record.",[161,162,163,176],"table",{},[164,165,166],"thead",{},[167,168,169,173],"tr",{},[170,171,172],"th",{},"Parameter",[170,174,175],{},"Purpose",[177,178,179,190,204,214,231],"tbody",{},[167,180,181,187],{},[182,183,184],"td",{},[29,185,186],{},"url",[182,188,189],{},"The instance URL",[167,191,192,201],{},[182,193,194,197,198],{},[29,195,196],{},"mid.instance.username"," \u002F ",[29,199,200],{},"mid.instance.password",[182,202,203],{},"The MID Server user credentials",[167,205,206,211],{},[182,207,208],{},[29,209,210],{},"name",[182,212,213],{},"The MID Server name shown on the instance",[167,215,216,228],{},[182,217,218,221,222,221,225],{},[29,219,220],{},"mid.proxy.use_proxy",", ",[29,223,224],{},"mid.proxy.host",[29,226,227],{},"mid.proxy.port",[182,229,230],{},"Send instance traffic through a web proxy",[167,232,233,238],{},[182,234,235],{},[29,236,237],{},"threads.max",[182,239,240],{},"Number of worker threads for standard-priority jobs",[12,242,243,244,48],{},"Restart the service after you edit ",[29,245,150],{},[12,247,248,249,252],{},"Memory is set separately, in ",[29,250,251],{},"agent\u002Fconf\u002Fwrapper-override.conf",":",[254,255,261],"pre",{"className":256,"code":258,"language":259,"meta":260},[257],"language-text","wrapper.java.maxmemory=2048\n","text","",[29,262,258],{"__ignoreMap":260},[12,264,265],{},"Raise this when the MID Server runs large Discovery schedules or big JDBC imports and the log reports out-of-memory errors.",[267,268,270],"h3",{"id":269},"capabilities-applications-and-ip-ranges","Capabilities, applications, and IP ranges",[12,272,273],{},"The instance chooses a MID Server for each job using three settings on the MID Server record:",[54,275,276,282,288],{},[57,277,278,281],{},[24,279,280],{},"Supported applications",", such as Discovery, Orchestration, or ALL",[57,283,284,287],{},[24,285,286],{},"Capabilities",", such as SSH, WMI, SNMP, or PowerShell",[57,289,290,293],{},[24,291,292],{},"IP ranges"," the MID Server may reach",[12,295,296,297,300,301,48],{},"If a Discovery schedule reports that no MID Server is available, the usual cause is a mismatch here. A MID Server limited to ",[29,298,299],{},"10.10.0.0\u002F16"," will never be picked for a target in ",[29,302,303],{},"10.20.0.0\u002F16",[267,305,307],{"id":306},"clusters","Clusters",[12,309,310,311,314,315,318,319,322],{},"Group MID Servers with the same capabilities into a ",[24,312,313],{},"cluster",". A ",[34,316,317],{},"failover"," cluster moves work to the next MID Server when one goes down. A ",[34,320,321],{},"load balance"," cluster spreads work across all members. Use at least two MID Servers per environment.",[16,324,326],{"id":325},"troubleshoot-a-mid-server","Troubleshoot a MID Server",[267,328,330],{"id":329},"start-with-the-logs","Start with the logs",[12,332,333,334,337],{},"On the host, open the ",[29,335,336],{},"agent\u002Flogs"," folder:",[54,339,340,353],{},[57,341,342,345,346,349,350,48],{},[29,343,344],{},"agent0.log.0"," is the main log. Search it for ",[29,347,348],{},"SEVERE"," and ",[29,351,352],{},"WARNING",[57,354,355,358],{},[29,356,357],{},"wrapper.log"," records service start and stop events and JVM errors.",[12,360,361,362,365],{},"On the instance, check ",[24,363,364],{},"MID Server > Server Issues"," for problems the MID Server has reported about itself.",[267,367,369],{"id":368},"the-mid-server-is-down","The MID Server is Down",[12,371,372],{},"Work through these in order:",[96,374,375,380,386,395,404],{},[57,376,377,378,48],{},"Is the service running on the host? Start it and watch ",[29,379,357],{},[57,381,382,383,48],{},"Can the host reach the instance? From the host, open the instance URL in a browser or run ",[29,384,385],{},"curl -I https:\u002F\u002F\u003Cinstance>.service-now.com",[57,387,388,389,394],{},"Is the MID Server user active and not locked out on the instance? The ",[390,391,393],"a",{"href":392},"\u002Fscripts\u002Freport-active-locked-out-users","active locked-out users report"," finds locked accounts quickly.",[57,396,397,398,400,401,403],{},"Did the password change? Update ",[29,399,200],{}," in ",[29,402,150],{}," with the new plain-text value and restart. The MID Server encrypts it again on start.",[57,405,406,407,409],{},"Does ",[29,408,344],{}," show a certificate error? A TLS-inspecting proxy presents its own certificate, which the MID Server does not trust by default. Ask the network team to exclude the instance URL from inspection, or import the proxy's root certificate following the MID Server certificate documentation.",[267,411,413],{"id":412},"the-mid-server-is-up-but-jobs-do-not-finish","The MID Server is Up but jobs do not finish",[12,415,416],{},"Check the ECC queue. This background script, which only reads data, shows how much work is waiting per MID Server:",[254,418,422],{"className":419,"code":420,"language":421,"meta":260,"style":260},"language-javascript shiki shiki-themes github-light github-light","var queue = new GlideAggregate('ecc_queue');\nqueue.addQuery('queue', 'output');\nqueue.addQuery('state', 'ready');\nqueue.addAggregate('COUNT');\nqueue.groupBy('agent');\nqueue.query();\n\nwhile (queue.next()) {\n  gs.info(queue.getValue('agent') + ': ' +\n    queue.getAggregate('COUNT') + ' output records waiting');\n}\n","javascript",[29,423,424,457,478,497,512,527,538,545,560,591,613],{"__ignoreMap":260},[425,426,429,433,437,440,443,447,450,454],"span",{"class":427,"line":428},"line",1,[425,430,432],{"class":431},"sCydW","var",[425,434,436],{"class":435},"sKWpL"," queue ",[425,438,439],{"class":431},"=",[425,441,442],{"class":431}," new",[425,444,446],{"class":445},"se37E"," GlideAggregate",[425,448,449],{"class":435},"(",[425,451,453],{"class":452},"sOTlB","'ecc_queue'",[425,455,456],{"class":435},");\n",[425,458,460,463,466,468,471,473,476],{"class":427,"line":459},2,[425,461,462],{"class":435},"queue.",[425,464,465],{"class":445},"addQuery",[425,467,449],{"class":435},[425,469,470],{"class":452},"'queue'",[425,472,221],{"class":435},[425,474,475],{"class":452},"'output'",[425,477,456],{"class":435},[425,479,481,483,485,487,490,492,495],{"class":427,"line":480},3,[425,482,462],{"class":435},[425,484,465],{"class":445},[425,486,449],{"class":435},[425,488,489],{"class":452},"'state'",[425,491,221],{"class":435},[425,493,494],{"class":452},"'ready'",[425,496,456],{"class":435},[425,498,500,502,505,507,510],{"class":427,"line":499},4,[425,501,462],{"class":435},[425,503,504],{"class":445},"addAggregate",[425,506,449],{"class":435},[425,508,509],{"class":452},"'COUNT'",[425,511,456],{"class":435},[425,513,515,517,520,522,525],{"class":427,"line":514},5,[425,516,462],{"class":435},[425,518,519],{"class":445},"groupBy",[425,521,449],{"class":435},[425,523,524],{"class":452},"'agent'",[425,526,456],{"class":435},[425,528,530,532,535],{"class":427,"line":529},6,[425,531,462],{"class":435},[425,533,534],{"class":445},"query",[425,536,537],{"class":435},"();\n",[425,539,541],{"class":427,"line":540},7,[425,542,544],{"emptyLinePlaceholder":543},true,"\n",[425,546,548,551,554,557],{"class":427,"line":547},8,[425,549,550],{"class":431},"while",[425,552,553],{"class":435}," (queue.",[425,555,556],{"class":445},"next",[425,558,559],{"class":435},"()) {\n",[425,561,563,566,569,572,575,577,579,582,585,588],{"class":427,"line":562},9,[425,564,565],{"class":435},"  gs.",[425,567,568],{"class":445},"info",[425,570,571],{"class":435},"(queue.",[425,573,574],{"class":445},"getValue",[425,576,449],{"class":435},[425,578,524],{"class":452},[425,580,581],{"class":435},") ",[425,583,584],{"class":431},"+",[425,586,587],{"class":452}," ': '",[425,589,590],{"class":431}," +\n",[425,592,594,597,600,602,604,606,608,611],{"class":427,"line":593},10,[425,595,596],{"class":435},"    queue.",[425,598,599],{"class":445},"getAggregate",[425,601,449],{"class":435},[425,603,509],{"class":452},[425,605,581],{"class":435},[425,607,584],{"class":431},[425,609,610],{"class":452}," ' output records waiting'",[425,612,456],{"class":435},[425,614,616],{"class":427,"line":615},11,[425,617,618],{"class":435},"}\n",[12,620,621,622,624],{},"A large and growing count means the MID Server cannot keep up. Add a MID Server to the cluster, stagger Discovery schedules, or raise ",[29,623,237],{}," if the host has spare CPU and memory.",[12,626,627,628,631,632,634],{},"Output records stuck in ",[24,629,630],{},"Processing"," for a long time usually point to a probe that hangs on an unreachable target. The matching entry in ",[29,633,344],{}," names the target.",[267,636,638],{"id":637},"credential-failures","Credential failures",[12,640,641],{},"Discovery and Orchestration credentials are stored on the instance and sent to the MID Server when needed. When a probe fails to authenticate:",[54,643,644,651,654],{},[57,645,646,647,650],{},"Use ",[24,648,649],{},"Test credential"," on the credential record and select the MID Server that will run the job.",[57,652,653],{},"Confirm the credential is not restricted to a different MID Server.",[57,655,656],{},"For Windows targets, confirm the service account has the required rights on the target and that the firewall allows WMI or WinRM.",[267,658,660],{"id":659},"after-an-instance-upgrade","After an instance upgrade",[12,662,663,664,666,667,669,670,48],{},"MID Servers upgrade themselves to match the instance. If one stays on the old version, check that the host can download the package, that the service account can write to the ",[29,665,154],{}," folder, and that disk space is available. Then restart the service and review ",[29,668,344],{},". Add this check to your ",[390,671,673],{"href":672},"\u002Fblog\u002Fservicenow-upgrade-skipped-changes-checklist","upgrade checklist",[16,675,677],{"id":676},"checklist","Checklist",[54,679,680,683,689,692,695,698,701],{},[57,681,682],{},"Dedicated host with an accurate clock",[57,684,685,686,688],{},"Dedicated user with only the ",[29,687,83],{}," role",[57,690,691],{},"Outbound 443 allowed to the instance, with TLS inspection excluded",[57,693,694],{},"MID Server validated",[57,696,697],{},"Applications, capabilities, and IP ranges match the work it should do",[57,699,700],{},"At least two MID Servers in a cluster per environment",[57,702,703],{},"Logs and the ECC queue checked after every upgrade",[12,705,706,707,711,712,716],{},"Most integrations that run through a MID Server are REST or import jobs. The ",[390,708,710],{"href":709},"\u002Fblog\u002Fservicenow-outbound-rest-integration-best-practices","outbound REST integration guide"," and the ",[390,713,715],{"href":714},"\u002Fblog\u002Fservicenow-import-set-transform-map-best-practices","import set best practices"," cover what to build on top of it.",[718,719,720],"style",{},"html pre.shiki code .sCydW, html code.shiki .sCydW{--shiki-default:#D73A49;--shiki-dark:#D73A49}html pre.shiki code .sKWpL, html code.shiki .sKWpL{--shiki-default:#24292E;--shiki-dark:#24292E}html pre.shiki code .se37E, html code.shiki .se37E{--shiki-default:#6F42C1;--shiki-dark:#6F42C1}html pre.shiki code .sOTlB, html code.shiki .sOTlB{--shiki-default:#032F62;--shiki-dark:#032F62}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":260,"searchDepth":459,"depth":459,"links":722},[723,724,725,726,730,737],{"id":18,"depth":459,"text":19},{"id":51,"depth":459,"text":52},{"id":93,"depth":459,"text":94},{"id":143,"depth":459,"text":144,"children":727},[728,729],{"id":269,"depth":480,"text":270},{"id":306,"depth":480,"text":307},{"id":325,"depth":459,"text":326,"children":731},[732,733,734,735,736],{"id":329,"depth":480,"text":330},{"id":368,"depth":480,"text":369},{"id":412,"depth":480,"text":413},{"id":637,"depth":480,"text":638},{"id":659,"depth":480,"text":660},{"id":676,"depth":459,"text":677},"2026-11-11","Install and validate a ServiceNow MID Server, configure its key parameters, and troubleshoot a MID Server that is down, stuck, or failing its jobs.","2026-11-11-mid",null,"md",[744,747,750,753],{"question":745,"answer":746},"What is a MID Server in ServiceNow?","A MID Server (Management, Instrumentation, and Discovery) is a Java application that runs as a service on a Windows or Linux host inside your network. It lets a cloud-hosted ServiceNow instance reach systems behind the firewall for Discovery, Service Mapping, Orchestration, and integrations such as LDAP, JDBC, and REST.",{"question":748,"answer":749},"Which ports does a MID Server need?","The MID Server opens outbound HTTPS connections to the instance on port 443. The instance never opens a connection to the MID Server, so no inbound firewall rule is needed for that link. The MID Server also needs access to whatever it probes or integrates with, for example SSH on 22, WMI and WinRM for Windows, or the database port for a JDBC source.",{"question":751,"answer":752},"Why is my MID Server showing as Down?","Common causes are a stopped service on the host, a locked or wrong MID Server user account, a password that changed on the instance but not in config.xml, a proxy or firewall blocking port 443, or an expired or untrusted certificate. Check the service first, then read agent0.log.0 in the agent's logs folder for the exact error.",{"question":754,"answer":755},"How many MID Servers do I need?","Run at least two per environment so that a cluster can fail over or share load. Add more when you separate network zones, when Discovery schedules overlap with integration traffic, or when ECC queue output records wait a long time in the Ready state.",{},"\u002Fblog\u002Fservicenow-mid-server-installation-configuration-troubleshooting",{"title":5,"description":739},"\u002Fsocial-card.png","blog\u002Fservicenow-mid-server-installation-configuration-troubleshooting",[762,763,764,765],"mid server","discovery","integrations","administration","JeEBBzw6pHhrL1coOZmaJ78VpPQFY7MFvjC59PT3OJ4",[768,775,781],{"path":769,"title":770,"headline":770,"description":771,"date":738,"tags":772},"\u002Fblog\u002Fservicenow-update-sets-complete-guide-migration-mastery","ServiceNow Update Sets: A Complete Guide to Clean Migrations","Learn how ServiceNow update sets work, what they capture, and how to name, batch, preview, and commit them so changes reach production without surprises.",[773,774,765],"update sets","deployment",{"path":776,"title":777,"headline":778,"description":779,"date":780,"tags":741},"\u002Fblog\u002Fservicenow-business-rule-best-practices","ServiceNow Business Rule Best Practices: Avoid Recursion and Slow Transactions","ServiceNow Business Rule Best Practices for Reliable Server-Side Logic","Build faster, safer ServiceNow Business Rules with the right timing, narrow conditions, reusable Script Includes, and practical debugging techniques.","2026-10-19",{"path":709,"title":782,"headline":783,"description":784,"date":785,"tags":741},"ServiceNow Outbound REST Integrations: 9 Production Best Practices","9 Best Practices for Reliable ServiceNow Outbound REST Integrations","Build reliable ServiceNow outbound REST integrations with secure credentials, timeouts, retries, idempotency, logging, rate-limit handling, and practical testing.","2026-08-13",1794433798158]