0

I am trying WSO2 API Manager 2.0 and failed to start the server. Would you like give a hand? Thanks a lot Michael

Below is the version information.

[wso2@srv11 bin]$ ./wso2server.sh --version

WSO2 API Manager v2.0.0  
WSO2 Carbon Framework v4.4.7

But when I start the API Manager with "wso2server.sh --start" command, I found following error information in wso2carbon.log.

ID: [-1234] [] [2016-08-15 09:48:32,824]  INFO {org.wso2.andes.server.security.auth.manager.PrincipalDatabaseAuthenticationManager} -  Initialised PLAIN SASL provider successfully {org.wso2.andes.server.security.auth.manager.PrincipalDatabaseAuthenticationManager}
TID: [-1234] [] [2016-08-15 09:48:32,825]  INFO {org.wso2.andes.server.security.auth.manager.PrincipalDatabaseAuthenticationManager} -  Additional SASL providers successfully registered. {org.wso2.andes.server.security.auth.manager.PrincipalDatabaseAuthenticationManager}
TID: [-1234] [] [2016-08-15 09:48:32,825]  INFO {org.wso2.andes.server.security.auth.manager.PrincipalDatabaseAuthenticationManager} -  Registering UserManagementMBean {org.wso2.andes.server.security.auth.manager.PrincipalDatabaseAuthenticationManager}
TID: [-1] [] [2016-08-15 09:48:35,634]  WARN {java.util.prefs.FileSystemPreferences} -  Could not lock System prefs. Unix error code 32577. {java.util.prefs.FileSystemPreferences}
TID: [-1] [] [2016-08-15 09:48:35,635]  WARN {java.util.prefs.FileSystemPreferences} -  Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock. {java.util.prefs.FileSystemPreferences}
TID: [-1] [] [2016-08-15 09:48:52,850]  WARN {org.wso2.carbon.apimgt.gateway.throttling.util.KeyTemplateRetriever} -  Failed retrieving throttling data from remote endpoint: Connection refused. Retrying after 15 seconds... {org.wso2.carbon.apimgt.gateway.throttling.util.KeyTemplateRetriever}
TID: [-1] [] [2016-08-15 09:48:52,862]  WARN {org.wso2.carbon.apimgt.gateway.throttling.util.BlockingConditionRetriever} -  Failed retrieving Blocking Conditions from remote endpoint: Connection refused. Retrying after 15 seconds... {org.wso2.carbon.apimgt.gateway.throttling.util.BlockingConditionRetriever}
TID: [-1] [] [2016-08-15 09:48:53,073]  WARN {org.wso2.carbon.application.deployer.internal.AppDeployerServiceComponent} -  Waiting for required OSGi services: org.wso2.carbon.application.deployer.synapse.service.SynapseAppDeployerService, {org.wso2.carbon.application.deployer.internal.AppDeployerServiceComponent}
TID: [-1] [] [2016-08-15 09:48:53,092]  WARN {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  Waiting for required OSGi services: org.wso2.carbon.application.deployer.service.CappDeploymentService,org.wso2.carbon.server.admin.common.IServerAdmin,org.wso2.carbon.throttling.agent.ThrottlingAgent, {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent}
TID: [-1] [] [2016-08-15 09:49:05,628]  WARN {java.util.prefs.FileSystemPreferences} -  Could not lock System prefs. Unix error code 32577. {java.util.prefs.FileSystemPreferences}
TID: [-1] [] [2016-08-15 09:49:05,628]  WARN {java.util.prefs.FileSystemPreferences} -  Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock. {java.util.prefs.FileSystemPreferences}
TID: [-1] [] [2016-08-15 09:49:07,854]  WARN {org.wso2.carbon.apimgt.gateway.throttling.util.KeyTemplateRetriever} -  Failed retrieving throttling data from remote endpoint: Connection refused. Retrying after 15 seconds... {org.wso2.carbon.apimgt.gateway.throttling.util.KeyTemplateRetriever}
TID: [-1] [] [2016-08-15 09:49:07,865]  WARN {org.wso2.carbon.apimgt.gateway.throttling.util.BlockingConditionRetriever} -  Failed retrieving Blocking Conditions from remote endpoint: Connection refused. Retrying after 15 seconds... {org.wso2.carbon.apimgt.gateway.throttling.util.BlockingConditionRetriever}
TID: [-1] [] [2016-08-15 09:49:24,583]  WARN {org.wso2.carbon.apimgt.gateway.throttling.util.KeyTemplateRetriever} -  Failed retrieving throttling data from remote endpoint: Connection refused. Retrying after 15 seconds... {org.wso2.carbon.apimgt.gateway.throttling.util.KeyTemplateRetriever}
TID: [-1] [] [2016-08-15 09:49:24,593]  WARN {org.wso2.carbon.apimgt.gateway.throttling.util.BlockingConditionRetriever} -  Failed retrieving Blocking Conditions from remote endpoint: Connection refused. Retrying after 15 seconds... {org.wso2.carbon.apimgt.gateway.throttling.util.BlockingConditionRetriever}
Kirween
  • 1,472
  • 1
  • 19
  • 24
  • I've seen similar issues due to jdk issues. For example, when you have 2 JDKs installed, and paths to bin and HOME are not given properly etc. Can you check that? What is you JDK? – Bee Aug 15 '16 at 02:14

2 Answers2

1

This warning could occur due to Java Preferences subsystem not being able to write to the directory /etc/.java/.systemPrefs. Can you verify that the the directory /etc/.java/.systemPrefs exist in your system? If it exists, is it writable for the user running the JVM instance? If not please provide permission and restart APIM.

If the above does not work you can also try the below workaround.

1) Create a directory in a place accessible to the user running the JVM and have the following substructure. /.java/.systemPrefs

2) Start WSO2 APIM server with the Java option -Djava.util.prefs.systemRoot=<CREATED_DIR>/.java

jdk1.7
  • 166
  • 1
  • 9
0

Regarding the blocking conditions exception

TID: [-1] [] [2016-08-19 17:33:32,455]  WARN {org.wso2.carbon.apimgt.gateway.throttling.util.BlockingConditionRetriever} -  Failed retrieving Blocking Conditions from remote endpoint: Connection refused. Retrying after 15 seconds... {org.wso2.carbon.apimgt.gateway.throttling.util.BlockingConditionRetriever}

This only appears for me with a clustered deployment [x1 publisher, x1 store, x1 gateway manager, x2 gateway worker]. The issue does not manifest with standalone setup.

I have tried setting up a traffic manager (tm) node and pointing the gateway and publisher nodes at the tm node (https://docs.wso2.com/display/CLUSTER44x/Clustering+API+Manager+2.0.0) however this does not resolve the issue.

I assume that, following applying the java system preferences fix, you are still encountering the blocking condition warnings, but no longer the Unix file lock exceptions ?

Abimaran Kugathasan
  • 31,165
  • 11
  • 75
  • 105
Simon Trimboy
  • 61
  • 1
  • 5