Service Virtualization

Expand all | Collapse all

DevTest remote VSE configuration

  • 1.  DevTest remote VSE configuration

    Posted 10-05-2018 04:50 AM

    Hi tribe,

    anyone knows the procedure to configure a VSE on a machine different from the registry?

    It seems to be not documented.

     

    Thanks,

     

    Domenico



  • 2.  Re: DevTest remote VSE configuration

    Broadcom Employee
    Posted 10-05-2018 07:31 AM

    Hi Domenico --

     

    Do a standard server installation.

     

    Run the command "VirtualServiceEnvironment --help"

     

    One of the command line arguments is "-m" for the Registry connection. There are other command line options you might want, such as -n for naming your VSE.

     

    So, run this:

    VirtualServiceEnvironment -m tcp://registryServerHostName:2010/Registry -n uniqueNameForThisVSE

     

    This will connect the VSE to the specified registry instance.

     

    When it connects, DEVTEST_HOME/site.properties will be overwritten with the file of the same name from the Registry machine. In this way, it's using the same database configuration.

     

    When you're happy with how it connects, make a batch / shell script to run the whole command line. If you're interested in making run as a Windows service, you'll need to find that service launcher in your Windows configuration and add the command line options.

     

    Rick



  • 3.  Re: DevTest remote VSE configuration

    Broadcom Employee
    Posted 10-05-2018 09:09 AM

    Documentation at SV Installation and Configuration - DevTest Solutions - 10.3 - CA Technologies Documentation  will also provide information on configuring remote VSE. 

     

    See the 3rd point under "Configure CA Service Virtualization"



  • 4.  Re: DevTest remote VSE configuration

    Broadcom Employee
    Posted 10-05-2018 09:24 AM

    On the VSE server you add this in the VirtualServiceEnvironmentService.vmoptions file:

     

    -Xms1024M
    -Xmx2048M
    -Dlisa.vseName=tcp://VSEHostname:2013/VSE_1

    -Dlisa.registryName=tcp://RegistryHostname:2010/Registry

     

    Restart the VSE Service.  



  • 5.  Re: DevTest remote VSE configuration

    Posted 10-05-2018 09:44 AM

    Thank you all for your support!

    Applying the configs you suggested, i have the following error...it seems that the VSE is not able to connect the registry database.

    Any advice? Thanks!!!

     

    Creating a virtual service environment:
    ... VSE Server name: tcp://SSRVVAS02V:2013/VSEDEV
    ..... Registry name: tcp://10.195.189.214:2010/Registry
    There is no rules.properties and rules.xml file. No custom rules loaded.
    No custom rules loaded from E:\CA\rules.xml
    [DevTest AGENT:C][WARN][11432][1][main][Oct 4, 2018 4:45:45 PM] Could not establ
    ish connection to Agent broker at tcp://localhost:2009?daemon=true
    Cannot start virtual service environment.
    java.lang.RuntimeException: Connection to the registry database cannot be establ
    ished. Please make sure the database is running and the credential used to conn
    ect to database is valid.
    at com.itko.lisa.utils.JpaUtil$2.run(JpaUtil.java:1678)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002]
    (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence
    .exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Connections could not be acquired fro
    m the underlying database!
    Error Code: 0
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(En
    tityManagerSetupImpl.java:517)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.get
    DatabaseSession(EntityManagerFactoryDelegate.java:188)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.cre
    ateEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createE
    ntityManagerImpl(EntityManagerFactoryImpl.java:294)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createE
    ntityManager(EntityManagerFactoryImpl.java:272)
    at com.itko.lisa.utils.JpaUtil.getEm(JpaUtil.java:1456)
    at com.itko.lisa.utils.JpaUtil$2.run(JpaUtil.java:1668)
    ... 1 more
    Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v2
    0111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Connections could not be acquired fro
    m the underlying database!
    Error Code: 0
    at org.eclipse.persistence.exceptions.DatabaseException.sqlException(Dat
    abaseException.java:309)
    at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.
    java:135)
    at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(
    DatasourceLogin.java:162)
    at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.co
    nnectInternal(DatasourceAccessor.java:330)
    at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.conn
    ectInternal(DatabaseAccessor.java:293)
    at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.co
    nnect(DatasourceAccessor.java:418)
    at org.eclipse.persistence.sessions.server.ConnectionPool.buildConnectio
    n(ConnectionPool.java:216)
    at org.eclipse.persistence.sessions.server.ExternalConnectionPool.startU
    p(ExternalConnectionPool.java:146)
    at org.eclipse.persistence.sessions.server.ServerSession.connect(ServerS
    ession.java:484)
    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(D
    atabaseSessionImpl.java:633)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.log
    in(EntityManagerFactoryProvider.java:208)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(En
    tityManagerSetupImpl.java:488)
    ... 7 more
    Caused by: java.sql.SQLException: Connections could not be acquired from the und
    erlying database!
    at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConne
    ction(C3P0PooledConnectionPool.java:690)
    at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(A
    bstractPoolBackedDataSource.java:140)
    at com.itko.lisa.utils.db.LisaWrappedDataSource.getConnection(LisaWrappe
    dDataSource.java:38)
    at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.
    java:123)
    ... 17 more
    Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A Resourc
    ePool could not acquire a resource from its primary factory or source.
    at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicRes
    ourcePool.java:1463)
    at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(
    BasicResourcePool.java:639)
    at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicR
    esourcePool.java:549)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConn
    ectionInUse(C3P0PooledConnectionPool.java:756)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConne
    ction(C3P0PooledConnectionPool.java:683)
    ... 20 more



  • 6.  Re: DevTest remote VSE configuration

    Broadcom Employee
    Posted 10-05-2018 09:48 AM

    Looks like you have issues connecting to the Registry's database.  What Database are you using?   is it MySQL  or MSSQL? 

     

    ava.lang.RuntimeException: Connection to the registry database cannot be establ
    ished. Please make sure the database is running and the credential used to conn
    ect to database is valid.



  • 7.  Re: DevTest remote VSE configuration

    Posted 10-05-2018 09:54 AM

    it is MSSQL.

    i have another VSE running on the same registry machine without any issues.

    Remote VSE machine can access via telnet the registry port.

     

    Thanks.

    Domenico



  • 8.  Re: DevTest remote VSE configuration

    Broadcom Employee
    Posted 10-05-2018 10:42 AM

    What's in DEVTEST_HOME/site.properties? If it references "localhost" for the hostname of the database server, then all components running on the same machine will be ok, but all remote connections will fail.



  • 9.  Re: DevTest remote VSE configuration

    Broadcom Employee
    Posted 10-06-2018 03:04 AM

    Hi Domenico,

     

    The remote VSE will establish its own connection with the DB. So, to verify connectivity you would need to see if from the remote VSE server you can access via telnet the MSSQL server and MSSQL port.

     

    Cheers,

    Danny