Push Notification doesnt work in a liberty profile

2019-03-05 22:40发布

问题:

Im trying to send a push to a android device from this configuration: MobileFirst 6.3.0.00-20150404-1503 in libery profile: WebSphere Application Server 8.5.5.4 (wlp-1.0.7.cl50420141121-1414)

The user logs correctly to the realm and the suscription to the push was successful in the eclipse development and in our liberty customer edition, when i execute a push to a user in my development server does work, but in our customer edition server doesnt (even if he apears as suscribed).

im getting a:

[4/22/15 17:18:22:163 ART] 000000ab com.worklight.gadgets.serving.ClientConfigProfileServlet W
com.worklight.core.messages:could not piggyback configprofile due to invalid or incomplete headers sent from client

Here are the logs:

console.log

Launching Liberty_Server_Test (WebSphere Application Server 8.5.5.4/wlp-1.0.7.cl50420141121-1414) on OpenJDK 64-Bit Server VM, version 1.7.0_09-icedtea-mockbuild_2013_01_15_04_12-b00 (en_US)
[AUDIT   ] CWWKE0001I: The server Liberty_Server_Test has been launched.
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications. 
[WARNING ] SRVE9967W: The manifest class path jaxb-api.jar can not be found in jar file wsjar:file:/d01/IBM/WebSphere/Liberty/usr/servers/Liberty_Server_Test/apps/worklightconsole.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path activation.jar can not be found in jar file wsjar:file:/d01/IBM/WebSphere/Liberty/usr/servers/Liberty_Server_Test/apps/worklightconsole.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jsr173_1.0_api.jar can not be found in jar file wsjar:file:/d01/IBM/WebSphere/Liberty/usr/servers/Liberty_Server_Test/apps/worklightconsole.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jaxb1-impl.jar can not be found in jar file wsjar:file:/d01/IBM/WebSphere/Liberty/usr/servers/Liberty_Server_Test/apps/worklightconsole.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jaxb-api.jar can not be found in jar file wsjar:file:/d01/IBM/WebSphere/Liberty/usr/servers/Liberty_Server_Test/apps/worklightconsole.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path activation.jar can not be found in jar file wsjar:file:/d01/IBM/WebSphere/Liberty/usr/servers/Liberty_Server_Test/apps/worklightconsole.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jsr173_1.0_api.jar can not be found in jar file wsjar:file:/d01/IBM/WebSphere/Liberty/usr/servers/Liberty_Server_Test/apps/worklightconsole.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jaxb1-impl.jar can not be found in jar file wsjar:file:/d01/IBM/WebSphere/Liberty/usr/servers/Liberty_Server_Test/apps/worklightconsole.war!/WEB-INF/lib/jaxb-impl-2.1.12.osgi.jar or its parent.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://mobile02.cuyanas.com.ar:9083/appcenterconsole/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://mobile02.cuyanas.com.ar:9083/worklight/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://mobile02.cuyanas.com.ar:9083/NevadaProject/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://mobile02.cuyanas.com.ar:9083/IBMJMXConnectorREST/
[WARNING ] SRVE9967W: The manifest class path jaxb-api.jar can not be found in jar file wsjar:file:/d01/IBM/WebSphere/Liberty/usr/servers/Liberty_Server_Test/apps/applicationcenter.war!/WEB-INF/lib/ibm_web20_jaxb-1.0.2.0-20110217.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jaxb-impl.jar can not be found in jar file wsjar:file:/d01/IBM/WebSphere/Liberty/usr/servers/Liberty_Server_Test/apps/applicationcenter.war!/WEB-INF/lib/ibm_web20_jaxb-1.0.2.0-20110217.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jsr173_1.0_api.jar can not be found in jar file wsjar:file:/d01/IBM/WebSphere/Liberty/usr/servers/Liberty_Server_Test/apps/applicationcenter.war!/WEB-INF/lib/ibm_web20_jaxb-1.0.2.0-20110217.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path activation.jar can not be found in jar file wsjar:file:/d01/IBM/WebSphere/Liberty/usr/servers/Liberty_Server_Test/apps/applicationcenter.war!/WEB-INF/lib/ibm_web20_jaxb-1.0.2.0-20110217.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jaxb-api.jar can not be found in jar file wsjar:file:/d01/IBM/WebSphere/Liberty/usr/servers/Liberty_Server_Test/apps/applicationcenter.war!/WEB-INF/lib/ibm_web20_jaxb-1.0.2.0-20110217.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jaxb-impl.jar can not be found in jar file wsjar:file:/d01/IBM/WebSphere/Liberty/usr/servers/Liberty_Server_Test/apps/applicationcenter.war!/WEB-INF/lib/ibm_web20_jaxb-1.0.2.0-20110217.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path jsr173_1.0_api.jar can not be found in jar file wsjar:file:/d01/IBM/WebSphere/Liberty/usr/servers/Liberty_Server_Test/apps/applicationcenter.war!/WEB-INF/lib/ibm_web20_jaxb-1.0.2.0-20110217.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path activation.jar can not be found in jar file wsjar:file:/d01/IBM/WebSphere/Liberty/usr/servers/Liberty_Server_Test/apps/applicationcenter.war!/WEB-INF/lib/ibm_web20_jaxb-1.0.2.0-20110217.jar or its parent.
[AUDIT   ] CWWKZ0001I: Application appcenterconsole started in 0.835 seconds.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://mobile02.cuyanas.com.ar:9083/worklightconsole/
[AUDIT   ] CWWKZ0001I: Application worklightconsole started in 3.358 seconds.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://mobile02.cuyanas.com.ar:9083/applicationcenter/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://mobile02.cuyanas.com.ar:9083/wladmin/
[WARNING ] CWNEN0070W: The javax.ws.rs.HeaderParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.QueryParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.core.Context annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.PathParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.CookieParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.MatrixParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.HeaderParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.QueryParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.core.Context annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.PathParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.CookieParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.MatrixParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[err] dataBaseFromDataSource=true
[err] dataBaseUrl=jdbc:oracle:thin:@mobile02.cuyanas.com.ar:1521:mfdbtest
[err] dataBaseDriver=Oracle JDBC driver
[err] dataBaseDriverVersion=11.2
[err] dataBaseProduct=Oracle
[err] dataBaseVersion=Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[err] dataBaseUser=APPCENTER
[err] 23  WorklightPU  WARN   [LargeThreadPool-thread-12] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'WorklightPU', root URL [file:/d01/IBM/WebSphere/Liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transformation will not be available.
[err] 25  WorklightPU  WARN   [LargeThreadPool-thread-16] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'WorklightPU', root URL [file:/d01/IBM/WebSphere/Liberty/usr/shared/resources/NevadaProject/lib/worklight-jee-library.jar]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transformation will not be available.
[err] 104  appcenterdb-oracle  INFO   [LargeThreadPool-thread-14] openjpa.Runtime - Starting OpenJPA 1.2.2
[err] 198  appcenterdb-oracle  INFO   [LargeThreadPool-thread-14] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.OracleDictionary".
[err] 50  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-15] openjpa.Runtime - Starting OpenJPA 1.2.2
[err] 146  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-15] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.OracleDictionary".
[err] 742  WorklightPU  INFO   [LargeThreadPool-thread-12] openjpa.Runtime - Starting OpenJPA 1.2.2
[err] 749  WorklightPU  INFO   [LargeThreadPool-thread-16] openjpa.Runtime - Starting OpenJPA 1.2.2
[err] 784  WorklightPU  INFO   [LargeThreadPool-thread-12] openjpa.jdbc.JDBC - Using dictionary class "com.worklight.database.WorklightOracleDictionary".
[err] 795  WorklightPU  INFO   [LargeThreadPool-thread-16] openjpa.jdbc.JDBC - Using dictionary class "com.worklight.database.WorklightOracleDictionary".
[err] 1031  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-15] openjpa.Runtime - Though you are using optimistic transactions, OpenJPA is now beginning a datastore transaction because you have requested a lock on some data.
[err] 1061  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-15] openjpa.Runtime - Though you are using optimistic transactions, OpenJPA is now beginning a datastore transaction because you have requested a lock on some data.
[err] 1077  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-15] openjpa.Runtime - Though you are using optimistic transactions, OpenJPA is now beginning a datastore transaction because you have requested a lock on some data.
[AUDIT   ] CWWKZ0001I: Application applicationcenter started in 7.194 seconds.
[AUDIT   ] CWWKZ0001I: Application wladmin started in 7.365 seconds.
[err] 0  WorklightReportsPU  WARN   [LargeThreadPool-thread-16] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'WorklightReportsPU', root URL [file:/d01/IBM/WebSphere/Liberty/usr/shared/resources/NevadaProject/lib/worklight-jee-library.jar]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transformation will not be available.
[err] 0  WorklightReportsPU  WARN   [LargeThreadPool-thread-12] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'WorklightReportsPU', root URL [file:/d01/IBM/WebSphere/Liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transformation will not be available.
[err] 3457  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-50] openjpa.Runtime - Starting OpenJPA 1.2.2
[err] 3459  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-50] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.OracleDictionary".
[err] 3577  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-51] openjpa.Runtime - Though you are using optimistic transactions, OpenJPA is now beginning a datastore transaction because you have requested a lock on some data.
[err] 3595  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-51] openjpa.Runtime - Though you are using optimistic transactions, OpenJPA is now beginning a datastore transaction because you have requested a lock on some data.
[err] 3631  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-50] openjpa.Runtime - Though you are using optimistic transactions, OpenJPA is now beginning a datastore transaction because you have requested a lock on some data.
[err] 3657  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-50] openjpa.Runtime - Though you are using optimistic transactions, OpenJPA is now beginning a datastore transaction because you have requested a lock on some data.
[err] 3731  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-53] openjpa.Runtime - Though you are using optimistic transactions, OpenJPA is now beginning a datastore transaction because you have requested a lock on some data.
[err] 4143  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-55] openjpa.Runtime - Starting OpenJPA 1.2.2
[err] 4144  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-55] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.OracleDictionary".
[AUDIT   ] CWWKZ0001I: Application worklight started in 9.893 seconds.
[err] 5600  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-69] openjpa.Runtime - Though you are using optimistic transactions, OpenJPA is now beginning a datastore transaction because you have requested a lock on some data.
[AUDIT   ] CWWKZ0001I: Application NevadaProject started in 11.739 seconds.
[AUDIT   ] CWWKF0011I: The server Liberty_Server_Test is ready to run a smarter planet.
[err] java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key could not piggyback configprofile due to invalid or incomplete headers sent from client
[err]   at java.util.ResourceBundle.getObject(ResourceBundle.java:393)
[err]   at java.util.ResourceBundle.getString(ResourceBundle.java:353)
[err]   at com.worklight.common.i18n.MessageFormatter.format(MessageFormatter.java:111)
[err]   at com.worklight.common.i18n.MessageFormatter.format(MessageFormatter.java:89)
[err]   at com.worklight.common.log.WorklightServerLogger.warn(WorklightServerLogger.java:64)
[err]   at com.worklight.gadgets.serving.ClientConfigProfileServlet.piggybackConfigProfile(ClientConfigProfileServlet.java:238)
[err]   at com.worklight.gadgets.serving.InvokeProcServlet.service(InvokeProcServlet.java:82)
[err]   at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
[err]   at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1275)
[err]   at [internal classes]
[err]   at com.worklight.core.auth.impl.AuthenticationFilter$1.execute(AuthenticationFilter.java:217)
[err]   at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:76)
[err]   at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:222)
[err]   at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192)
[err]   at [internal classes]
[err]   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[err]   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[err]   at java.lang.Thread.run(Thread.java:722)
[WARNING ] com.worklight.core.messages:could not piggyback configprofile due to invalid or incomplete headers sent from client
[err] 496359  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-201] openjpa.Runtime - Starting OpenJPA 1.2.2
[err] 496360  WorklightManagementPU-oracle  INFO   [LargeThreadPool-thread-201] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.OracleDictionary".
[err] java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key could not piggyback configprofile due to invalid or incomplete headers sent from client
[err]   at java.util.ResourceBundle.getObject(ResourceBundle.java:393)
[err]   at java.util.ResourceBundle.getString(ResourceBundle.java:353)
[err]   at com.worklight.common.i18n.MessageFormatter.format(MessageFormatter.java:111)
[err]   at com.worklight.common.i18n.MessageFormatter.format(MessageFormatter.java:89)
[err]   at com.worklight.common.log.WorklightServerLogger.warn(WorklightServerLogger.java:64)
[err]   at com.worklight.gadgets.serving.ClientConfigProfileServlet.piggybackConfigProfile(ClientConfigProfileServlet.java:238)
[err]   at com.worklight.gadgets.serving.InvokeProcServlet.service(InvokeProcServlet.java:82)
[err]   at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
[err]   at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1275)
[err]   at [internal classes]
[err]   at com.worklight.core.auth.impl.AuthenticationFilter$1.execute(AuthenticationFilter.java:217)
[err]   at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:76)
[err]   at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:222)
[err]   at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192)
[err]   at [internal classes]
[err]   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[err]   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[err]   at java.lang.Thread.run(Thread.java:722)
[WARNING ] com.worklight.core.messages:could not piggyback configprofile due to invalid or incomplete headers sent from client
[WARNING ] logout

console.log

messages.log

any help?

回答1:

The error you've mentioned is not related to push notifications. You have in fact another error in the logs but it too is not related. Another interesting log, which is missing in the question is the LogCat log (device log).

I would say that the issue here is network-related. Make sure that you have opened all ports and addresses required for GCM, for both incoming and outgoing connections for GCM: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-6-3/notifications/push-notifications-hybrid-applications/#projectSetupAndGuidelines