Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Oracle Linux Containers, KVM, and XEN Support Question?

Rucadulu2Jun 13 2014 — edited Jun 16 2014

Does Oracle Support its products (DB's, APPS, etc.) running on Oracle Linux Containers ?

I understand Oracle Supports running KVM and XEN hypervisors on Oracle Linux and that it does NOT support Oracle DB's, APPS, etc. running in a guest OS running on KVM or XEN on a Oracle linux host.  However, does Oracle support running Oracle Linux Guests in KVM or XEN on an Oracle Linux Host ?

I am curious as to why Oracle will Support it DB's APPS etc. in OracleVM which is an Oracle custom XEN hypervisor but not in the Standard XEN hypervisor that comes with Oracle Linux? Is there really that much different between the two products outside of the GUI interfaces used to manage each?

Also what is Oracle's Support policies for running Oracle Linux, DB's APPS, etc. in Oracle VirtualBox ?

This post has been answered by Avi Miller-Oracle on Jun 13 2014
Jump to Answer

Comments

807607
It says that "300:123qwe@192.168.1.99" is not a valid IP address or hostname.
masijade

javax.sip.InvalidArgumentException:
300:123qwe@192.168.1.99: 300:123qwe@192.168.1.99
at
gov.nist.javax.sip.SipStackImpl.createListeningPoint(S
ipStackImpl.java:645)
at sipTrade.createProvider(sip.java:274)
at sipTrade.main(sip.java:299)
Caused by: java.net.UnknownHostException:
300:123qwe@192.168.1.99: 300:123qwe@192.168.1.99
at java.net.InetAddress.getAllByName0(Unknown
Source)
at java.net.InetAddress.getAllByName0(Unknown
Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at
gov.nist.javax.sip.SipStackImpl.createListeningPoint(S
ipStackImpl.java:625)
... 2 more
import java.io.*;
import javax.sip.*;
import javax.sip.address.*;
import javax.sip.header.*;
import javax.sip.message.*;
import java.util.*;

public class sip implements SipListener {
Your problem seems to be in sipTrade not sip

Edit:

but karma-9 is also right.
807607
thnx, fixed that error but it still won't work. I'm getting the same error.....
masijade
Can we see the affected area of sipTrade?
807607
Made som more fixes:


sipStack = gov.nist.javax.sip.SipStackImpl@e24e2a
sipStack = gov.nist.javax.sip.SipStackImpl@e24e2a
SipProviders: java.util.LinkedList$ListItr@1a73d3c
AddressFactory: class gov.nist.javax.sip.address.AddressFactoryImpl
InvalidArgumentException Cannot assign requested address: Cannot bindjavax.sip.InvalidArgumentException: Cannot assign requested address: Cannot bind
at gov.nist.javax.sip.SipStackImpl.createListeningPoint(SipStackImpl.java:645)
at sipClient.createProvider(sipClient.java:267)
at sipClient.main(sipClient.java:302)
Caused by: java.io.IOException: Cannot assign requested address: Cannot bind
at gov.nist.javax.sip.stack.UDPMessageProcessor.<init>(UDPMessageProcessor.java:135)
at gov.nist.javax.sip.stack.SIPTransactionStack.createMessageProcessor(SIPTransactionStack.java:1652)
at gov.nist.javax.sip.SipStackImpl.createListeningPoint(SipStackImpl.java:626)
... 2 more
Exception in thread "main" java.lang.NullPointerException
at sipClient.main(sipClient.java:303)


import java.io.*;
import javax.sip.*;
import javax.sip.address.*;
import javax.sip.header.*;
import javax.sip.message.*;
import java.util.*;

public class sipClient implements SipListener {

	private static AddressFactory addressFactory;
	private static MessageFactory messageFactory;
	private static HeaderFactory headerFactory;
	private static Address address;
	private static SipStack sipStack;
	private int port;
	protected SipProvider udpProvider;
	protected Dialog dialog;
	protected int notifyCount = 0;
	public static final int PORT_5060 = 5070;	
	protected final String serverIP = "192.168.1.99";

	
	class MyEventSource implements Runnable {
		private sipClient st;
		private EventHeader eventHeader;

		public MyEventSource(sipClient notifier, EventHeader eventHeader ) {
			this.st = notifier;
			this.eventHeader = eventHeader;
		}

		public void run() {
			try {
				for (int i = 0; i < 100; i++) {

					Thread.sleep(100);
					Request request = this.st.dialog.createRequest(Request.NOTIFY);
					SubscriptionStateHeader subscriptionState = headerFactory.createSubscriptionStateHeader(SubscriptionStateHeader.ACTIVE);
					request.addHeader(subscriptionState);
					request.addHeader(eventHeader);
					
					// Lets mark our Contact
					((SipURI)dialog.getLocalParty().getURI()).setParameter("id","not2");
					
					ClientTransaction ct = udpProvider.getNewClientTransaction(request);
					System.out.println("NOTIFY Branch ID "+((ViaHeader)request.getHeader(ViaHeader.NAME)).getParameter("branch"));
					this.st.dialog.sendRequest(ct);
					System.out.println("Dialog " + dialog);
					System.out.println("Dialog state after active NOTIFY: " + dialog.getState());
					synchronized (sipClient.this) {
					notifyCount ++;
					}
				}
			} catch (Throwable e) {
				e.printStackTrace();
			}
		}
	}


	private static void usage() {
		System.exit(0);

	}

	public void processRequest(RequestEvent requestEvent) {
		Request request = requestEvent.getRequest();
		ServerTransaction serverTransactionId = requestEvent.getServerTransaction();

		System.out.println("\n\nRequest " + request.getMethod()+" received at " + sipStack.getStackName()+" with server transaction id " + serverTransactionId+" and dialog id "+requestEvent.getDialog());
		if (request.getMethod().equals(Request.SUBSCRIBE)) {
			processSubscribe(requestEvent, serverTransactionId);
		}

	}

	/**
	 * Process the invite request.
	 */
	public void processSubscribe(RequestEvent requestEvent,
			ServerTransaction serverTransaction) {
		SipProvider sipProvider = (SipProvider) requestEvent.getSource();
		Request request = requestEvent.getRequest();
		try {
			System.out.println("notifier: got an Subscribe sending OK");
			System.out.println("notifier:  " + request);
			System.out.println("notifier : dialog = " + requestEvent.getDialog());
			EventHeader eventHeader = (EventHeader) request.getHeader(EventHeader.NAME);
			if ( eventHeader == null) {
				System.out.println("Cannot find event header.... dropping request.");
				return;
			}
						
			// Always create a ServerTransaction, best as early as possible in the code
			Response response = null;
			ServerTransaction st = requestEvent.getServerTransaction();			
			if (st == null) {
				st = sipProvider.getNewServerTransaction(request);
			}
			
			// Check if it is an initial SUBSCRIBE or a refresh / unsubscribe
			boolean isInitial = requestEvent.getDialog() == null;
			if ( isInitial ) {
				// need random tags to test forking
				String toTag = Integer.toHexString( (int) (Math.random() * Integer.MAX_VALUE) );
				response = messageFactory.createResponse(202, request);
				ToHeader toHeader = (ToHeader) response.getHeader(ToHeader.NAME);
				
				// Sanity check: to header should not ahve a tag. Else the dialog 
				// should have matched
				if (toHeader.getTag()!=null) {
					System.err.println( "####ERROR: To-tag!=null but no dialog match! My dialog=" + dialog.getState() );
				}				
				toHeader.setTag(toTag); // Application is supposed to set.
				
				this.dialog = st.getDialog();
				// subscribe dialogs do not terminate on bye.
				this.dialog.terminateOnBye(false);
				if (dialog != null) {
					System.out.println("Dialog " + dialog);
					System.out.println("Dialog state " + dialog.getState());
				}
			} else {
				response = messageFactory.createResponse(200, request);
			}

			// Both 2xx response need a Contact
			address = addressFactory.createAddress("xTrade <sip:192.168.1.99>");
			((SipURI)address.getURI()).setPort( udpProvider.getListeningPoint("udp").getPort() );				
			ContactHeader contactHeader = headerFactory.createContactHeader(address);			
			response.addHeader(contactHeader);
			
			// Expires header is mandatory in 2xx responses to SUBSCRIBE
			ExpiresHeader expires = (ExpiresHeader) request.getHeader( ExpiresHeader.NAME );
			if (expires==null) {
				expires = headerFactory.createExpiresHeader(30);	// rather short
			}
			response.addHeader( expires );
			st.sendResponse(response);
						
			/*
			 * NOTIFY requests MUST contain a "Subscription-State" header with a
			 * value of "active", "pending", or "terminated". The "active" value
			 * indicates that the subscription has been accepted and has been
			 * authorized (in most cases; see section 5.2.). The "pending" value
			 * indicates that the subscription has been received, but that
			 * policy information is insufficient to accept or deny the
			 * subscription at this time. The "terminated" value indicates that
			 * the subscription is not active.
			 */
		
			Request notifyRequest = dialog.createRequest( "NOTIFY" );
			
			// Mark the contact header, to check that the remote contact is updated
			((SipURI)contactHeader.getAddress().getURI()).setParameter("id","not");
			
			// Initial state is pending, second time we assume terminated (Expires==0)
			SubscriptionStateHeader sstate = headerFactory.createSubscriptionStateHeader(
					isInitial ? SubscriptionStateHeader.PENDING : SubscriptionStateHeader.TERMINATED );
			
			// Need a reason for terminated
			if ( sstate.getState().equalsIgnoreCase("terminated") ) {
				sstate.setReasonCode( "deactivated" );
			}
			
			notifyRequest.addHeader(sstate);
			notifyRequest.setHeader(eventHeader);
			notifyRequest.setHeader(contactHeader);
			// notifyRequest.setHeader(routeHeader);
			ClientTransaction ct = udpProvider.getNewClientTransaction(notifyRequest);

			// Let the other side know that the tx is pending acceptance
			//
			dialog.sendRequest(ct);
			System.out.println("NOTIFY Branch ID " +
				((ViaHeader)request.getHeader(ViaHeader.NAME)).getParameter("branch"));
			System.out.println("Dialog " + dialog);
			System.out.println("Dialog state after pending NOTIFY: " + dialog.getState());
			
			if (isInitial) {
				Thread myEventSource = new Thread(new MyEventSource(this,eventHeader));
				myEventSource.start();
			}
		} catch (Throwable ex) {
			ex.printStackTrace();
			// System.exit(0);
		}
	}

	public synchronized void processResponse(ResponseEvent responseReceivedEvent) {
		Response response = (Response) responseReceivedEvent.getResponse();
		Transaction tid = responseReceivedEvent.getClientTransaction();

		if ( response.getStatusCode() !=  200 ) {
			this.notifyCount --;
		} else {
		    System.out.println("Notify Count = " + this.notifyCount);
		}

	}

	public void processTimeout(javax.sip.TimeoutEvent timeoutEvent) {
		Transaction transaction;
		if (timeoutEvent.isServerTransaction()) {
			transaction = timeoutEvent.getServerTransaction();
		} else {
			transaction = timeoutEvent.getClientTransaction();
		}
		System.out.println("state = " + transaction.getState());
		System.out.println("dialog = " + transaction.getDialog());
		System.out.println("dialogState = "
				+ transaction.getDialog().getState());
		System.out.println("Transaction Time out");
	}
	
    private static void initFactories ( int port ) throws Exception {
    	
		SipFactory sipFactory = SipFactory.getInstance();
		sipFactory.setPathName("gov.nist");
		Properties properties = new Properties();

		properties.setProperty("javax.sip.STACK_NAME", "notifier" + port );
		// You need 16 for logging traces. 32 for debug + traces.
		// Your code will limp at 32 but it is best for debugging.
		properties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "32");
		properties.setProperty("gov.nist.javax.sip.DEBUG_LOG","Xtradedebug_"+port+".txt");
		properties.setProperty("gov.nist.javax.sip.SERVER_LOG","Xtradelog_"+port+".txt");
		properties.setProperty("javax.sip.OUTBOUND_PROXY","192.168.1.99:5070/UDP");
		properties.setProperty("javax.sip.USE_ROUTER_FOR_ALL_URIS", "true");
		properties.setProperty("javax.sip.AUTOMATIC_DIALOG_SUPPORT","ON");
		try {
			// Create SipStack object
			sipStack = sipFactory.createSipStack(properties);
			System.out.println("sipStack = " + sipStack);
		} catch (PeerUnavailableException e) {
			// could not find
			// gov.nist.jain.protocol.ip.sip.SipStackImpl
			// in the classpath
			e.printStackTrace();
			System.err.println(e.getMessage());
			if (e.getCause() != null)
				e.getCause().printStackTrace();
			System.exit(0);
		}

		try {
			headerFactory = sipFactory.createHeaderFactory();
			addressFactory = sipFactory.createAddressFactory();
			messageFactory = sipFactory.createMessageFactory();
		} catch  (Exception ex) {
			ex.printStackTrace();
			System.exit(0);
		}
    }

	public void createProvider() {
		
		try {
			System.out.println("sipStack = " + sipStack);
			System.out.println("SipProviders: "+sipStack.getSipProviders().toString());
			System.out.println("AddressFactory: "+addressFactory.getClass());
			ListeningPoint lp = sipStack.createListeningPoint(this.serverIP, 5070, ListeningPoint.UDP);
			this.udpProvider = sipStack.createSipProvider(lp);
			System.out.println("udp provider " + udpProvider);
			
		}catch(SipException e){
			System.out.print("SipException "+e.getMessage());
			e.printStackTrace();
		}
		/*catch(TransportNotSupportedException e){
			System.out.print("TransportNotSupportedException "+e.getMessage());
		}*/
		catch (InvalidArgumentException e){
			System.out.print("InvalidArgumentException "+e.getMessage());
			e.printStackTrace();
		}
		catch (Exception ex) {
			System.err.println((ex.getMessage()));
			ex.printStackTrace();
			usage();
		}

	}

	public sipClient( int port ) {
		this.port = port;
	}

	public sipClient(){
		
	}

	public static void main(String args[]) throws Exception {
		int port = args.length > 0 ? Integer.parseInt(args[0]) : 5070;
		initFactories( port );
		sipClient st = new sipClient( port );
		st.createProvider();
		st.udpProvider.addSipListener(st);
	}

	public void processIOException(IOExceptionEvent exceptionEvent) {

	}

	public void processTransactionTerminated(
			TransactionTerminatedEvent transactionTerminatedEvent) {

	}

	public void processDialogTerminated(
			DialogTerminatedEvent dialogTerminatedEvent) {
		// TODO Auto-generated method stub

	}

}
1 - 5
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 14 2014
Added on Jun 13 2014
8 comments
6,396 views