Hello,
we were not able to get a modem connection from within our (sandboxed) application. So we decided to build and install the well-known httpGet example app and see if we can get the modem connection to work. But even with httpGet we fail to access the /etc/resolv.conf file.
If we don’t call “cm data connect” before running the httpGet app, we get the following logs:
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c app_Start() 3469 | Starting app ‘httpGet’
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/dev/log’ to ‘/legato/systems/current/appsWriteable/httpGet/dev/log’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/dev/null’ to ‘/legato/systems/current/appsWriteable/httpGet/dev/null’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/dev/zero’ to ‘/legato/systems/current/appsWriteable/httpGet/dev/zero’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/dev/urandom’ to ‘/legato/systems/current/appsWriteable/httpGet/dev/urandom’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/lib/liblegato.so’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/liblegato.so’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/lib/ld-linux.so.3’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/ld-linux.so.3’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/lib/libc.so.6’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libc.so.6’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/lib/libpthread.so.0’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libpthread.so.0’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/lib/librt.so.1’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/librt.so.1’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/lib/libdl.so.2’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libdl.so.2’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/lib/libgcc_s.so.1’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libgcc_s.so.1’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/lib/libm.so.6’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libm.so.6’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/usr/lib/libstdc++.so.6’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libstdc++.so.6’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libgmp.so.10’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libgmp.so.10’
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libssl.so.1.0.2’ to '/legato/systems/current/appsWriteable/httpGet/lib/libssl.so.
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libcrypto.so.1.0.2’ to '/legato/systems/current/appsWriteable/httpGet/lib/libcryp
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libcurl.so.4’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libcurl.so.4’
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libz.so.1’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libz.so.1’: Alre
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libComponent_httpGetComponent.so’ to '/legato/systems/current/appsWriteable/httpG
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/bin/httpGet’ to ‘/legato/systems/current/appsWriteable/httpGet/bin/httpGet’: Already
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libgmp.so.10’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libgmp.so.10’
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libcurl.so.4’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libcurl.so.4’
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libcrypto.so.1.0.2’ to '/legato/systems/current/appsWriteable/httpGet/lib/libcryp
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libssl.so.1.0.2’ to '/legato/systems/current/appsWriteable/httpGet/lib/libssl.so.
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libz.so.1’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libz.so.1’: Alre
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/bin/date’ to ‘/legato/systems/current/appsWriteable/httpGet/bin/date’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/bin/sh’ to ‘/legato/systems/current/appsWriteable/httpGet/bin/sh’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/etc/hosts’ to ‘/legato/systems/current/appsWriteable/httpGet/etc/hosts’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/etc/nsswitch.conf’ to ‘/legato/systems/current/appsWriteable/httpGet/etc/nsswitch.conf’: Already exists
Feb 9 02:51:48 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2041 | Could not stat file at ‘/etc/resolv.conf’. No such file or directory
Feb 9 02:51:48 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2158 | Failed to create link at ‘/etc/resolv.conf’ in app ‘httpGet’.
Feb 9 02:51:48 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[1127]/supervisor T=main | app.c app_Start() 3501 | Failed to set Smack rules or set up app area.
If we call “cm data connect” followed by “cm data disconnect” (which will create the /var/resolv.conf file) before starting httpGet, we get following logs:
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | proc.c proc_Start() 1403 | Starting process ‘httpGet’ with pid 2507
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | supervisor.c SigChildHandler() 899 | Reaping unconfigured child process 2503.
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2507]/supervisor T=main | proc.c proc_Start() 1363 | Execing ‘httpGet’
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2507]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxCoreDumpFileBytes to value 102400.
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2507]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileBytes to value 102400.
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2507]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxLockedMemoryBytes to value 8192.
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2507]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileDescriptors to value 256.
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2507]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxMQueueBytes to value 512.
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2507]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxThreads to value 20.
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2507]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxQueuedSignals to value 100.
Feb 9 02:56:55 swi-mdm9x28-wp user.warn Legato: -WRN- | UNKNOWN[2507]/framework T=main | fdMonitor.c le_fdMonitor_Create() 422 | FD Monitor object name ‘httpGet.httpGetComponent.le_data’ truncated to ‘httpGet.httpGetComponent.le_dat’.
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | httpGet[2507] | HTTP Get!
Feb 9 02:56:55 swi-mdm9x28-wp user.notice kernel: [ 503.856894] audit: type=1400 audit(318913015.643:4): lsm=SMACK fn=smack_inode_getattr action=denied subject=“app.httpGet” object=“admin” requested=r pid=2507 comm=“httpGet” path=“pipe:[11013]” dev=“pipefs” ino=11013
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | httpGet[2507]/httpGetComponent T=main | httpGet.c httpGetComponent_COMPONENT_INIT() 133 | Requesting connection…
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsTechRank.c dcsTechRank_SelectDataChannel() 215 | Selected channel name 1
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcs.c le_dcs_AddEventHandler() 600 | Adding channel handler for channel 1 of technology cellular
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcs.c le_dcs_AddEventHandler() 640 | Event handler with reference 0x9ef and event ID 0xa07 added
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcs.c le_dcs_Start() 386 | Starting channel 1 of technology cellular by app session with reference 0x7f5a7bd8
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcs.c le_dcs_Start() 443 | Initiating technology to start channel 1 for app session 0x7f5a7bd8, request reference 0x3c9
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsServer.c TryStartTechSession() 1052 | Successfully initiated data channel 1 of technology 1
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcsTech.c le_dcsTech_Start() 314 | Request to start channel 1 of technology cellular
Feb 9 02:56:56 swi-mdm9x28-wp user.notice kernel: [ 504.610413] audit: type=1400 audit(318913016.403:5): lsm=SMACK fn=smack_inode_getattr action=denied subject="" object=“app.tools” requested=r pid=1446 comm=“dnsmasq” path="/var/resolv.conf" dev=“tmpfs” ino=10543
Feb 9 02:56:57 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1307]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 795 | Sending QMI_WDS_START_NETWORK_INTERFACE_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=14.[0x0e]
Feb 9 02:56:57 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1307]/le_pa T=main | pa_mdc_qmi.c StartSession() 1978 | Data connection failure Call End provided 45, Code 1
Feb 9 02:56:57 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1307]/le_pa T=main | pa_mdc_qmi.c StartSession() 1989 | Data connection failure Verbose Call End provided Type 6, Verbose 50
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsCellular T=main | dcsCellular.c le_dcsCellular_Start() 1071 | Succeeded starting cellular connection 1
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsCellular T=main | dcsCellular.c DcsCellularConnEventStateHandler() 254 | State of connection 1 transitioned from down to up
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsServer.c ChannelEventHandler() 660 | Received for channel reference 0xd9 event Up
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsServer.c SetDefaultGWConfiguration() 407 | Setting default GW address on device
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsNet T=main | dcsNet.c le_net_BackupDefaultGW() 336 | No default GW currently set or retrievable
Feb 9 02:56:57 swi-mdm9x28-wp user.warn Legato: -WRN- | dcsDaemon[1258]/le_pa_dcs T=main | pa_dcs_linux.c pa_dcs_SetDefaultGateway() 918 | Unable to delete default gateway
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsNet T=main | dcsNet.c le_net_SetDefaultGW() 497 | Succeeded to set default GW addr on interface rmnet_data0 for channel 1 of technology cellular
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsServer.c SetDnsConfiguration() 565 | Setting DNS server addresses on device
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/le_pa_dcs T=main | pa_dcs_linux.c AddNameserversToResolvConf() 298 | Set DNS ‘10.105.16.254’ ‘10.105.144.254’
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/le_pa_dcs T=main | pa_dcs_linux.c AddNameserversToResolvConf() 323 | DNS 1 ‘10.105.16.254’ found in file
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/le_pa_dcs T=main | pa_dcs_linux.c AddNameserversToResolvConf() 328 | DNS 2 ‘10.105.144.254’ found in file
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsNet T=main | dcsNet.c le_net_SetDNS() 766 | DNS addresses of channel 1 of technology cellular already set in
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsServer.c SetDefaultRouteAndDns() 639 | Succeeded setting DNS configuration
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | httpGet[2507]/httpGetComponent T=main | httpGet.c ConnectionStateHandler() 110 | Interface rmnet_data0 connected.
Feb 9 02:56:57 swi-mdm9x28-wp user.notice kernel: [ 505.769437] audit: type=1400 audit(318913017.553:6): lsm=SMACK fn=smack_inode_getattr action=denied subject=“app.httpGet” object=“app.tools” requested=r pid=2507 comm=“httpGet” path="/etc/resolv.conf" dev=“tmpfs” ino=10543
Feb 9 02:56:57 swi-mdm9x28-wp user.notice kernel: [ 505.772984] audit: type=1400 audit(318913017.563:7): lsm=SMACK fn=smack_socket_sock_rcv_skb action=denied subject=“app.httpGet” object="" requested=w pid=2507 comm=“httpGet” saddr=127.0.0.1 src=39833 daddr=127.0.0.1 dest=53
Feb 9 02:56:57 swi-mdm9x28-wp user.notice kernel: [ 505.773668] audit: type=1400 audit(318913017.563:8): lsm=SMACK fn=smack_socket_sock_rcv_skb action=denied subject=“app.httpGet” object="" requested=w pid=2507 comm=“httpGet” saddr=127.0.0.1 src=39833 daddr=127.0.0.1 dest=53
Feb 9 02:56:57 swi-mdm9x28-wp user.notice kernel: [ 505.774279] audit: type=1400 audit(318913017.563:9): lsm=SMACK fn=smack_socket_sock_rcv_skb action=denied subject=“app.httpGet” object="" requested=w pid=2507 comm=“httpGet” saddr=127.0.0.1 src=49778 daddr=127.0.0.1 dest=53
Feb 9 02:56:57 swi-mdm9x28-wp user.notice kernel: [ 505.774909] audit: type=1400 audit(318913017.563:10): lsm=SMACK fn=smack_socket_sock_rcv_skb action=denied subject=“app.httpGet” object="" requested=w pid=2507 comm=“httpGet” saddr=127.0.0.1 src=49778 daddr=127.0.0.1 dest=5
Feb 9 02:56:57 swi-mdm9x28-wp user.err Legato: =ERR= | httpGet[2507]/httpGetComponent T=main | httpGet.c GetUrl() 77 | curl_easy_perform() failed: Couldn’t resolve host name
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcs.c le_dcs_Stop() 503 | Stopping channel 1 of technology cellular
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcs.c le_dcs_Stop() 528 | Channel 1 requested to be stopped
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsServer.c TryStopTechSession() 1082 | Successfully initiated stopping active data connection 1 of technology 1
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcsTech.c le_dcsTech_Stop() 371 | Request to stop channel 1 of technology cellular
Feb 9 02:56:58 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsCellular T=main | dcsCellular.c le_dcsCellular_Stop() 1152 | Succeeded stopping cellular connection 1
Feb 9 02:56:58 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsCellular T=main | dcsCellular.c DcsCellularConnEventStateHandler() 254 | State of connection 1 transitioned from up to down
Feb 9 02:56:58 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsServer.c ChannelEventHandler() 660 | Received for channel reference 0xd9 event Down
Feb 9 02:56:58 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsServer.c UpdateTechnologyStatus() 961 | No need to retry connecting with RequestCount 0
Feb 9 02:56:58 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcs.c le_dcs_RemoveEventHandler() 660 | Channel event handler for channel 1 of technology cellular removed
Feb 9 02:56:58 swi-mdm9x28-wp user.info Legato: INFO | httpGet[2507]/httpGetComponent T=main | httpGet.c ConnectionStateHandler() 116 | Interface disconnected.
Finally we tried to directly use an IP in the httpGet source instead of using a host name, and were able to successfully download the data! So this probably means that the whole issue we are having is related to the access to /etc/resolv.conf
The following snippet is part of our adef file (taken from the httpGet example):
requires:
{
file:
{
// needed for curl itself:
/etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
/usr/bin/curl /usr/bin/curl
// needed for networking:
/lib/libnss_compat.so.2 /lib/
/lib/libnss_files.so.2 /lib/
/lib/libnss_dns.so.2 /lib/
/lib/libresolv.so.2 /lib/
/etc/nsswitch.conf /etc/
/etc/hosts /etc/
/etc/resolv.conf /etc/
/bin/sh /bin/sh
/bin/date /bin/date
}
device:
{
[rw] /dev/null /dev/null
[r] /dev/urandom /dev/urandom
[r] /dev/random /dev/random
}
}