Running AWS IoT Device Tester for AWS IoT Greengrass V2 on a Ubuntu PC behind a proxy

0

I am using IDT v4.5.8 with Greengrass nucleus v2.5.6. The Ubuntu PC on which IDT is running is behind a company proxy and it causes tests to fail. Here is the log: time="2022-10-27T12:23:27+08:00" level=info msg=12:23:27.479 [mqtt] [idt-4421ce1fdfb724ac475d] [ERROR] greengrass/features/mqtt.feature - Failed at step: 'my device is registered as a Thing' time="2022-10-27T12:23:27+08:00" level=info msg=com.google.inject.ProvisionException: Unable to provision, see the following errors: time="2022-10-27T12:23:27+08:00" level=info msg= time="2022-10-27T12:23:27+08:00" level=info msg=1) [Guice/ErrorInCustomProvider]: ModuleProvisionException: UnknownHostException: www.amazontrust.com

Adding the proxy as parameters inputs (-Dhttp.proxyHost=xxxxx -Dhttp.proxyPort=yyyy) in ./tests/GGV2Q_2.4.0/suite/mqtt/mqttpubsub/test.json did not help.

Disassembling RegistrationContextModule.class where the access to www.amazontrust.com seems to happen, I saw this line: L9: getstatic Field java/net/Proxy NO_PROXY Ljava/net/Proxy; I have no knowledge about Java but is seems that the proxy is hard coded to NO_PROXY.

So: do you confirm my understanding that there is no way to configure the proxy through the JAVA flags, and if so, do you have any plan to add the proxy setting support to the IDT?

Thanks!

asked 2 years ago303 views
5 Answers
1

I apologize for the delay in response to this repost thread.

As you correctly identified, the IDT running in the host agent itself needs to be cognizant of the proxy.

We do not have that option/feature right now, and have taken up a feature request to add the same.

In the mean time, the only option to get around this issue, is to have an environment which does not need the internet access through proxy.

Another option is consider is, if 'www.amazontrust.com' is the only site being blocked, then I can build a custom build with the default rootCA harcode in the testsuite, instead of downloading. If that works for you, then that is going to be a relatively light-weight change, compared to releasing the support for proxy in general. I will get back soon with the custom build.

AWS
answered a year ago
0

You can try running IDT with the pre-installed greengrass feature. First install greengrass and setup the necessary proxy configurations through the greengrass cli. Then enable the pre-installed field in the userdata.json. For more information on IDT pre-isntalled greengrass configurations please reference this page: https://docs.aws.amazon.com/greengrass/v2/developerguide/set-config.html#userdata-config

For greengrass network proxy please refer to this page: https://docs.aws.amazon.com/greengrass/v2/developerguide/configure-greengrass-core-v2.html#configure-alpn-network-proxy

AWS
answered 2 years ago
0

Thanks for your feedback but the Device Under Test is NOT behind a proxy (and I use the pre-installed feature and it works). However, the IDT running on Ubuntu still needs to access www.amazontrust.com and it cannot because my Ubuntu PC is behind the proxy. So what I need is that the IDT itself (running on the Ubuntu PC) can support proxy configuration.

answered 2 years ago
0

Thanks so much for this answer! I am looking forward to receiving your custom build, then!

answered a year ago
0

Please use this presigned url(command) to download the custom build. It will be available for 7 days to download

wget -O devicetesterr_linux.zip 'https://aws-iot-idt-ggv2-ubuntuproxy-private-beta.s3.us-west-2.amazonaws.com/devicetester_greengrass_v2_linux.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAW2I64IVPZ4VU3FX5%2F20221201%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20221201T161512Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=acaf097deff32cb48ecfc36d368ea4ab7170a0cf56157924a1658d898b5ac368'

This is a custom build, and can be used only to run the tests, and will not be able to generate APN qualification report.

I suggest running mqtt and lambdadeploymentgroup tests, to address the primary issue is addressed.

./bin/devicetester_linux_x86-64 run-suite --group-id mqtt,lambdadeployment
AWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions