Options

Stopping NAS.

rjdiorjdio Member Posts: 11
Hello,
I am having trouble with stopping Navision Application Server (NAS).
When i use the command prompt ;
net stop NASServiceName
server drops a message in Event Viewer saying ;
"The Navision Application Server will shut down when the processing of the current request has finished.".
It takes sometimes 4-5 minutes to finish the current process. But when I stop the service using Snap-In the service stops as I hit the "Stop Service" button.

Our datas are in other application and replicating from other application to Navision via NAS by the help of 2 services. That means when I restart my other services, I should restart NAS too. I've written a command prompt batch routine and put it at the end of deployment. But as NAS restarts in minutes data syncronization slows down.

Is there any parameters for NAS for the command line to stop service immediately and rollback the current transaction that is being processing???

Thanks for help.

Comments

  • kinekine Member Posts: 12,562
    you can kill the correct process through pskill command (search the forum for how to restart NAS).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ta5ta5 Member Posts: 1,164
    pskill: cool stuff :mrgreen:
    nas service: we often have the same problem with nas not stopable. anyone knows whats the reason? btw: when it is not stopable, it did its job without problem, so it does not seem to be a "hanging" service.

    regards
    thomas
  • kinekine Member Posts: 12,562
    NAS is terminated just if it is in "Idle" status. It means, when NAS is doing something, it will be never terminated (for example in neverending loop). But if there is just singleinstance codeunit with timer running, the NAS will be terminated. If the timer is executing someting right now, it will wait for end of the OnTimer trigger...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • rjdiorjdio Member Posts: 11
    Well pskills works, thanks but this does not that i fully needed. Pskills needs the application's PID (Process ID) to kill, but I should restart NAS (without waiting) in a batch job. That means I don't know the PID of NAS...

    The second thing that I'd like to mention is there is a timer trigger on my replicator that opens and filters a simple table. And continues if that table has rows. It sometimes has lots of records in that table.

    To tell what I mean briefly;
    There is another application that replicates datas to Navision and when a new version of that application is deployed NAS should be restarted. Replicator is running on a codeunit with Timer function triggered from Application Management codeunit in every 5ms. What I must do is rollback the current transaction if any, then stop NAS and restart NAS again at the end of a batch process that will run after deploying application. So pskill doesn't solve my problem due to not knowing process ID.

    Is there anyway to immediate rollback and making NAS idle, so that I can restart NAS normally??
  • kinekine Member Posts: 12,562
    PsKill v1.11 - Terminates processes on local or remote systems
    Copyright (C) 1999-2005 Mark Russinovich
    Sysinternals - www.sysinternals.com

    Usage: pskill [-t] [\\computer [-u username [-p password]]] <process ID | name>
    -t Kill the process and its descendants.
    -u Specifies optional user name for login to
    remote computer.
    -p Specifies optional password for user name. If you omit this
    you will be prompted to enter a hidden password.

    As you can see, you can use "name" instead "process ID". Try to use
    pskill nassql.exe
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.