Multiple Service Tiers

johntaylormfc
Member Posts: 22
Hi,
I have managed to succcessfuly install two service tiers on our development server, and can open both via the RTC.
So i now have two NAV services, but only one Web Service.
I wish both systems to publish web services.
My original URL
http://localhost:7047/DynamicsNAV/ws/NAV2009/Services
Works fine. However when I change the servicename and companyname to match my second instance it will not load a list of web services.
http://localhost:7047/DynamicsNAVGCH/ws/GCH/Services
Do I need to create a second web service for the second instance?
Thanks
John
I have managed to succcessfuly install two service tiers on our development server, and can open both via the RTC.
So i now have two NAV services, but only one Web Service.
I wish both systems to publish web services.
My original URL
http://localhost:7047/DynamicsNAV/ws/NAV2009/Services
Works fine. However when I change the servicename and companyname to match my second instance it will not load a list of web services.
http://localhost:7047/DynamicsNAVGCH/ws/GCH/Services
Do I need to create a second web service for the second instance?
Thanks
John
0
Comments
-
I think, you should create the second Microsoft Dynamics NAV Business Web Services.
I've tried to do this with sc command and found out the strange thing.
I used the command:SC CREATE MicrosoftDynamicsNavWS$test binpath= "C:\Program Files\Microsoft Dynamics NAV\60\Service2\Microsoft.Dynamics.Nav.Server.exe $test" DisplayName= "Microsoft Dynamics NAV Business Web Service Instance 2" type= own start= demand depend= HTTP
The service appeared in service snap-in. But when I started this server in event view appeared the event:Service MicrosoftDynamicsNavServer$test is listening to requests at net.tcp://apanko-pc:8046/test/Service.
But IMHO it should be:Service MicrosoftDynamicsNavWS$test is listening to requests at http://apanko-pc:8047/test.
(I don't want to share ports)
Of course I cannot see web services, but I can to open RTC and connect to "localhost:8046/test", even if I do not create Nav Server Service at all.
Here are changed strings in CustomSettings.config:<add key="DatabaseName" value="ddd60"></add> <add key="ServerInstance" value="test"></add> <add key="ServerPort" value="8046"></add> <add key="WebServicePort" value="8047"></add>
Where is my mistake? ](*,)0 -
I created a couple of posts, which explains these things - in fact they include a couple of .bat files to create and delete service tiers automatically.
http://blogs.msdn.com/freddyk/archive/2008/10/29/the-service-tier.aspx
http://blogs.msdn.com/freddyk/archive/2008/10/29/multiple-service-tiers.aspx
http://blogs.msdn.com/freddyk/archive/2008/10/31/4-bat-files-for-the-client-tier.aspx
You will probably find the answer to your question in the second post.
I did this because I found out that creating the webservice tier was very sensitive to naming etc. - and I got it wrong every time myself.Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
freddy.dk wrote:You will probably find the answer to your question in the second post.
I did this because I found out that creating the webservice tier was very sensitive to naming etc. - and I got it wrong every time myself.
Your bat-files work fine. Thank you.
I've used information from the second post when I was creating command string.
I just wonder if it possible to create WS manualy? I see it is not trivial task.0 -
Thanks,
I had looked quickly through the blog, but had not noticed it was creating a new Web serivice as well.
Will try this tomrrow.
Thanks
John0 -
Batch jobs worked a treat.
There are some very clever people about!
Thanks
John0 -
Hi
The posting of Freddy K. is very interesting. However, I think I've missed the important clue (my fault) :?
In a test environment I have the following:
1 Physical Server with 1 SQL Server
2 NST running each on a different database
We can open the 2 databases with RTC as follows:
localhost:7046/DynamicsNAV (without port also works because 7046 is mentioned in the clients config file)
and
localhost:7050/DynamicsNAVTest
So I can use both installations simultaneously.
The is question now:
What is the idea behind the use of the batches and what is easier then? Again, I'm sure it's a good idea but I didn't get it by now...
And how would the 2 links look like in Freddys solution?
Thanks in advance
Thomas0 -
I found an error in my .bat files (or rather Daniel Steiner did - thanks)
If you add a Web Service listener without the corresponding Service Tier - then it will use type= own which doesn't work.
I will upload a fix later today - it should only use own if it is a servicetier alone - else it should be share.
I guess this is the problem you are running into as well.
Furthermore - some of the .bat files doesn't work if you only have a Web Service Listener (start/stop)Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
freddy.dk wrote:II guess this is the problem you are running into as well.
Thanks for your comment. I did not have problems with your bat files, I rather did not understand the concept behind it. If you would explain it in more detail (also see my questions) I'll be happy.
Thanks
Thomas0 -
The .bat files are not necessary - and if you have 2 NST's - you can copy the directory manually and add the services manually - and this is a one time thing.
However - if you are a partner and you have a service tier machine with a copy of your customers installation for development - you want to streamline the creation of servicetiers - you want to have a structure for service tiers setup and you want to be able to start and stop these from the clients (developers machines or whatever).
This is what I use the .bat files for - I know that the DynamicsNAV instance is in the DynamicsNAV directory and at server:7046/DynamicsNAV - and I know how to get to the Web Service. Also Services are named consistently in services so that they are easy to find.
So the idea with the .bat files are consistency - just a helping hand.Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
Hi Freddy
Thanks a lot. One last thing to get it for me:
What's the idea behind NetTcpPortSharing and has your solution something to do with it?
Thanks in advance
Thomas0 -
If you have two services listening to the same port, then you need to run that service in order for that to work.
Default, that service is not started - so I create a dependency to the service in order to make sure it starts.
I like having service tiers seperated by instance name instead of port numbers - I think it is easier.Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
:idea:
Ah, I think I got it.
So
localhost:7046/DynamicsNAV
localhost:7050/DynamicsNAVTest
can be replaced by
localhost/DynamicsNAV
localhost/DynamicsNAVTest
when using portsharing?
Thomas0 -
yes, or
localhost:7046/DynamicsNAV
localhost:7046/DynamicsNAVTest
(I actually don't know whether it adds the 7046 by default....)Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
Or you can use my application for that (I will check if I do not have same "bug" as Freddy, because I based it on his bat files... :-)). See my blog (actual version) or download section (in the discussion under)... ;-)0
-
I use .bat files and create two servers but i can't connect two services in port 7046.
But if i change port in CustomSettings.config i can connect two services:
localhost:7046/DynamicsNAV
localhost:7048/DynamicsNAVTest
When it's the same port and i try to connect to RTC, Net.Tcp Port Sharing Service crash.
I work with window server 2003R2.
Any idea?0 -
1) I assume that there will be some error event in the event log. Check that for more info.
2) You need to stop originally installed service tier to be able to create and use port sharing. The original service doesn't support it (have no enabled this possibility).0 -
kine wrote:2) You need to stop originally installed service tier to be able to create and use port sharing. The original service doesn't support it (have no enabled this possibility).kine wrote:1) I assume that there will be some error event in the event log. Check that for more info.
Error .NET Runtime optimization Service
Success:1101
.NET Runtime Optimization Service (clr_optimization_v2.0.50727_32) - Failed to compile: Microsoft.ReportingServices.QueryDesigners, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91 . Error code = 0x80070002
In Sistem 2 errors:
Tipo de suceso: Error
Origen del suceso: SMSvcHost 3.0.0.0
Categoría del suceso: Sharing Service
Id. suceso: 10
Fecha: 13/05/2009
Hora: 15:55:29
Usuario: NT AUTHORITY\Servicio de red
Equipo: SRVSQL
Descripción:
No se encuentra la descripción del Id. de suceso ( 10 ) en el origen ( SMSvcHost 3.0.0.0 ). Es posible que el equipo local no tenga la información de Registro o archivos DLL de mensajes necesarios para mostrar mensajes desde un equipo remoto. Es posible que pueda usar el indicador /AUXSOURCE= para recuperar esta descripción; consulte Ayuda y soporte técnico para obtener más detalles. La siguiente información es parte del suceso: System.ServiceModel.Diagnostics.CallbackException: El elemento AsyncCallback inició una excepción. ---> System.ServiceModel.Diagnostics.ExceptionUtility+InternalException: Error en Windows Communication Foundation. Las aplicaciones no deben intentar controlar este error.
en System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
en System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously, Exception exception)
en System.ServiceModel.Activation.WorkerProcess.DispatchSessionAsyncResult.DispatchSessionCompletedCallback(IAsyncResult result)
en System.ServiceModel.Diagnostics.Utility.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
en System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
--- Fin del seguimiento de la pila de la excepción interna ---
en System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
en System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.CallComplete(Boolean completedSynchronously, Exception exception)
en System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.FinishSend(IAsyncResult result, Boolean completedSynchronously)
en System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.SendCallback(IAsyncResult result)
en System.ServiceModel.Diagnostics.Utility.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
en System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
en System.ServiceModel.Dispatcher.DuplexChannelBinder.AsyncDuplexRequest.Done(Boolean completedSynchronously)
en System.ServiceModel.Dispatcher.DuplexChannelBinder.AsyncDuplexRequest.GotReply(Message reply)
en System.ServiceModel.Dispatcher.DuplexChannelBinder.HandleRequestAsReplyCore(Message message)
en System.ServiceModel.Dispatcher.DuplexChannelBinder.HandleRequestAsReply(Message message)
en System.ServiceModel.Dispatcher.ChannelHandler.HandleRequestAsReply(RequestContext request)
en System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
en System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
en System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result)
en System.ServiceModel.Diagnostics.Utility.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
en System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
en System.ServiceModel.Channels.FramingDuplexSessionChannel.TryReceiveAsyncResult.OnReceive(IAsyncResult result)
en System.ServiceModel.Diagnostics.Utility.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
en System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
en System.ServiceModel.Channels.SynchronizedMessageSource.ReceiveAsyncResult.OnReceiveComplete(Object state)
en System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)
en System.ServiceModel.Channels.PipeConnection.OnAsyncReadComplete(Boolean haveResult, Int32 error, Int32 numBytes)
en System.ServiceModel.Channels.OverlappedContext.CompleteCallback(UInt32 error, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
en System.ServiceModel.Diagnostics.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
en System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP); SMSvcHost; 11320.
And another
Tipo de suceso: Error
Origen del suceso: Service Control Manager
Categoría del suceso: Ninguno
Id. suceso: 7034
Fecha: 19/05/2009
Hora: 11:08:37
Usuario: No disponible
Equipo: SRVSQL
Descripción:
El servicio Net.Tcp Port Sharing Service se terminó de manera inesperada. Esto ha sucedido 3 veces.
Para obtener más información, vea el Centro de ayuda y soporte técnico en http://go.microsoft.com/fwlink/events.asp.
Any idea? Thanks!!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions