<?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>article Plugins installed in Docker container required permissions for OneAgent in Troubleshooting</title>
    <link>https://community.dynatrace.com/t5/Troubleshooting/Plugins-installed-in-Docker-container-required-permissions-for/ta-p/241676</link>
    <description>&lt;P&gt;When deploying plugins in Docker containers with Dynatrace OneAgent, you might encounter permission-related errors due to insufficient access to the Docker socket. This issue is indicated by errors in the OneAgent logs, such as:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;ERROR_UNKNOWN, description=Docker API error. Docker setup is possibly not supported or plugin agent has not enough permission to access docker socket...
PermissionError: [Errno 13] Permission denied
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This issue arises because the PluginAgent requires access to the Docker socket (&lt;CODE&gt;/var/run/docker.sock&lt;/CODE&gt;) to communicate with the Docker daemon. If the PluginAgent lacks the necessary permissions, it cannot function properly.&lt;/P&gt;
&lt;P&gt;To resolve this issue, ensure that you're running the plugin inside the Docker container has at least read/write access to the Docker socket. Alternatively, adding the user to the Docker group grants full access to the Docker daemon, allowing the plugin to communicate without permission errors.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Grant Read/Write Access&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Modify the permissions of the Docker socket to allow read/write access:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;sudo chmod a+rw /var/run/docker.sock
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; This approach makes the Docker socket accessible to all users and might pose a security risk.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Add User to the Docker Group&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;A more secure approach is to add the user running the plugin to the Docker group:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;sudo usermod -aG docker $USER
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Replace &lt;CODE&gt;$USER&lt;/CODE&gt; with the username of the user running the plugin. Then, restart the Docker service:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;sudo systemctl restart docker
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;For more detailed information on managing Docker permissions and security, consult the &lt;A href="https://docs.docker.com/engine/security/" target="_blank" rel="noopener"&gt;Docker security documentation&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Apr 2024 14:48:54 GMT</pubDate>
    <dc:creator>darynakovyrina</dc:creator>
    <dc:date>2024-04-11T14:48:54Z</dc:date>
    <item>
      <title>Plugins installed in Docker container required permissions for OneAgent</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Plugins-installed-in-Docker-container-required-permissions-for/ta-p/241676</link>
      <description>&lt;P&gt;When deploying plugins in Docker containers with Dynatrace OneAgent, you might encounter permission-related errors due to insufficient access to the Docker socket. This issue is indicated by errors in the OneAgent logs, such as:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;ERROR_UNKNOWN, description=Docker API error. Docker setup is possibly not supported or plugin agent has not enough permission to access docker socket...
PermissionError: [Errno 13] Permission denied
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This issue arises because the PluginAgent requires access to the Docker socket (&lt;CODE&gt;/var/run/docker.sock&lt;/CODE&gt;) to communicate with the Docker daemon. If the PluginAgent lacks the necessary permissions, it cannot function properly.&lt;/P&gt;
&lt;P&gt;To resolve this issue, ensure that you're running the plugin inside the Docker container has at least read/write access to the Docker socket. Alternatively, adding the user to the Docker group grants full access to the Docker daemon, allowing the plugin to communicate without permission errors.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Grant Read/Write Access&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Modify the permissions of the Docker socket to allow read/write access:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;sudo chmod a+rw /var/run/docker.sock
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; This approach makes the Docker socket accessible to all users and might pose a security risk.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Add User to the Docker Group&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;A more secure approach is to add the user running the plugin to the Docker group:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;sudo usermod -aG docker $USER
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Replace &lt;CODE&gt;$USER&lt;/CODE&gt; with the username of the user running the plugin. Then, restart the Docker service:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;sudo systemctl restart docker
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;For more detailed information on managing Docker permissions and security, consult the &lt;A href="https://docs.docker.com/engine/security/" target="_blank" rel="noopener"&gt;Docker security documentation&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 14:48:54 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Plugins-installed-in-Docker-container-required-permissions-for/ta-p/241676</guid>
      <dc:creator>darynakovyrina</dc:creator>
      <dc:date>2024-04-11T14:48:54Z</dc:date>
    </item>
  </channel>
</rss>

