cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Graphql Webpage is not loading

Mounika
MEGA Partner
MEGA Partner

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.

Mounika_0-1628163976763.png

 

I couldn't find any info in the logs.

 

Could you someone suggest me things need to be checked for it to work.

 

1 Reply

oguimard
Retired

Hello Mounika,

 

When you have this error there are 2 mains reasons :

  1. an issue with UAS configuration
  2. 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 :

  1. Try to call the API with postman
  2. The answers of the API call should be a 500 error with an error message "Unable to open a session"
  3. 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

windows task manager.pngIIS application pool.png

 

 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

 

 

  1. Go on the server and open Windows Event Viewer on Windows Logs \ Application
  2. Check if you see "Error"
  3. You should find an error of HOPEX saying "Unable to find process MWAS..."
  4. If you see error that means that the IT has not granted enough privilege to the user

 

windows event error.png

 

 

 

What privilege should the impersonificiation user have :

 

  1. User should be allowed to access the server,
    1. launch process,
    2. read write access on C:\inetpub\wwwroot (default location of IIS, adjust if needed)
    3. read write access on C:\Program Files (x86)\MEGA\HOPEX V4  (default location of IIS, adjust if needed)
  2. User should be able to access the shared folder of the Must License read/write
  3. User should be able to access the shared folder of the MEGA Environment read/write
  4. User should have access to the database server access right (IP + port)
  5. User should below to the windows group
    1. IIS user
    2. Distributed COM user  
    3. If possible user should be local administrator of the server.

windows groups.png

 

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 :

  1. Go in IIS
  2. Go to the application pool
  3. Select application pool HOPEXAPIMWAS
  4. Edit identity and put the same user as for HOPEXMWAS
  5. 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 :

  1. Go in IIS
  2. Go to the application pool
  3. Select application pool HOPEXAPIMWAS
  4. Edit identity and put "Local System"
  5. 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.