Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

deleting booking went wrong

Solved953 views26th January 2024reservation SRM SRM Booking Manager srmmanagers
3
Razvan Mielcioiu [DevOps Member]340 31st October 2023 0 Comments

Hi,

I deleted a reservation instance using:
SrmManagers.ResourceManager.RemoveReservationInstances(reservation);

But apparently that does not delete it properly, as it still shows up in the Booking Manager UI.

Now I want to use:
var bookingManager = new BookingManager("My Booking Manager");        
bookingManager.Delete(engine, reservation);

But I'm getting an error:
An unexpected exception occurred when trying to update the main element '127207/4134'. The element is not reachable. (Code: 0x80040312) Skyline.DataMiner.Net.Exceptions.DataMinerCOMException: Unable to find hosting agent. The agent might still be starting up.

But the agent is up.
Is there any way I can delete the reservation for good?

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 26th January 2024

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
0
Jorge Dias [SLC] [DevOps Enabler]4.76K Posted 31st October 2023 8 Comments

Hi Razvan,

If you created your booking using the BookingManager class you should indeed delete it, using the BookingManager class as well.

Can you please post the entire exception stack trace? Does it come from the method Delete or from the BookingManager constructor?

Razvan Mielcioiu [DevOps Member] Posted new comment 31st October 2023
Razvan Mielcioiu [DevOps Member] commented 31st October 2023

Full stack trace:
2023/10/31 09:25:39.138|SLNet.exe|TryUpdateFunctionResourceElements|ERR|0|194|An unexpected exception occurred when trying to update the main element ‘127207/4134’. The element is not reachable. (Code: 0x80040312) Skyline.DataMiner.Net.Exceptions.DataMinerCOMException: Unable to find hosting agent. The agent might still be starting up.
—> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80040312

Server stack trace:
at Interop.SLDataMiner.IDataMiner.NotifyDataMiner(String bstrUser, Int32 iType, Object varValue, Object varValue2, Object& pvarReturnValue)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Interop.SLDataMiner.IDataMiner.NotifyDataMiner(String bstrUser, Int32 iType, Object varValue, Object varValue2, Object& pvarReturnValue)
at Skyline.DataMiner.Net.MessageHandler.HandleSetDataMinerInfo(IConnectionInfo connInfo, SetDataMinerInfoMessage request)
at Skyline.DataMiner.Net.Facade.HandleClientRequestMessage(IConnectionInfo connInfo, ClientRequestMessage oneMsg, Boolean canQueue)
at Skyline.DataMiner.Net.Facade.HandleMessageInternal(IConnectionInfo connInfo, DMSMessage oneMsg, Int32 groupID, Int32 groupTotal)
at Skyline.DataMiner.Net.Facade.HandleMessage(IConnectionInfo connInfo, DMSMessage oneMsg, Int32 groupID, Int32 groupTotal)
at Skyline.DataMiner.Net.BaseFacade.HandleMessages(IConnectionInfo connInfo, DMSMessage[] msgs)
at Skyline.DataMiner.Net.Facade.HandleMessage(IConnectionInfo connInfo, DMSMessage oneMsg, Int32 groupID, Int32 groupTotal)
at Skyline.DataMiner.Net.BaseFacade.HandleMessages(IConnectionInfo connInfo, DMSMessage[] msgs)
at Skyline.DataMiner.Net.Facade.HandleMessagesForClient(IConnectionInfo connInfo, DMSMessage[] messages)
at Skyline.DataMiner.Net.Transport.Remoting.InternalHandleMessages(ConnectionToken token, DMSMessage[] inputMessages, ConnectionTransportType ctt)
— End of inner exception stack trace —

Server stack trace:
at Skyline.DataMiner.Net.Transport.Remoting.InternalHandleMessages(ConnectionToken token, DMSMessage[] inputMessages, ConnectionTransportType ctt)
at Skyline.DataMiner.Net.Transport.Remoting.HandleMessages(ConnectionToken token, DMSMessage[] inputMessages, ConnectionTransportType ctt)
at Skyline.DataMiner.Net.Transport.Remoting.HandleMessages(ConnectionToken token, DMSMessage[] inputMessages)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Skyline.DataMiner.Net.ISLNet.HandleMessages(ConnectionToken token, DMSMessage[] inputMessages)
at Skyline.DataMiner.Net.LegacyRemotingConnection.TransportSpecificHandleMessage(ConnectionToken tok, DMSMessage[] msgs, Int32 timeout)
at Skyline.DataMiner.Net.Connection.InternalHandlePackedMessages(ConnectionToken tok, DMSMessage[] msgs, Int32 timeout)
at Skyline.DataMiner.Net.Connection.InternalHandleUnpackedMessages(DMSMessage[] msgs, Int32 timeout)
at Skyline.DataMiner.Net.Connection.HandleMessages(DMSMessage[] msgs, Int32 timeout)
at Skyline.DataMiner.Net.DataMinerConnection.ForwardRemote(DMSMessage[] msgs)
at Skyline.DataMiner.Net.DataMinerConnection.Forward(DMSMessage[] msgs)
at Skyline.DataMiner.Net.RemoteAccess.Forward(MessageTarget target, DMSMessage[] messages)
at Skyline.DataMiner.Net.RemoteAccess.Forward(MessageTarget target, DMSMessage message)
at Skyline.DataMiner.Net.RemoteAccess.Forward(Int32 dataMinerID, DMSMessage message)
at Skyline.DataMiner.Net.Facade.HandleClientRequestMessage(IConnectionInfo connInfo, ClientRequestMessage oneMsg, Boolean canQueue)
at Skyline.DataMiner.Net.Facade.HandleMessageInternal(IConnectionInfo connInfo, DMSMessage oneMsg, Int32 groupID, Int32 groupTotal)
at Skyline.DataMiner.Net.Facade.HandleMessage(IConnectionInfo connInfo, DMSMessage oneMsg, Int32 groupID, Int32 groupTotal)
at Skyline.DataMiner.Net.BaseFacade.HandleMessage(DMSMessage oneMsg)
at Skyline.DataMiner.Net.ResourceManager.ResourceManager.TryUpdateFunctionResourceElements(HashSet`1 functionResourceIds, Boolean force, HashSet`1& failedDeletes)

Jorge Dias [SLC] [DevOps Enabler] commented 31st October 2023

That stack trace doesn’t seem to come from the methods in the original question, can you post the one that you get from there?
Does the element mentioned in the exception exists in your system? Element with ID 127207/4134

Razvan Mielcioiu [DevOps Member] commented 31st October 2023

The methods in the original question do not throw any exception themselves, but this stacktrace is the one I could find, related to those actions.

Razvan Mielcioiu [DevOps Member] commented 31st October 2023

Later Edit, Ignore the above.
This is the trace that shows up in Cube when I run the code:

Skyline.DataMiner.Library.Exceptions.ReservationNotDeletedException: Unable to delete contributing booking MyBookingName and it’s resource. —> Skyline.DataMiner.Library.Exceptions.ResourceManagerException: TraceData: (amount = 1)
– ErrorData: (amount = 1)
– ResourceManagerErrorData: ErrorReason: MainElementNotReachable,
SubjectId: 11d284a8-57fa-4321-bfa2-82a95c5f98dc,
ElementId: 127207/4106,

— End of inner exception stack trace —
at CManagedAutomation.RunWrapped(CManagedAutomation* , Int32 iCookie, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* pvarReturn, String scriptName)
at CManagedAutomation.Run(CManagedAutomation* , Int32 iCookie, Char* bstrScriptName, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* varEntryPoint, tagVARIANT* pvarReturn, tagVARIANT* pvarEntryPointResult) (CSharp; 0x80004005h):

Razvan Mielcioiu [DevOps Member] commented 31st October 2023

This is the code I’m using:
public class Script
{
public void Run(Engine engine)
{
var reservationId = engine.GetScriptParam(“Reservation Id”).Value;

if (string.IsNullOrEmpty(reservationId))
{
engine.Log($”reservationId is null or empty, exiting”, LogType.Debug, 3);
return;
}

var reservationGuid = Guid.Parse(reservationId);
var reservation = SrmManagers.ResourceManager.GetReservationInstance(reservationGuid);
if (reservation == null)
{
engine.Log($”could not find reservation”, LogType.Debug, 3);
}
else
{
engine.Log($”reservation id: {reservationId}, name: {reservation.Name}”, LogType.Debug, 3);
DeleteReservation(engine, reservation);
}
}

public void DeleteReservation(Engine engine, ReservationInstance reservation)
{
var bookingManager = new BookingManager(“Playout Booking Manager”);
bookingManager.Delete(engine, reservation);
}
}

Show 3 more comments
You are viewing 1 out of 2 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

How to implement bearer token refresh? 0 Answers | 0 Votes
Web Applications exception in Cube due to invalid certificate 0 Answers | 0 Votes
Redundancy Groups and Alarming – Duplicate Alarms 0 Answers | 0 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (109) Correlation (69) Correlation rule (52) Cube (151) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin