FAQ
Looping in Cloudera Manager list (scm-users@cloudera.org).

Tom,
That error means that there is no home directory for the root user (by
default: /user/root directory) present on HDFS. Hive is trying to create it
using user "root" which doesn't have permissions to do so. One way to fix
this would be to create the /user/root directory (as hdfs user) and make it
owned by "root". Something like:
sudo -u hdfs hadoop fs -mkdir /user/root
sudo -u hdfs hadoop fs -chown root /user/root

Perhaps, another way would be run hive as a different user which already
has the directory created and ch'owned. Could you please list the contents
of your /user directory in HDFS (hadoop fs -ls /user)?

Mark
On Sun, Feb 3, 2013 at 9:04 PM, Tnats wrote:

Hi there, new to Hadoop/Cloudera so bear with me. I installed Cloudera
Manager and installed a 3 node cluster (with all the applications
available). Everything seems to be working good except when I try to go
into Hive as root or hdfs, I receive an error on a simple create table. I
searched through the Hive install doces (
https://ccp.cloudera.com/display/CDHDOC/Hive+Installation) but don't see
anything special I need to do except if I want to use the MySQL Metastore.
Any help would be appreciated.

-Tom

[root@h1 ~]# whoami
root
[root@h1 ~]# hive
Hive history file=/tmp/root/hive_job_log_root_201302032052_2003900843.txt
hive> create table foo (a INT);
FAILED: Error in metadata: MetaException(message:Got exception:
org.apache.hadoop.security.AccessControlException
org.apache.hadoop.security.AccessControlException: Permission denied:
user=root, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x)
FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.DDLTask
hive> quit;

[root@h1 ~]# su - hdfs
-bash-4.1$ hive
Hive history file=/tmp/hdfs/hive_job_log_hdfs_201302032053_939408392.txt
hive> create table foo (a INT);
2013-02-04 04:53:16.948 GMT Thread[main,5,main]
java.io.FileNotFoundException: derby.log (Permission denied)
----------------------------------------------------------------
2013-02-04 04:53:17.623 GMT:
Booting Derby version The Apache Software Foundation - Apache Derby -
10.4.2.0 - (689064): instance a816c00e-013c-a38d-1217-000000a96730
on database directory /var/lib/hive/metastore/metastore_db in READ ONLY
mode

Database Class Loader started - derby.database.classpath=''
FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Cannot
get a connection, pool error Could not create a validated object, cause: A
read-only user or a user in a read-only database is not permitted to
disable read-only mode on a connection.
NestedThrowables:
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
error Could not create a validated object, cause: A read-only user or a
user in a read-only database is not permitted to disable read-only mode on
a connection.
FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.DDLTask

--


Search Discussions

  • Romain Rigaux at Feb 4, 2013 at 9:06 pm
    Almost there!

    You need to delete these files, they lock the DB and are owned by 'root'
    and not 'hue':

    /var/lib/hive/metastore/metastore_db:
    total 28
    -rw-r--r-- 1 root root 4 Feb 4 12:28 dbex.lck
    -rw-r--r-- 1 root root 38 Feb 4 12:28 db.lck
    -rw-r--r-- 1 root root 354 Feb 4 12:28 derby.log
    drwxr-xr-x 2 root root 4096 Feb 4 12:28 tmp


    sudo rm /var/lib/hive/metastore/metastore_db/dbex.lck...

    Romain
    On Mon, Feb 4, 2013 at 12:46 PM, Tom Nats wrote:

    I have changed the permissions per one of the threads you sent me but
    still receiving the same error.


    [root@h1 metastore_db]# ls -lR /var/lib/hive/metastore
    /var/lib/hive/metastore:
    total 4
    drwxrwxrwt 5 root root 4096 Feb 4 12:28 metastore_db

    /var/lib/hive/metastore/metastore_db:
    total 28
    -rw-r--r-- 1 root root 4 Feb 4 12:28 dbex.lck
    -rw-r--r-- 1 root root 38 Feb 4 12:28 db.lck
    -rw-r--r-- 1 root root 354 Feb 4 12:28 derby.log
    drwxrwxrwt 2 hue hue 4096 Jan 31 10:47 log
    drwxrwxrwt 2 hue hue 4096 Jan 31 10:47 seg0
    -rwxrwxrwt 1 hue hue 860 Jan 31 10:47 service.properties
    drwxr-xr-x 2 root root 4096 Feb 4 12:28 tmp

    /var/lib/hive/metastore/metastore_db/log:
    total 1032
    -rwxrwxrwt 1 hue hue 1048576 Feb 4 12:28 log1.dat
    -rwxrwxrwt 1 hue hue 48 Feb 4 12:28 log.ctrl
    -rwxrwxrwt 1 hue hue 48 Feb 4 12:28 logmirror.ctrl

    /var/lib/hive/metastore/metastore_db/seg0:
    total 1972
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c101.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c10.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c111.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c121.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c130.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c141.dat
    -rwxrwxrwt 1 hue hue 16384 Feb 1 12:54 c150.dat
    -rwxrwxrwt 1 hue hue 16384 Feb 1 12:54 c161.dat
    -rwxrwxrwt 1 hue hue 16384 Feb 1 12:54 c171.dat
    -rwxrwxrwt 1 hue hue 94208 Feb 4 12:28 c180.dat
    -rwxrwxrwt 1 hue hue 16384 Feb 4 12:28 c191.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 4 12:28 c1a1.dat
    -rwxrwxrwt 1 hue hue 16384 Feb 4 12:28 c1b1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c1c0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c1d1.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c1e0.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c1f1.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c200.dat
    -rwxrwxrwt 1 hue hue 36864 Feb 1 12:32 c20.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c211.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c221.dat
    -rwxrwxrwt 1 hue hue 372736 Feb 1 12:54 c230.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c241.dat
    -rwxrwxrwt 1 hue hue 16384 Jan 31 10:47 c251.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c260.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c271.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c281.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c290.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c2a1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c2b1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c2c1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c2d0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c2e1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c2f0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c300.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c311.dat
    -rwxrwxrwt 1 hue hue 16384 Feb 1 12:32 c31.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c321.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c331.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c340.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c351.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c361.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c371.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c380.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c391.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c3a1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c3b1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c3c0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c3d1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c3e1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c3f1.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c400.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c411.dat
    -rwxrwxrwt 1 hue hue 20480 Feb 1 12:32 c41.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c420.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c431.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c441.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c451.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c460.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c471.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c480.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c491.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c4a0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c4b1.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c4c0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c4d1.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c4e0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c4f1.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c500.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c511.dat
    -rwxrwxrwt 1 hue hue 20480 Feb 1 12:32 c51.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c520.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c531.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c540.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c551.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c560.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c571.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c580.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c591.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c5a0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c5b1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c5c1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c5d1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c5e1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c5f1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c601.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c60.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c611.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c621.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c631.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c641.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c651.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c661.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c71.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c81.dat
    -rwxrwxrwt 1 hue hue 28672 Feb 1 12:54 c90.dat
    -rwxrwxrwt 1 hue hue 28672 Feb 1 12:54 ca1.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:54 cb1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 cc0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 cd1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 ce1.dat
    -rwxrwxrwt 1 hue hue 12288 Feb 1 12:32 cf0.dat


    On Mon, Feb 4, 2013 at 12:13 PM, Romain Rigaux wrote:

    +hue-user


    "on database directory /var/lib/hive/metastore/metastore_db in READ ONLY
    mode"

    It means that Hive metastore DB (/var/lib/hive/metastore/metastore_db) is
    configured with derby and the permissions are not good:
    https://ccp.cloudera.com/display/CDH4DOC/Hive+Installation#HiveInstallation-UsingtheEmbeddedMetaStore%28Derby%29

    It needs to belong to the user of Beeswax which is very probably 'hue':
    https://groups.google.com/a/cloudera.org/group/hue-user/browse_thread/thread/0e583473634d0267#msg_184d55456b0c2744

    You also might need to remove the *lck files. If you have still some
    problems, please provide:

    ls -lR /var/lib/hive/metastore

    Romain

    On Mon, Feb 4, 2013 at 11:59 AM, Tom Nats wrote:

    Thanks Mark. I did see that as a suggestion so I did that but it didn't
    help.

    [root@h1 ~]# sudo -u hdfs hadoop fs -mkdir /user/root
    mkdir: cannot create directory /user/root: File exists

    [root@h1 ~]# sudo -u hdfs hadoop fs -ls /user
    Found 4 items
    drwxr-xr-x - hdfs supergroup 0 2013-01-31 10:23 /user/beeswax
    drwxr-xr-x - hdfs supergroup 0 2013-02-01 13:57 /user/hue
    drwxr-xr-x - root root 0 2013-02-01 12:47 /user/root
    drwxr-xr-x - tom tom 0 2013-02-01 12:50 /user/tom
    [root@h1 ~]# su - tom
    [tom@h1 ~]$ hive
    Hive history file=/tmp/tom/hive_job_log_tom_201302041157_1813245063.txt
    hive> create table foo (a INT);
    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Cannot
    get a connection, pool error Could not create a validated object, cause: A
    read-only user or a user in a read-only database is not permitted to
    disable read-only mode on a connection.
    NestedThrowables:
    org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
    pool error Could not create a validated object, cause: A read-only user or
    a user in a read-only database is not permitted to disable read-only mode
    on a connection.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask

    Thanks for the help.

    On Mon, Feb 4, 2013 at 11:55 AM, Mark Grover wrote:

    Looping in Cloudera Manager list (scm-users@cloudera.org).

    Tom,
    That error means that there is no home directory for the root user (by
    default: /user/root directory) present on HDFS. Hive is trying to create it
    using user "root" which doesn't have permissions to do so. One way to fix
    this would be to create the /user/root directory (as hdfs user) and make it
    owned by "root". Something like:
    sudo -u hdfs hadoop fs -mkdir /user/root
    sudo -u hdfs hadoop fs -chown root /user/root

    Perhaps, another way would be run hive as a different user which
    already has the directory created and ch'owned. Could you please list the
    contents of your /user directory in HDFS (hadoop fs -ls /user)?

    Mark
    On Sun, Feb 3, 2013 at 9:04 PM, Tnats wrote:

    Hi there, new to Hadoop/Cloudera so bear with me. I installed Cloudera
    Manager and installed a 3 node cluster (with all the applications
    available). Everything seems to be working good except when I try to go
    into Hive as root or hdfs, I receive an error on a simple create table. I
    searched through the Hive install doces (
    https://ccp.cloudera.com/display/CDHDOC/Hive+Installation) but don't
    see anything special I need to do except if I want to use the MySQL
    Metastore. Any help would be appreciated.

    -Tom

    [root@h1 ~]# whoami
    root
    [root@h1 ~]# hive
    Hive history
    file=/tmp/root/hive_job_log_root_201302032052_2003900843.txt
    hive> create table foo (a INT);
    FAILED: Error in metadata: MetaException(message:Got exception:
    org.apache.hadoop.security.AccessControlException
    org.apache.hadoop.security.AccessControlException: Permission denied:
    user=root, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x)
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask
    hive> quit;

    [root@h1 ~]# su - hdfs
    -bash-4.1$ hive
    Hive history
    file=/tmp/hdfs/hive_job_log_hdfs_201302032053_939408392.txt
    hive> create table foo (a INT);
    2013-02-04 04:53:16.948 GMT Thread[main,5,main]
    java.io.FileNotFoundException: derby.log (Permission denied)
    ----------------------------------------------------------------
    2013-02-04 04:53:17.623 GMT:
    Booting Derby version The Apache Software Foundation - Apache Derby -
    10.4.2.0 - (689064): instance a816c00e-013c-a38d-1217-000000a96730
    on database directory /var/lib/hive/metastore/metastore_db in READ
    ONLY mode

    Database Class Loader started - derby.database.classpath=''
    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException:
    Cannot get a connection, pool error Could not create a validated object,
    cause: A read-only user or a user in a read-only database is not permitted
    to disable read-only mode on a connection.
    NestedThrowables:
    org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
    pool error Could not create a validated object, cause: A read-only user or
    a user in a read-only database is not permitted to disable read-only mode
    on a connection.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask

    --


    --


  • Tom Nats at Feb 4, 2013 at 9:15 pm
    grr:

    [root@h1 metastore_db]# rm db.lck dbex.lck
    rm: remove regular file `db.lck'? y
    rm: remove regular file `dbex.lck'? y

    [root@h1 metastore_db]# hive
    Hive history file=/tmp/root/hive_job_log_root_201302041312_1020755620.txt
    hive> create table foo (a INT);
    FAILED: Error in metadata: MetaException(message:Got exception:
    org.apache.hadoop.security.AccessControlException
    org.apache.hadoop.security.AccessControlException: Permission denied:
    user=root, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x)
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask

    As soon as I ran that command above, the lck files appeared again owned by
    root:
    -rw-r--r-- 1 root root 38 Feb 4 13:13 db.lck
    -rw-r--r-- 1 root root 354 Feb 4 13:13 derby.log



    [root@h1 metastore_db]# hadoop fs -ls /
    Found 4 items
    drwxr-xr-x - hdfs supergroup 0 2013-02-01 14:07 /5
    drwxr-xr-x - hbase hbase 0 2013-02-04 12:24 /hbase
    drwxrwxrwt - hdfs hdfs 0 2013-02-01 14:13 /tmp
    drwxr-xr-x - hdfs supergroup 0 2013-02-04 12:36 /user

    [root@h1 metastore_db]# hadoop fs -ls /user
    Found 5 items
    drwxr-xr-x - hdfs supergroup 0 2013-02-01 14:13 /user/beeswax
    drwxr-xr-x - hdfs supergroup 0 2013-02-04 12:36 /user/hdfs
    drwxr-xr-x - hdfs supergroup 0 2013-02-01 13:57 /user/hue
    drwxr-xr-x - root root 0 2013-02-01 12:47 /user/root
    drwxr-xr-x - tom tom 0 2013-02-01 12:50 /user/tom



    On Mon, Feb 4, 2013 at 12:59 PM, Romain Rigaux wrote:

    Almost there!

    You need to delete these files, they lock the DB and are owned by 'root'
    and not 'hue':


    /var/lib/hive/metastore/metastore_db:
    total 28
    -rw-r--r-- 1 root root 4 Feb 4 12:28 dbex.lck
    -rw-r--r-- 1 root root 38 Feb 4 12:28 db.lck
    -rw-r--r-- 1 root root 354 Feb 4 12:28 derby.log
    drwxr-xr-x 2 root root 4096 Feb 4 12:28 tmp


    sudo rm /var/lib/hive/metastore/metastore_db/dbex.lck...

    Romain

    On Mon, Feb 4, 2013 at 12:46 PM, Tom Nats wrote:

    I have changed the permissions per one of the threads you sent me but
    still receiving the same error.


    [root@h1 metastore_db]# ls -lR /var/lib/hive/metastore
    /var/lib/hive/metastore:
    total 4
    drwxrwxrwt 5 root root 4096 Feb 4 12:28 metastore_db

    /var/lib/hive/metastore/metastore_db:
    total 28
    -rw-r--r-- 1 root root 4 Feb 4 12:28 dbex.lck
    -rw-r--r-- 1 root root 38 Feb 4 12:28 db.lck
    -rw-r--r-- 1 root root 354 Feb 4 12:28 derby.log
    drwxrwxrwt 2 hue hue 4096 Jan 31 10:47 log
    drwxrwxrwt 2 hue hue 4096 Jan 31 10:47 seg0
    -rwxrwxrwt 1 hue hue 860 Jan 31 10:47 service.properties
    drwxr-xr-x 2 root root 4096 Feb 4 12:28 tmp

    /var/lib/hive/metastore/metastore_db/log:
    total 1032
    -rwxrwxrwt 1 hue hue 1048576 Feb 4 12:28 log1.dat
    -rwxrwxrwt 1 hue hue 48 Feb 4 12:28 log.ctrl
    -rwxrwxrwt 1 hue hue 48 Feb 4 12:28 logmirror.ctrl

    /var/lib/hive/metastore/metastore_db/seg0:
    total 1972
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c101.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c10.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c111.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c121.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c130.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c141.dat
    -rwxrwxrwt 1 hue hue 16384 Feb 1 12:54 c150.dat
    -rwxrwxrwt 1 hue hue 16384 Feb 1 12:54 c161.dat
    -rwxrwxrwt 1 hue hue 16384 Feb 1 12:54 c171.dat
    -rwxrwxrwt 1 hue hue 94208 Feb 4 12:28 c180.dat
    -rwxrwxrwt 1 hue hue 16384 Feb 4 12:28 c191.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 4 12:28 c1a1.dat
    -rwxrwxrwt 1 hue hue 16384 Feb 4 12:28 c1b1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c1c0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c1d1.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c1e0.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c1f1.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c200.dat
    -rwxrwxrwt 1 hue hue 36864 Feb 1 12:32 c20.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c211.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c221.dat
    -rwxrwxrwt 1 hue hue 372736 Feb 1 12:54 c230.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c241.dat
    -rwxrwxrwt 1 hue hue 16384 Jan 31 10:47 c251.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c260.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c271.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c281.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c290.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c2a1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c2b1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c2c1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c2d0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c2e1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c2f0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c300.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c311.dat
    -rwxrwxrwt 1 hue hue 16384 Feb 1 12:32 c31.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c321.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c331.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c340.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c351.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c361.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c371.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c380.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c391.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c3a1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c3b1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c3c0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c3d1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c3e1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c3f1.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c400.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c411.dat
    -rwxrwxrwt 1 hue hue 20480 Feb 1 12:32 c41.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c420.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c431.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c441.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c451.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c460.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c471.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c480.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c491.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c4a0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c4b1.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c4c0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c4d1.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c4e0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c4f1.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c500.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c511.dat
    -rwxrwxrwt 1 hue hue 20480 Feb 1 12:32 c51.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c520.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c531.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c540.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c551.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c560.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c571.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c580.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c591.dat
    -rwxrwxrwt 1 hue hue 65536 Feb 1 12:32 c5a0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c5b1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c5c1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c5d1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c5e1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c5f1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c601.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c60.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c611.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c621.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c631.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c641.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c651.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 c661.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c71.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:32 c81.dat
    -rwxrwxrwt 1 hue hue 28672 Feb 1 12:54 c90.dat
    -rwxrwxrwt 1 hue hue 28672 Feb 1 12:54 ca1.dat
    -rwxrwxrwt 1 hue hue 8192 Feb 1 12:54 cb1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 cc0.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 cd1.dat
    -rwxrwxrwt 1 hue hue 8192 Jan 31 10:47 ce1.dat
    -rwxrwxrwt 1 hue hue 12288 Feb 1 12:32 cf0.dat


    On Mon, Feb 4, 2013 at 12:13 PM, Romain Rigaux wrote:

    +hue-user


    "on database directory /var/lib/hive/metastore/metastore_db in READ ONLY
    mode"

    It means that Hive metastore DB (/var/lib/hive/metastore/metastore_db)
    is configured with derby and the permissions are not good:
    https://ccp.cloudera.com/display/CDH4DOC/Hive+Installation#HiveInstallation-UsingtheEmbeddedMetaStore%28Derby%29

    It needs to belong to the user of Beeswax which is very probably 'hue':
    https://groups.google.com/a/cloudera.org/group/hue-user/browse_thread/thread/0e583473634d0267#msg_184d55456b0c2744

    You also might need to remove the *lck files. If you have still some
    problems, please provide:

    ls -lR /var/lib/hive/metastore

    Romain

    On Mon, Feb 4, 2013 at 11:59 AM, Tom Nats wrote:

    Thanks Mark. I did see that as a suggestion so I did that but it didn't
    help.

    [root@h1 ~]# sudo -u hdfs hadoop fs -mkdir /user/root
    mkdir: cannot create directory /user/root: File exists

    [root@h1 ~]# sudo -u hdfs hadoop fs -ls /user
    Found 4 items
    drwxr-xr-x - hdfs supergroup 0 2013-01-31 10:23 /user/beeswax
    drwxr-xr-x - hdfs supergroup 0 2013-02-01 13:57 /user/hue
    drwxr-xr-x - root root 0 2013-02-01 12:47 /user/root
    drwxr-xr-x - tom tom 0 2013-02-01 12:50 /user/tom
    [root@h1 ~]# su - tom
    [tom@h1 ~]$ hive
    Hive history file=/tmp/tom/hive_job_log_tom_201302041157_1813245063.txt
    hive> create table foo (a INT);
    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Cannot
    get a connection, pool error Could not create a validated object, cause: A
    read-only user or a user in a read-only database is not permitted to
    disable read-only mode on a connection.
    NestedThrowables:
    org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
    pool error Could not create a validated object, cause: A read-only user or
    a user in a read-only database is not permitted to disable read-only mode
    on a connection.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask

    Thanks for the help.

    On Mon, Feb 4, 2013 at 11:55 AM, Mark Grover wrote:

    Looping in Cloudera Manager list (scm-users@cloudera.org).

    Tom,
    That error means that there is no home directory for the root user (by
    default: /user/root directory) present on HDFS. Hive is trying to create it
    using user "root" which doesn't have permissions to do so. One way to fix
    this would be to create the /user/root directory (as hdfs user) and make it
    owned by "root". Something like:
    sudo -u hdfs hadoop fs -mkdir /user/root
    sudo -u hdfs hadoop fs -chown root /user/root

    Perhaps, another way would be run hive as a different user which
    already has the directory created and ch'owned. Could you please list the
    contents of your /user directory in HDFS (hadoop fs -ls /user)?

    Mark
    On Sun, Feb 3, 2013 at 9:04 PM, Tnats wrote:

    Hi there, new to Hadoop/Cloudera so bear with me. I installed
    Cloudera Manager and installed a 3 node cluster (with all the applications
    available). Everything seems to be working good except when I try to go
    into Hive as root or hdfs, I receive an error on a simple create table. I
    searched through the Hive install doces (
    https://ccp.cloudera.com/display/CDHDOC/Hive+Installation) but don't
    see anything special I need to do except if I want to use the MySQL
    Metastore. Any help would be appreciated.

    -Tom

    [root@h1 ~]# whoami
    root
    [root@h1 ~]# hive
    Hive history
    file=/tmp/root/hive_job_log_root_201302032052_2003900843.txt
    hive> create table foo (a INT);
    FAILED: Error in metadata: MetaException(message:Got exception:
    org.apache.hadoop.security.AccessControlException
    org.apache.hadoop.security.AccessControlException: Permission denied:
    user=root, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x)
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask
    hive> quit;

    [root@h1 ~]# su - hdfs
    -bash-4.1$ hive
    Hive history
    file=/tmp/hdfs/hive_job_log_hdfs_201302032053_939408392.txt
    hive> create table foo (a INT);
    2013-02-04 04:53:16.948 GMT Thread[main,5,main]
    java.io.FileNotFoundException: derby.log (Permission denied)
    ----------------------------------------------------------------
    2013-02-04 04:53:17.623 GMT:
    Booting Derby version The Apache Software Foundation - Apache Derby
    - 10.4.2.0 - (689064): instance a816c00e-013c-a38d-1217-000000a96730
    on database directory /var/lib/hive/metastore/metastore_db in READ
    ONLY mode

    Database Class Loader started - derby.database.classpath=''
    FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException:
    Cannot get a connection, pool error Could not create a validated object,
    cause: A read-only user or a user in a read-only database is not permitted
    to disable read-only mode on a connection.
    NestedThrowables:
    org.apache.commons.dbcp.SQLNestedException: Cannot get a connection,
    pool error Could not create a validated object, cause: A read-only user or
    a user in a read-only database is not permitted to disable read-only mode
    on a connection.
    FAILED: Execution Error, return code 1 from
    org.apache.hadoop.hive.ql.exec.DDLTask

    --


    --


Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupscm-users @
categorieshadoop
postedFeb 4, '13 at 7:55p
activeFeb 4, '13 at 9:15p
posts3
users3
websitecloudera.com
irc#hadoop

People

Translate

site design / logo © 2022 Grokbase