REST API ERROR 500

André Lemberg shared this question 22 months ago
Answered
Hello, in our QA Environment we got YF Version 9.8.1.1. Via Rest i get my token with .../yellowfin/api/refresh-tokens
but if i try to get other information with this token (like all Users .../yellowfin/api/admin/users) i get html Error 500.
In our Test Environment we got YF Version 9.8.0.1 and there everything works fine.
The only logentries i found was in localhost_access_log:
x.x.x.x - - [28/Feb/2023:11:51:55 +0100] "POST /yellowfin/api/refresh-tokens HTTP/1.1" 200 1925
x.x.x.x - - [28/Feb/2023:11:51:56 +0100] "GET /yellowfin/api/admin/users HTTP/1.1" 500 481
Error 500 is too unspecific to find the exact problem. Is there a possibility to activate more detailed logs?

Replies (10)

photo
1

Hi Andre Lemberg,

Thanks for reaching out to Yellowfin support.

Yes, it is possible to activate more detailed logs in Yellowfin to help you diagnose the issue you are experiencing.

You can enable debug logging by modifying the log4j.properties file located in the <Yellowfin_Home>/appserver/appserver/webapps/ROOT/WEB-INF/classes directory.

To enable debug logging, add the following lines to the end of the file:

log4j.logger.com.hof.mi.ws=DEBUG
log4j.logger.com.hof.mi.controller=DEBUG
log4j.logger.com.hof.mi=DEBUG

Save the file and restart the Yellowfin application server for the changes to take effect.

With debug logging enabled, you should see more detailed information about the error in the Yellowfin application logs, which should help you diagnose and resolve the issue you are experiencing.

Please find the link to know more about debug logs.

https://wiki.yellowfinbi.com/display/yfcurrent/Logs+and+Logging

Regards,

Sri Vamsi

photo
1

Hello Sri Vamsi,

now i got Entries in yellowfin.log:

YF:2023-02-28 14:22:19.554:DEBUG (RequestListener) - [85] [Unknown] [Unknown] Initializing Request for thread 1179470620
YF:2023-02-28 14:22:19.554:DEBUG (i4RequestRegistry) - Registering Request /yellowfin/api/admin/users Thread 1179470620
YF:2023-02-28 14:22:19.555:DEBUG (i4RequestRegistry) - Registered Request /yellowfin/api/admin/users with tabtoken set as null Thread 1179470620
YF:2023-02-28 14:22:19.555:DEBUG (BrowserInfo) - [85] [Background] [/api/admin/users] Could not match user-agent string: Jakarta Commons-HttpClient/3.1
YF:2023-02-28 14:22:19.556:DEBUG (CustomRequestMappingHandlerMapping) - Mapped to bi.yellowfin.api.rest.service.UsersApiService#getUsersAdmin(List, List, List, Long)
YF:2023-02-28 14:22:19.558:DEBUG (RequestListener) - [85] [Background] [/api/admin/users] Destroying Request for thread 1179470620
YF:2023-02-28 14:22:19.558:DEBUG (i4RequestRegistry) - Unregistered request /yellowfin/api/admin/users Thread 1179470620

Unfortunately, these log entries do not help me with my problem.

I also found out that if I intentionally submit a wrong token, I also get the error 500. In our test environment I get the error 401 invalid token. It almost seems like the rest interface is not running correctly. Strangely enough I can generate a token via REST.


Any ideas?


Regards,

André Lemberg

photo
1

Hi Andre Lemberg,

Thanks for your reply,

Based on the log entries you provided, it appears that a request was made to the Yellowfin API endpoint /yellowfin/api/admin/users and it was successfully mapped to the UsersApiService#getUsersAdmin method. However, it is difficult to determine the root cause of the 500 error without more information.

Since you mentioned that intentionally submitting an invalid token results in a 401 error, it may be worth investigating the authentication and authorization configuration of your Yellowfin instance. This could potentially involve checking that the correct authentication provider is configured and that the user making the request has the necessary permissions to access the resource.

Can you please share the entire Yellowfin logs and upload into our FTP server and also please provide the info.jsp file as well.

Regards,

Sri Vamsi

photo
1

Hello Sri Vamsi,

Thanks for your reply,

our authenticationprovider is Yellowfin and the user is system administrator.

Maybe this Information helps.

When I send a GET to .../yellowfin/api/admin/users with Postman, I get the following response.

{
"code": 500,
"reason": null,
"description": "Oh nein! Während der Verarbeitung ist ein Fehler aufgetreten. Bitte versuchen Sie es später noch einmal.\n\nAusnahme:\nHandler dispatch failed; nested exception is java.lang.NoSuchMethodError: com.auth0.jwt.JWTVerifier.init(Lcom/auth0/jwt/algorithms/Algorithm;)Lcom/auth0/jwt/interfaces/Verification;\nGrundursache:\ncom.auth0.jwt.JWTVerifier.init(Lcom/auth0/jwt/algorithms/Algorithm;)Lcom/auth0/jwt/interfaces/Verification;"
}

Unfortunately, I do not yet have access to your FTP server to upload the log files.

Regards,

André Lemberg

photo
1

Hi Andre,

Thanks for your reply.

Can you please click on the link below and upload the file and let me know the filename in ticket.

https://ftp.yellowfin.bi/files/

5cc0cfdef46eef5be791c82d51fea099

Let me know how it goes

Regards,

Sri Vamsi

photo
1

Hi Sri Vamsi,

i uploaded the following files.

info.jsp.pdf

yellowfin.log


The 500error is right at the end of the yellowfin.log at YF:2023-03-01 15:05:14.


Regards,

André Lemberg

photo
1

Hi Andre,

Unfortunately, I don't see any error in the logs that you have uploaded in ftp server. As per the timestamp that you have mentioned below indicates that the request has been successfully processed and is now being unregistered from the request registry.

YF:2023-03-01 15:05:14.717:DEBUG (i4RequestRegistry) - Unregistered request /yellowfin/api/admin/users Thread 234260974.

Can you please share the entire logs and zip the file and please provide the screenshots or screen recording while you are facing the issue.

Regards,

Sri Vamsi

photo
1

Hi Sri Vamsi,

i uploaded the QA_error_500_log_and_screenshot.zip.

Regards,

André Lemberg

photo
1

Hi Sri Vamsi,

we have reinstalled Yellowfin on our QA servers again and now everything works. Thank you for your help.


Regards,

André Lemberg

photo
1

Hi Andre,

That's great to hear! If that's all good, I'll go ahead and mark this as complete.

Regards,

Sri Vamsi

Leave a Comment
 
Attach a file