2017-10-20 18 views
1

L'instance WSO2 API Manager 2.0.0 s'exécutait correctement jusqu'à ce que l'instance ec2 manque d'espace disque. Une fois le disque effacé et le gestionnaire d'API redémarré, il lance des erreurs en permanence. Il crée des jetons d'accès mais ne peut pas persister/valider.WSO2 API Manager a échoué en raison d'un espace disque insuffisant et ne fonctionne pas après le redémarrage

Détails de l'erreur:

TID: [-1234] [] [2017-10-20 09:43:14,684] INFO {org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO} - Thread pool size for session persistent consumer : 100 {org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO} 
TID: [-1] [] [2017-10-20 09:43:15,495] ERROR {org.wso2.carbon.identity.oauth2.dao.TokenPersistenceTask} - Error occurred while persisting access token :b4f68332-4359-3718-a553-3d908618b1c6 {org.wso2.carbon.identity.oauth2.dao.TokenPersistenceTask} 
org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception: Error when storing the access token for consumer key : _hWq2BEkf1kB2RFSzugOzF04VRsa 
    at org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO.storeAccessToken(TokenMgtDAO.java:291) 
    at org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO.persistAccessToken(TokenMgtDAO.java:343) 
    at org.wso2.carbon.identity.oauth2.dao.TokenPersistenceTask.run(TokenPersistenceTask.java:52) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
    at java.lang.Thread.run(Thread.java:748) 
Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.RuntimeException: rowCount expected 663 got 665 IDN_OAUTH2_ACCESS_TOKEN.PRIMARY_KEY_F"; SQL statement: 
INSERT INTO IDN_OAUTH2_ACCESS_TOKEN (ACCESS_TOKEN, REFRESH_TOKEN, CONSUMER_KEY_ID, AUTHZ_USER, TENANT_ID, USER_DOMAIN, TIME_CREATED, REFRESH_TOKEN_TIME_CREATED, VALIDITY_PERIOD, REFRESH_TOKEN_VALIDITY_PERIOD, TOKEN_SCOPE_HASH, TOKEN_STATE, USER_TYPE, TOKEN_ID, GRANT_TYPE, SUBJECT_IDENTIFIER) SELECT ?,?,ID,?,?,?,?,?,?,?,?,?,?,?,?,? FROM IDN_OAUTH_CONSUMER_APPS WHERE CONSUMER_KEY=? [50000-140] 
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) 
    at org.h2.message.DbException.get(DbException.java:156) 
    at org.h2.message.DbException.convert(DbException.java:279) 
    at org.h2.table.RegularTable.addRow(RegularTable.java:134) 
    at org.h2.command.dml.Insert.insertRows(Insert.java:148) 
    at org.h2.command.dml.Insert.update(Insert.java:82) 
    at org.h2.command.CommandContainer.update(CommandContainer.java:70) 
    at org.h2.command.Command.executeUpdate(Command.java:199) 
    at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:179) 
    at org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO.storeAccessToken(TokenMgtDAO.java:269) 
    ... 5 more 
Caused by: java.lang.RuntimeException: rowCount expected 663 got 665 IDN_OAUTH2_ACCESS_TOKEN.PRIMARY_KEY_F 
    at org.h2.message.DbException.throwInternalError(DbException.java:226) 
    at org.h2.table.RegularTable.checkRowCount(RegularTable.java:144) 
    at org.h2.table.RegularTable.addRow(RegularTable.java:117) 
    ... 11 more 
TID: [-1] [] [2017-10-20 09:43:16,236] INFO {org.wso2.carbon.event.processor.manager.core.internal.CarbonEventManagementService} - Starting polling event receivers {org.wso2.carbon.event.processor.manager.core.internal.CarbonEventManagementService} 
+1

S'il vous plaît lire [Dans quelles circonstances puis-je ajouter "urgent" ou d'autres phrases similaires à ma question, afin d'obtenir des réponses plus rapides?] (// meta.stackoverflow.com/q/326569) - le résumé est que cette Ce n'est pas un moyen idéal de s'adresser aux bénévoles, et il est probablement contreproductif d'obtenir des réponses. Merci de ne pas ajouter ceci à vos questions. – halfer

Répondre

0

On dirait que votre base de données H2 est corrompu. Vous pouvez récupérer ceci en effaçant la base de données H2, mais vous perdrez vos données.

rm -r <APIM_HOME>/repository/database/* 

ensuite commencer à serveur avec -Dsetup

./wso2server.sh -Dsetup 

Cela va créer la base de données de H2 à nouveau.

La recommandation de WSO2 est de ne pas utiliser H2 dans la production pour cette raison exacte (c'est-à-dire la nature corruptible des bases de données H2).

+0

Merci pour la réponse. Avant d'essayer cela, j'espérais une solution pour récupérer les données. – RSN

+0

Vous pouvez essayer de vous connecter à la base de données et de sauvegarder les données. http://www.h2database.com/html/quickstart.html#h2_console – Bee