App Hosting issues in Linux

1402
8
10-03-2018 12:51 PM
SamuelAbati
Occasional Contributor

Hello, we've decided to move our hosted apps that were on a Windows machine using NGINX server to a Ubuntu machine.

So we followed the same steps as we did on Windows; installed NGINX, moved the app files to the www folder and that's it.

But upon accessing the app through a browser many things aren't loaded like icons and such, and on the console I get the error "498" on some request to esri's server. According to google 498 means invalid token but I can't think why the generated token would be invalid in a Linux.

The problem is that we don't have any infrastructure specialist, we always relied on simplicity of Windows and now we are stuck in this problem.

Is there any extra steps/configuration that need to be done in a Linux environment to properly use Apps created by WAB? All we installed in this machine was the NGINX server, do we need do install any windows packages or anything else?

0 Kudos
8 Replies
RobertScheitlin__GISP
MVP Emeritus

Samuel,

   I don't have any NGINX or Ubuntu experience (not sure why you moved if you don't either...) but it could be the reason you are getting invalid token is because you liek have a different domain url/IP on the new web server.

0 Kudos
SamuelAbati
Occasional Contributor

Yes it is a different domain/ip, but where do I configure this?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Did you store your credentials in the web map for some secure service?

0 Kudos
SamuelAbati
Occasional Contributor

I'm not sure what you're talking about, I just downloaded the app .zip from WAB, add the appID and hosted it on the server

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Samuel,

  If you are using secure services in your web map then the appId is registered to the url/IP of the machine when you deployed your app. So you need to generate a new appId that goes with your new domain then.

Deploy your app—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers 

Step 5.

0 Kudos
SamuelAbati
Occasional Contributor

Well, after that now I get an error after clicking the login dialog, it opens a popup that says "Invalid client_id error 400"

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Samuel,

   Seems like you are failing at registering the app with the appropriate app id.

Frequently asked questions—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers 

0 Kudos
KaelHawthorne
New Member

I can relate to the frustration of migrating from a Windows to a Linux environment, especially when you're not working with an infrastructure specialist. It’s a steep learning curve! From my experience, one potential issue could be the configuration of file permissions in Linux. Unlike Windows, Linux often requires more granular permission settings for the www folder, which might be why some assets aren’t loading properly. Double-check the ownership and permissions of the app files to ensure that NGINX has the proper access.

Another thing to consider is the case sensitivity of Linux. If your app’s file paths or URLs refer to assets with incorrect capitalization, they could break. Regarding the "498 invalid token" error, it could be related to an expired or improperly generated token for esri’s API. If the app relies on a service that’s configured differently in Linux, you might need to update some environment variables or token generation settings.

On a side note, when I was dealing with a similar issue, I explored hosting options that provided Linux-friendly environments with expert support. A colleague recommended GITC, and their hosting solutions were incredibly helpful. They offered 24/7 support and a secure, scalable environment optimized for Linux hosting, which saved me a lot of troubleshooting time. You might not need new hosting right now, but I found their documentation and support team great for resolving technical issues like these.

Good luck with the migration—Linux has a lot of potential once you get over these initial hurdles!

0 Kudos