Bug #23679
closedHTTP 500 error while publishing in GRSF PRE
Added by Yannis Marketakis almost 3 years ago. Updated over 2 years ago.
100%
Description
The following error occurs while publishing/updating records in GRSF PRE VRE
Method failed: HTTP/1.1 500 ; Response body: {"id":null,"knowledge_base_id":null,"product_url":null,"error":"Sorry but there was not possible to retrieve your fullname/email!"}
Files
5b2b0e53-1804-3faf-957d-ff23b8c17844.json (6.62 KB) 5b2b0e53-1804-3faf-957d-ff23b8c17844.json | Yannis Marketakis, Jul 26, 2022 09:07 AM | ||
5b2b0e53-1804-3faf-957d-ff23b8c17844_for_update.json (6.66 KB) 5b2b0e53-1804-3faf-957d-ff23b8c17844_for_update.json | Yannis Marketakis, Jul 27, 2022 08:39 AM | ||
81284707-a2e9-3ad6-910f-ce99c8967ef7.json (2.75 KB) 81284707-a2e9-3ad6-910f-ce99c8967ef7.json | Yannis Marketakis, Sep 02, 2022 09:35 AM | ||
81284707-a2e9-3ad6-910f-ce99c8967ef7.log (764 Bytes) 81284707-a2e9-3ad6-910f-ce99c8967ef7.log | Yannis Marketakis, Sep 02, 2022 09:36 AM |
Related issues
Updated by Luca Frosini almost 3 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
A few days ago we have experienced some issues with the service used to retrieve such information.
Now the issue should be resolved.
Can you please try again?
Updated by Yannis Marketakis almost 3 years ago
- File 5b2b0e53-1804-3faf-957d-ff23b8c17844.json 5b2b0e53-1804-3faf-957d-ff23b8c17844.json added
- Status changed from Feedback to In Progress
- % Done changed from 100 to 90
Hi @luca.frosini@isti.cnr.it
I just tried updating https://data.d4science.org/ctlg/GRSF_Pre/5b2b0e53-1804-3faf-957d-ff23b8c17844 but the problem persists.
Attached you will find the json representation of the object I'm trying to update
Updated by Luca Frosini almost 3 years ago
- Assignee changed from Luca Frosini to Massimiliano Assante
I found your request and you are right you get the error you mention.
2022-07-26 13:12:10,212 [catalina-exec-24] INFO RequestAccounting: REQUEST START ON GRSFPublisher:Data-Catalogue(POST /rest/grsf/stock/update-product) CALLED FROM grsf.publisher@139.91.183.81 IN SCOPE /d4science.research-infrastructures.eu/FARM/GRSF_Pre
2022-07-26 13:12:10,693 [catalina-exec-24] ERROR HelperMethods: error while performing get method java.lang.RuntimeException: Failed : HTTP error code : 500
2022-07-26 13:12:10,889 [catalina-exec-24] ERROR HelperMethods: error while performing get method java.lang.RuntimeException: Failed : HTTP error code : 500
2022-07-26 13:12:10,889 [catalina-exec-24] ERROR GrsfPublisherStockService: Failed to update stock record
java.lang.Exception: Sorry but there was not possible to retrieve your fullname/email!
at org.gcube.data_catalogue.grsf_publish_ws.services.GrsfPublisherStockService.updateStock(GrsfPublisherStockService.java:421)
at sun.reflect.GeneratedMethodAccessor439.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.gcube.smartgears.managers.RequestManager.doFilter(RequestManager.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:679)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
To try to understand the issue, I just tried to update the record using the same token
POST https://smart-grsfpre.d4science.org/grsf-publisher-ws/rest/GRSF/stock/update-product
As body of the request I sent the JSON you attached to this ticket.
With this call I get another error:
2022-07-26 16:59:08,716 [catalina-exec-30] INFO RequestAccounting: REQUEST START ON GRSFPublisher:Data-Catalogue(POST /rest/GRSF/stock/update-product) CALLED FROM grsf.publisher@146.48.122.49 IN SCOPE /d4science.research-infrastructures.eu/FARM/GRSF_Pre
2022-07-26 16:59:08,799 [catalina-exec-30] ERROR GrsfPublisherStockService: Failed to update stock record
java.lang.Exception: Please specify the 'catalog_id' property
This is the repsons I get form the service:
{
"id": null,
"knowledge_base_id": null,
"product_url": null,
"error": "Please specify the 'catalog_id' property"
}
I think I'm not sending the same content you send with your request because my error is raised before the error you get in code.
Can you please provide it to me?
@massimiliano.assante@isti.cnr.it the error got from @marketak@ics.forth.gr is related to social service which performs the following request:
SOCIAL_SERVICE_URL/users/getUserEmail?gcube-token=XXXX
Updated by Yannis Marketakis almost 3 years ago
- File 5b2b0e53-1804-3faf-957d-ff23b8c17844_for_update.json 5b2b0e53-1804-3faf-957d-ff23b8c17844_for_update.json added
Hi @luca.frosini@isti.cnr.it
Thanks for investigating this.
You are right that the provided content is not for updating, but for publishing (because it missies the catalog_id).
Attached you will find the contents for updating the record
Both publishing and updating raise the same HTTP500 error
Updated by Massimiliano Assante almost 3 years ago
- Assignee changed from Massimiliano Assante to Luca Frosini
Luca the method you are using to get the email was deprecated many releases ago and removed in this version. In fact it should respond "This method is deprecated, must use version 2";
so you should update your code to https://api.d4science.org/social-networking-library-ws/docs/resource_Users_v2.html#resource_Users_v2_getUserEmail_GET
Updated by Luca Frosini over 2 years ago
- % Done changed from 90 to 10
I'm going to use the new client.
Updated by Luca Frosini over 2 years ago
- % Done changed from 10 to 90
I have migrated the requests using the client
Updated by Luca Frosini over 2 years ago
- Status changed from In Progress to Feedback
- Assignee changed from Luca Frosini to Roberto Cirillo
@roberto.cirillo@isti.cnr.it can you please upgrade the service?
Updated by Roberto Cirillo over 2 years ago
- Assignee changed from Roberto Cirillo to Luca Frosini
@luca.frosini@isti.cnr.it, please, could you specify the service version?
Are you talking about preproduction or production environment?
Updated by Luca Frosini over 2 years ago
Preproduction environment.
The version is: 1.13.2-SNAPSHO
Updated by Roberto Cirillo over 2 years ago
Luca Frosini wrote in #note-10:
Preproduction environment.
The version is: 1.13.2-SNAPSHO
Done. The service is up and runnning
Updated by Yannis Marketakis over 2 years ago
Should I change something on my side?
I still experience the same error using https://smart-grsfpre.d4science.org/grsf-publisher-ws/rest
2022-08-23 13:37:17 ERROR gr.forth.ics.isl.grsfservicescore.GrsfPublisher.updateRecord(GrsfPublisher.java:160) - Fatal transport error: java.lang.Exception: Method failed: HTTP/1.1 500 ; Response body: {"id":null,"knowledge_base_id":null,"product_url":null,"error":"Sorry but there was not possible to retrieve your fullname/email!"} at gr.forth.ics.isl.grsfservicescore.GrsfPublisher.updateRecord(GrsfPublisher.java:152) [classes/:?] at gr.forth.ics.isl.grsfservicescore.clients.UpdateClient.updateRecords(UpdateClient.java:807) [classes/:?] at gr.forth.ics.isl.grsfservicescore.clients.UpdateClient.updateGrsfStock(UpdateClient.java:334) [classes/:?] at gr.forth.ics.isl.grsfservicescore.clients.UpdateClient.main(UpdateClient.java:987) [classes/:?]
Updated by Luca Frosini over 2 years ago
Yannis Marketakis wrote in #note-12:
Should I change something on my side?
I still experience the same error using https://smart-grsfpre.d4science.org/grsf-publisher-ws/rest2022-08-23 13:37:17 ERROR gr.forth.ics.isl.grsfservicescore.GrsfPublisher.updateRecord(GrsfPublisher.java:160) - Fatal transport error: java.lang.Exception: Method failed: HTTP/1.1 500 ; Response body: {"id":null,"knowledge_base_id":null,"product_url":null,"error":"Sorry but there was not possible to retrieve your fullname/email!"} at gr.forth.ics.isl.grsfservicescore.GrsfPublisher.updateRecord(GrsfPublisher.java:152) [classes/:?] at gr.forth.ics.isl.grsfservicescore.clients.UpdateClient.updateRecords(UpdateClient.java:807) [classes/:?] at gr.forth.ics.isl.grsfservicescore.clients.UpdateClient.updateGrsfStock(UpdateClient.java:334) [classes/:?] at gr.forth.ics.isl.grsfservicescore.clients.UpdateClient.main(UpdateClient.java:987) [classes/:?]
No, you don't have to change nothing. I'm going to check it
Updated by Luca Frosini over 2 years ago
- Status changed from Feedback to In Progress
Updated by Luca Frosini over 2 years ago
Luca Frosini wrote in #note-10:
Preproduction environment.
The version is: 1.13.2-SNAPSHOT
Sorry, @roberto.cirillo@isti.cnr.it but I made a mistake.
The host to upgrade is smart-grsfpre.d4science.org which is configured to run in GRSF_Pre VRE in production.
Updated by Luca Frosini over 2 years ago
- Status changed from In Progress to Feedback
- Assignee changed from Luca Frosini to Roberto Cirillo
Updated by Roberto Cirillo over 2 years ago
- Assignee changed from Roberto Cirillo to Yannis Marketakis
smart-grsfpre.d4science.org upgraded right now.
I'm going to assign this ticket to @marketak@ics.forth.gr in order to check if the error is still there
Updated by Yannis Marketakis over 2 years ago
- File 81284707-a2e9-3ad6-910f-ce99c8967ef7.json 81284707-a2e9-3ad6-910f-ce99c8967ef7.json added
- File 81284707-a2e9-3ad6-910f-ce99c8967ef7.log 81284707-a2e9-3ad6-910f-ce99c8967ef7.log added
Thanks @roberto.cirillo@isti.cnr.it and @luca.frosini@isti.cnr.it
I just tried updating and publishing records.
Update works as expected (I just updated https://data.d4science.org/ctlg/GRSF_Pre/662eb566-2b51-36e4-9ba4-900d06fc8f03)
However, publishing raises the same HTTP 500 error.
Attached you will find the logs and the json representation of the record to be published.
Updated by Luca Frosini over 2 years ago
Yannis Marketakis wrote in #note-18:
Thanks @roberto.cirillo@isti.cnr.it and @luca.frosini@isti.cnr.it
I just tried updating and publishing records.
Update works as expected (I just updated https://data.d4science.org/ctlg/GRSF_Pre/662eb566-2b51-36e4-9ba4-900d06fc8f03)
However, publishing raises the same HTTP 500 error.
Attached you will find the logs and the json representation of the record to be published.
Yannis, I'm in trouble.
I just tried to update the record using the attached json to debug the code
POST https://smart-grsfpre.d4science.org/grsf-publisher-ws/rest/GRSF/stock/update-product
I get 400 - Bad Request with error "Please specify the 'catalog_id' property".
The record you linked has a different id. Did I make any mistakes?
Updated by Yannis Marketakis over 2 years ago
Luca Frosini wrote in #note-19:
Yannis, I'm in trouble.
I just tried to update the record using the attached json to debug the codePOST https://smart-grsfpre.d4science.org/grsf-publisher-ws/rest/GRSF/stock/update-product
I get 400 - Bad Request with error "Please specify the 'catalog_id' property".
The record you linked has a different id. Did I make any mistakes?
@luca.frosini@isti.cnr.it I tried two different cases.
I first tried updating the record with UUID 662eb566-2b51-36e4-9ba4-900d06fc8f03, which was updated successfully.
Then I tried publishing the record with UUID 81284707-a2e9-3ad6-910f-ce99c8967ef7 which failed with HTTP 500. You tried to update that record which failed because the record does not exist in the catalog. Moreover, the URL for publishing a record is https://smart-grsfpre.d4science.org/grsf-publisher-ws/rest/grsf/stock/publish-product
Finally, I tried again publishing the last record in GRSF PRE and it was properly published. I don't know if you fixed something in the meantime.
I think we can close the issue.
Updated by Luca Frosini over 2 years ago
- Status changed from Feedback to Closed
- Assignee changed from Yannis Marketakis to Luca Frosini
- % Done changed from 90 to 100
Thanks @marketak@ics.forth.gr please reopen the ticket if you experience the issue again.
Yannis Marketakis wrote in #note-20:
I think we can close the issue.
Updated by Yannis Marketakis over 2 years ago
- Related to Bug #23978: HTTP 500 error while publishing in GRSF Admin and GRSF Public VREs added