cancel
Showing results for 
Search instead for 
Did you mean: 

Server down after deploying Repository Service

Former Member
0 Kudos

Hi,

I am trying to play around with repository services.

I created a repository service and then added it to a repository manager.

Now when I try to restart the EP server, it reaches max mem level, shows CPU usage as 100%, does not come up.

Could it be due to the repository service that I have written, I am thinking by mistake i might have an infinite loop in it.

Here is a section of code for repository service -

protected void startUpImpl(Collection repositoryManagers)

throws ConfigurationException, StartupException {

/*

try {

}

catch (Exception e) {

throw new StartupException(e.getMessage(), e);

}

*/

this.repositoryManagers = repositoryManagers;

Iterator it = repositoryManagers.iterator();

while (it.hasNext())

{

try {

if (it.toString().equals("/demo"))

addRepositoryAssignment((IRepositoryManager) it.next());

} catch (ServiceNotAvailableException e)

{

e.printStackTrace();

}

}

}

Can anyone please help me with it.

Any hints will be helpfull.

Thanks,

Vivek

Accepted Solutions (1)

Accepted Solutions (1)

detlev_beutner
Active Contributor
0 Kudos

Hi Vivek,

please use the CODE marker of the SDN editor to mark code and make it much more readable - see below.

while (it.hasNext()) {
  try {
    if (it.toString().equals("/demo"))
      addRepositoryAssignment((IRepositoryManager) it.next());
  } catch (ServiceNotAvailableException e) {
    e.printStackTrace();
  }
}

The problem is that the condition is never fulfilled (<i>it</i> is the iterator, not an entry of that) and with that, the loop is infinite (<i>it</i> always <i>hasNext</i> for <i>next()</i> gets never called).

Just delete the <i>if</i> statement, it makes no sense (you can assign the repository service only to the <i>/demo</i> repository by configuration).

Hope it helps

Detlev

Former Member
0 Kudos

Hi Detlev,

Thanks for the help.

The problem is that after assigning the service to the repository manager, I tried to restart the server.

The EP server is not coming up now, it says that the CPU usage is 100%.

I cannot deploy the changed code of the repository service without the server being up.

Can you please let me know how can I move forward.

Many thanks,

Vivek

Former Member
0 Kudos

Not sure with your version of the portal, but I believe that you can copy your par file directly to the portal's PCD.

Do a search for your par filename with the extension ".bak" on the portal server and copy your new par to the same location and remove ".bak" version.

When you next start the portal, it will should load the new version.

Former Member
0 Kudos

Hi Victor,

I am on EP6 SP14.

I will try doing it and get back to you.

Thanks,

Vivek

Former Member
0 Kudos

Thank you very much Victor.

It really worked.

Regards,

Vivek

Former Member
0 Kudos

Glad I could help.

Answers (0)