Github user 2xyo commented on the issue:

    https://github.com/apache/incubator-metron/pull/220
  
    I still see the issue on current master with a Centos 6 VM.
    
    Steps to reproduce the error on the ansible client:
    ```
    $ sudo -H pip uninstall -y ansible && sudo -H pip install ansible==2.0.0.2
    $ ssh-keygen -t rsa -b 4096
    $ echo "192.168.1.11 node1" | sudo tee -a /etc/hosts >/dev/null
    $ ssh-copy-id root@node1
    $ sudo add-apt-repository ppa:webupd8team/java
    $ sudo apt update
    $ sudo apt install oracle-java8-installer git oracle-java8-set-default maven
    $ . /etc/profile.d/jdk.sh 
    $ env |grep JAVA
    $ cd && git clone https://github.com/apache/incubator-metron.git
    $ cd incubator-metron && git rev-parse HEAD
    23ff817ebdd3b63be69ad9b6c493b41bb0be4880
    $ rm -rf  ~/.m2/
    $ sed -i "s#<id></id>#<id>archive</id>#g" 
metron-deployment/packaging/ambari/metron-mpack/src/main/assemblies/metron-mpack.xml
 #METRON-500
    $ mvn clean package  -DskipTests
    $ cd ~/incubator-metron/metron-deployment
    $ sed -i '/\[defaults\]/a remote_user = root'  
vagrant/full-dev-platform/ansible.cfg
    $ sed -i 's/eth1/eth0/g' inventory/full-dev-platform/group_vars/all
    $ cd ~/incubator-metron/metron-deployment/vagrant/full-dev-platform
    $ ansible-playbook  -i ../../inventory/full-dev-platform/hosts 
../../playbooks/metron_full_install.yml --skip-tags="solr,yaf" 
    
    PLAY 
***************************************************************************
    skipping: no hosts matched
    
    PLAY 
***************************************************************************
    skipping: no hosts matched
    
    PLAY 
***************************************************************************
    
    TASK [setup] 
*******************************************************************
    ok: [node1]
    ..............
    
    TASK [metron_streaming : Assign permissions of HDFS /apps/metron/patterns 
directory] ***
    changed: [node1]
    
    TASK [metron_streaming : Upload Grok Patterns to hdfs:///apps/metron] 
**********
    fatal: [node1]: FAILED! => {"changed": true, "cmd": ["hdfs", "dfs", "-put", 
"-f", "/usr/metron/0.2.1BETA/patterns", "/apps/metron"], "delta": 
"0:00:01.976636", "end": "2016-10-17 16:00:46.418570", "failed": true, "rc": 1, 
"start": "2016-10-17 16:00:44.441934", "stderr": "put: Error accessing 
file:/usr/metron/0.2.1BETA/patterns", "stdout": "", "stdout_lines": [], 
"warnings": []}
    
    PLAY RECAP 
*********************************************************************
    node1                      : ok=145  changed=41   unreachable=0    failed=1
    
    ```
    
    On the node1:
    ````
    [root@node1 ~]# tail -n 3 /var/log/messages
    Oct 17 16:00:40 node1 ansible-command: Invoked with warn=True 
executable=None chdir=None _raw_params=hdfs dfs -chown -R hdfs:hadoop 
/apps/metron/patterns removes=None creates=None _uses_shell=False
    Oct 17 16:00:42 node1 ansible-command: Invoked with warn=True 
executable=None chdir=None _raw_params=hdfs dfs -chmod -R 775 
/apps/metron/patterns removes=None creates=None _uses_shell=False
    Oct 17 16:00:44 node1 ansible-command: Invoked with warn=True 
executable=None chdir=None _raw_params=hdfs dfs -put -f 
/usr/metron/0.2.1BETA/patterns /apps/metron removes=None creates=None 
_uses_shell=False
    
    ```
    
    Let's try with the command as root:
    ```
    [root@node1 ~]# hdfs dfs -put -f /usr/metron/0.2.1BETA/patterns /apps/metron
    16/10/17 16:19:12 WARN retry.RetryInvocationHandler: Exception while 
invoking class 
org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.create 
over null. Not retrying because try once and fail.
    
org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException):
 Permission denied: user=root, access=WRITE, 
inode="/apps/metron/patterns/asa._COPYING_":hdfs:hadoop:drwxrwxr-x
            at 
org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:319)
            at 
org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:292)
            at 
org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:213)
    .....
            at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
            at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
            at org.apache.hadoop.fs.FsShell.main(FsShell.java:350)
    put: Permission denied: user=root, access=WRITE, 
inode="/apps/metron/patterns/asa._COPYING_":hdfs:hadoop:drwxrwxr-x
    
    ```
    hdfs user can't access to /usr/metron/0.2.1BETA/patterns:
    ```
    [root@node1 ~]# su  hdfs
    [hdfs@node1 ~]$ ls -lR  /usr/metron/0.2.1BETA/patterns
    ls: cannot open directory /usr/metron/0.2.1BETA/patterns: Permission denied
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to