Hi @ebygomm,
Did you use a PythonCaller in the same workspace? This could be related to an issue that HTTPCaller does not honour proxy exceptions when PythonCaller is used which has a workaround in this article:
https://support.safe.com/hc/en-us/articles/25407417519117-FME-Flow-Troubleshooting-Proxies#HTTPCallerandFMEServerJobSubmitte
However, if that’s not the case, would you be able to provide more details:
- Your FME Workspace (plus any other supporting files needed to run your workspace)
- The version, build of FME Form/Flow, and platform you’re using
- Any additional information such as a log file, screenshots etc.
Thanks,
Emma
This is in FME Form not Flow and no PythonCallers involved. Nothing other than a creator and a featurereader connecting to a featureservice.
If you want to generate an ArcGIS token in a workbench, try to use ArcGIS_S_Token
@philippeb - we have no issue getting a token as a workaround, it’s more why this doesn’t work.
We see the same sort of behaviour with a python script that uses arcgis to generate a token. In 2021 the script works, in 2024.1 it only works when the proxy settings are turned off.
Update:
It appears this is possibly down to a change in how python is picking up no proxy settings.
On 2021 (Build 21812) desktop, Python Compatibility set to Esri ArcGIS Python 3.7, I can run some python to generate a token using the gis module. The Baseurl is on the proxy exception list and a token is successfully returned
import fme
import fmeobjects
from arcgis.gis import GIS
def FeatureProcessor(feature):
baseURL = FME_MacroValues['Baseurl']
portalAdminPwd = FME_MacroValues['SERVER_PASSWORD']
UserName = str(FME_MacroValues['SERVER_USERNAME'])
gis = GIS(baseURL+"/portal", UserName, portalAdminPwd)
token=gis._con.token
feature.setAttribute('token',token)
In 2024.1 (Build 24612) desktop, Python Compatibility set to Esri ArcGIS Python 3.9+ the same code fails with a Proxy Exception Error despite the fact that under windows settings the baseurl is on the exceptions list.
Setting the environmental variable no_proxy resolves this issue. Once this is set, it also becomes possible to set up a web connection to our portal environment which was previously only possible if the proxy was turned off completely.
Python code making http requests to websites on a proxy exception list using the requests module behaves in a similar manner. Code that works in 2021 doesn’t work in 2024 unless the environment variable is set
Which value do you give to that variable no_proxy? I’m having connection issue to my Portal with FME 2024 too and if that’s the solution that would be awesome!
@philippeb Do you have a proxy set, and should the connection to portal bypass the proxy? The easiest way to test in the first instance is to turn off the proxy settings and see if you can then make the connection.
Unfortunately I don’t have the rights to deactivate the proxy (from Zscaler) on my computer. Thanks to the IT…!
If you try generating a token in python do you get an error?
import fme
import fmeobjects
import requests
######## Main
def processFeature(feature):
x = requests.get("https://"+FME_MacroValues['Baseurl']+'/portal/sharing/rest/generateToken')
It was this sort of code failing in an existing workspace that was migrated that pointed me in the right direction