Options

Err with more than 1 Middle Tier Service on the same machine

ta5ta5 Member Posts: 1,164
edited 2011-12-07 in NAV Three Tier
Hello
If we have more than one middle tier service on the same machine there are event log entries on service startup:
Ereignistyp:	Fehler
Ereignisquelle:	MicrosoftDynamicsNAVServer
Ereigniskategorie:	Keine
Ereigniskennung:	0
Datum:		03.06.2011
Zeit:		12:12:28
Benutzer:		Nicht zutreffend
Computer:	xxxx
Beschreibung:
Type: System.IO.IOException
Message: The process cannot access the file '__TEMP__8E6D4BE7FA5847EA91C0112AC01C7AB5.tmp' because it is being used by another process.
StackTrace:
     at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive)
     at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive)
     at System.IO.Directory.Delete(String path, Boolean recursive)
     at Microsoft.Dynamics.Nav.Runtime.TempPathHelper.RemovePath(String path)
Source: mscorlib
Weitere Informationen über die Hilfe- und Supportdienste erhalten Sie unter http://go.microsoft.com/fwlink/events.asp.
We also analyzed with ProcessMonitor from SysInternals and it seems the the same temp files are being accessed by more than one service. Although the service seems to run without further problems I wonder how this error could be avoided.
Many thanks in advance.
Thomas

Answers

  • Options
    clabandclaband Member, Microsoft Employee Posts: 26
    Which version are you running?
    Claus Busk Andersen
    Program Manager
    Microsoft Dynamics NAV
  • Options
    ta5ta5 Member Posts: 1,164
    2009 R2, Swiss Version
  • Options
    mihail_kolevmihail_kolev Member Posts: 379
    Which OS are you running? Have you set different ports in the CustomSettings.config?
    -Mihail- [MCTS]
  • Options
    ta5ta5 Member Posts: 1,164
    OS: Windows Server 2008 R2
    Ports: Yes, each service runs on its own port

    Regards
    Thomas
  • Options
    clabandclaband Member, Microsoft Employee Posts: 26
    What is the names and ports of your instances on that box? If you have overlapping instance names on seperate ports this may be the reason

    /Claus
    Claus Busk Andersen
    Program Manager
    Microsoft Dynamics NAV
  • Options
    ta5ta5 Member Posts: 1,164
    Hi Claus
    Thanks for helping. Names and ports are different. Any other ideas? :?
    Regards
    Thomas
  • Options
    mihail_kolevmihail_kolev Member Posts: 379
    The Net TCP Port Sharing service... I remember I had problems with it on Server2008
    -Mihail- [MCTS]
  • Options
    ta5ta5 Member Posts: 1,164
    Hi Mihail
    I don't use port sharing, because all services use separate names and ports.
    Thanks
    Thomas
  • Options
    mihail_kolevmihail_kolev Member Posts: 379
    I don't know if this is possible (may be it is). When I create new services, they are always depended to the NetTcpPortSharing service...
    -Mihail- [MCTS]
  • Options
    ta5ta5 Member Posts: 1,164
    Hi

    The problem does still exist. There is another problem when debugging the middle tier, because the source files from different middle tier services are always in subfolders of this folder
    C:\ProgramData\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer.

    So imho different problems but maybe same reason: Each middle tier services uses same folders for program data. Is it possible to change this? Any help pointing in the right direction would be very appreciated.

    Thanks in advance
    Thomas
  • Options
    ta5ta5 Member Posts: 1,164
    Nobdy? I guess I'm the only one having this problem ](*,)
    Regards
    Thomas
  • Options
    BubaBuba Member Posts: 24
    You should use different service folder for each service. While you're trying to have one service folder for 2 or more services.
    So copy your entire service folder to a new folder.
    Take a look http://msdn.microsoft.com/en-us/library/dd301437.aspx
  • Options
    ta5ta5 Member Posts: 1,164
    Hi Buba
    Thx for replying. I have already done this before, but without port sharing.

    Thomas
  • Options
    BubaBuba Member Posts: 24
    Hi Thomas
    The problem does still exist. There is another problem when debugging the middle tier, because the source files from different middle tier services are always in subfolders of this folder
    C:\ProgramData\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer.
    So you're trying to get it running in the same folder?, sorry if I misunderstood
    Can't help you there, since I've never done it that way myself.
  • Options
    ta5ta5 Member Posts: 1,164
    Problem solved, it was a simple typing error (quite embarrassing...)

    I have missed the bold part in the sc command. No other effects, just the problem with the path as in the thread starting posting.

    sc \\<computername> create MicrosoftDynamicsNAVServer$NAV2 binpath= "C:\Program Files\Microsoft Dynamics NAV\60\Service2\Microsoft.Dynamics.Nav.Server.exe $NAV2" DisplayName= "Microsoft Dynamics NAV Server Instance 2" start= auto type= own

    Thanks again for all your contributions, great forum =D>
    Thomas
  • Options
    ysthecoolysthecool Member Posts: 1
    Hi All,
    I am having the same problem. There are 5 NAV servers and Web services which are running on the same machine. All of them are using different port numbers and running from different folders. I am using NAV 2009 R2. Can anyone point me in the right direction to resolve this error?

    Yogeshwar
Sign In or Register to comment.