Graphql Webpage is not loading
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2021 01:50 PM
Hello ,
I have installed GraphQl in our Test Environment, Hopex Version installed is Hopex V4 Cp4.
I have followed all the steps mentioned in this URL: https://community.mega.com/t5/HOPEX-Store/GraphQL-REST-API/m-p/21381
But when I launch the HopexGraphQl Webpage it is only showing loading... message.
I couldn't find any info in the logs.
Could you someone suggest me things need to be checked for it to work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2021 04:14 PM
Hello Mounika,
When you have this error there are 2 mains reasons :
- an issue with UAS configuration
- an issue with impersonification user in the application pool MWASAPI
Caution : this explanation are for a standalone server. For cluster/farm deployment other reason may cause a problem.
Option 2 is the most commonly seen error.
1) Checking UAS is working
How to check UAS is working : follow this procedure https://community.mega.com/t5/REST-API/Get-a-bearer-token-from-UAS-for-REST-API-call/m-p/21372#M2
Case 1 : you get a bearer
If you are able to get a bearer token this means UAS is properly configured. You can go to option 2.
Case 2 : you don't get a bearer
If you fail to get a bearer you need to :
- review URL in web.config file of all IIS website. Be careful UAS URL is case sensitive.
- review access rights of the UAS certificate on the server. Follow the procedure described here : https://community.mega.com/t5/HOPEX-Downloads-Updates/Certificates/td-p/25355
- ensure HTTP/HTTPS is properly set in IIS.
- ensure that when you connect with HOPEX web front end UAS is working with the given user.
- If UAS is deployed on another web server than HOPEX configure the coors in the web.config of UAS.
2) Checking the application pool MWASAPI
The most commonly seen problem is an issue with privilege of the impersonfication user used for HOPEXMWASAPI. This user can't instantiate a process mgwspro.exe
How to check that you are in this case :
- Try to call the API with postman
- The answers of the API call should be a 500 error with an error message "Unable to open a session"
- Go on the server an open Windows Task manager
If it works you should see :
- at least one process mgwspro.exe where username is "SYSTEM"
- at least one process mgwspro.exe where username is the one used for the application pool MWASAPI. In my example "W-OGD\HOPEXAPI"
Case 3 : you have a process launch
In that case this is an issue with the selected user. Try to call the API with another user. For instance "MEGA" with a profile "HOPEX Customizer" and ensure you have enough Must License token left.
Case 4 : you see no processes with the mentioned user
Double check the following error below to ensure the situation
- Go on the server and open Windows Event Viewer on Windows Logs \ Application
- Check if you see "Error"
- You should find an error of HOPEX saying "Unable to find process MWAS..."
- If you see error that means that the IT has not granted enough privilege to the user
What privilege should the impersonificiation user have :
- User should be allowed to access the server,
- launch process,
- read write access on C:\inetpub\wwwroot (default location of IIS, adjust if needed)
- read write access on C:\Program Files (x86)\MEGA\HOPEX V4 (default location of IIS, adjust if needed)
- User should be able to access the shared folder of the Must License read/write
- User should be able to access the shared folder of the MEGA Environment read/write
- User should have access to the database server access right (IP + port)
- User should below to the windows group
- IIS user
- Distributed COM user
- If possible user should be local administrator of the server.
How to investigate that the problem is related to the impersonification user
Each solution assume that you are able to connect to HOPEX in web front-end with the given HOPEx login/password you are using (enough license, user not locked)
- Solution 1 : use the HOPEXMWAS application pool impersonification user
- Solution 2 : use LocalSystem
Try solution 1 :
- Go in IIS
- Go to the application pool
- Select application pool HOPEXAPIMWAS
- Edit identity and put the same user as for HOPEXMWAS
- Try to connect to the API with postman or graphQL IDE
If it works it confirm that the user has an privilege issue
Try solution 2 :
- Go in IIS
- Go to the application pool
- Select application pool HOPEXAPIMWAS
- Edit identity and put "Local System"
- Try to connect to the API with postman or graphQL IDE
If it works it confirm that the user has an privilege issue
If solution 1 or 2 works you should then correct the impersonification user has a privilege issue.