<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: OneAgent SDK for Python oneagent.initialize fails in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/OneAgent-SDK-for-Python-oneagent-initialize-fails/m-p/166987#M17212</link>
    <description>&lt;P&gt;Hello, there are some things you could check here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/Dynatrace/OneAgent-SDK-for-Python#troubleshooting" target="_blank"&gt;https://github.com/Dynatrace/OneAgent-SDK-for-Python#troubleshooting&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The main issues you could have are using a musl image (like alpine) or installing the oneagent-sdk lib for a different architecture. Do you have more details about how your Dockerfile looks like and how have you installed the oneagent-sdk pip package?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Jun 2021 17:19:58 GMT</pubDate>
    <dc:creator>david_lopes</dc:creator>
    <dc:date>2021-06-01T17:19:58Z</dc:date>
    <item>
      <title>OneAgent SDK for Python oneagent.initialize fails</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/OneAgent-SDK-for-Python-oneagent-initialize-fails/m-p/166981#M17211</link>
      <description>&lt;P&gt;I encounter an error calling&amp;nbsp;OneAgent SDK for Python oneagent.initialize within a docker container and I'm getting&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;InitResult(status=-1, error=SDKError(-1342308345, 'onesdk_initialize_2: Could not load agent.'))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;that does not correspond to any of the errors listed at&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dynatrace.github.io/OneAgent-SDK-for-Python/docs/sdkref.html#oneagent.common.ErrorCode" target="_blank" rel="noopener"&gt;https://dynatrace.github.io/OneAgent-SDK-for-Python/docs/sdkref.html#oneagent.common.ErrorCode&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using&amp;nbsp;&lt;SPAN&gt;oneagent-sdk&lt;/SPAN&gt;&lt;SPAN&gt;==&lt;/SPAN&gt;&lt;SPAN&gt;1.3.0.20191113.161138&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;and I've installed the latest&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;dynatrace-install.sh from&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;api/v1/deployment/installer/agent/unix/paas-sh&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Other printouts during the initialization&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;initialize: ref count = 0
Initializing SDK with options=['loglevelsdk=finest', 'loglevel=finest'], libname=None.
Loading native SDK library "/usr/local/lib/python3.6/site-packages/oneagent/_impl/native/libonesdk_shared.so".
Native SDK library "/usr/local/lib/python3.6/site-packages/oneagent/_impl/native/libonesdk_shared.so" version 1.5.1 loaded.
2021-06-01 13:42:12.545 UTC [d9a3884f] info    [onesdk] Initializing Dynatrace OneAgent SDK for C/C++ ...
2021-06-01 13:42:12.545 UTC [d9a3884f] info    [onesdk] SDK stub version 1.5.1.4, build date 2019.10.23 12:58:09.
2021-06-01 13:42:12.545 UTC [d9a3884f] fine    [onesdk] Preparing arguments...
2021-06-01 13:42:12.545 UTC [d9a3884f] config  [onesdk]   Options:
2021-06-01 13:42:12.545 UTC [d9a3884f] config  [onesdk]     Agent active:  true
2021-06-01 13:42:12.545 UTC [d9a3884f] config  [onesdk]     Agent module:  'liboneagentloader.so'
2021-06-01 13:42:12.545 UTC [d9a3884f] config  [onesdk]     SDK log level: finest 
2021-06-01 13:42:12.545 UTC [d9a3884f] config  [onesdk]   Additional options:
2021-06-01 13:42:12.545 UTC [d9a3884f] config  [onesdk]     loglevel=finest
2021-06-01 13:42:12.545 UTC [d9a3884f] config  [onesdk]     ONESDK_INTERNAL_CA627667445C40F0_INIT_FLAGS=0
2021-06-01 13:42:12.545 UTC [d9a3884f] fine    [onesdk] Loading agent module...
2021-06-01 13:42:12.549 UTC [d9a3884f] info    [onesdk] Could not load agent module for Dynatrace OneAgent SDK for C/C++: liboneagentloader.so: cannot open shared object file: No such file or directory
Failed initializing agent.
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/oneagent/__init__.py", line 271, in _try_init_noref
    nativeagent.checkresult(sdk, sdk.initialize(flags), 'onesdk_initialize_2')
  File "/usr/local/lib/python3.6/site-packages/oneagent/_impl/native/nativeagent.py", line 43, in checkresult
    raise SDKError(error_code, msg + ': ' + emsg)
oneagent.common.SDKError: (-1342308345, 'onesdk_initialize_2: Could not load agent.')
Continuing with stub-SDK only.
error during oneagent initialization: InitResult(status=-1, error=SDKError(-1342308345, 'onesdk_initialize_2: Could not load agent.'))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I see that&amp;nbsp;liboneagentloader.so does exist at /opt/dynatrace/oneagent/agent/lib64/&lt;/SPAN&gt;&amp;nbsp;even though it reports that&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[onesdk] Could not load agent module for Dynatrace OneAgent SDK for C/C++: liboneagentloader.so: cannot open shared object file: No such file or directory&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What else should I check?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 10:37:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/OneAgent-SDK-for-Python-oneagent-initialize-fails/m-p/166981#M17211</guid>
      <dc:creator>npg</dc:creator>
      <dc:date>2021-06-07T10:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: OneAgent SDK for Python oneagent.initialize fails</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/OneAgent-SDK-for-Python-oneagent-initialize-fails/m-p/166987#M17212</link>
      <description>&lt;P&gt;Hello, there are some things you could check here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/Dynatrace/OneAgent-SDK-for-Python#troubleshooting" target="_blank"&gt;https://github.com/Dynatrace/OneAgent-SDK-for-Python#troubleshooting&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The main issues you could have are using a musl image (like alpine) or installing the oneagent-sdk lib for a different architecture. Do you have more details about how your Dockerfile looks like and how have you installed the oneagent-sdk pip package?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 17:19:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/OneAgent-SDK-for-Python-oneagent-initialize-fails/m-p/166987#M17212</guid>
      <dc:creator>david_lopes</dc:creator>
      <dc:date>2021-06-01T17:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: OneAgent SDK for Python oneagent.initialize fails</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/OneAgent-SDK-for-Python-oneagent-initialize-fails/m-p/167112#M17240</link>
      <description>&lt;P&gt;Issue&amp;nbsp; resolved -- docker image was missing the step&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;export LD_PRELOAD=/opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 13:56:20 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/OneAgent-SDK-for-Python-oneagent-initialize-fails/m-p/167112#M17240</guid>
      <dc:creator>npg</dc:creator>
      <dc:date>2021-06-03T13:56:20Z</dc:date>
    </item>
  </channel>
</rss>

