You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Robert Kudyba <rk...@fordham.edu> on 2017/06/28 14:55:28 UTC

using Apache Spark standalone on a server for a class/multiple users, db.lck does not get removed

We have a Big Data class planned and we’d like students to be able to start spark-shell or pyspark as their own user. However the Derby database locks the process from starting as another user:

-rw-r--r-- 1 myuser staff   38 Jun 28 10:40 db.lck

And these errors appear:

ERROR PoolWatchThread: Error in trying to obtain a connection. Retrying in 7000ms
java.sql.SQLException: A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.setReadOnly(Unknown Source)
	at com.jolbox.bonecp.ConnectionHandle.setReadOnly(ConnectionHandle.java:1324)
	at com.jolbox.bonecp.ConnectionHandle.<init>(ConnectionHandle.java:262)
	at com.jolbox.bonecp.PoolWatchThread.fillConnections(PoolWatchThread.java:115)
	at com.jolbox.bonecp.PoolWatchThread.run(PoolWatchThread.java:82)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Caused by: ERROR 25505: A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection.
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.impl.sql.conn.GenericAuthorizer.setReadOnlyConnection(Unknown Source)
	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.setReadOnly(Unknown Source)

Is there a work around or best practice for this scenario?

RE: using Apache Spark standalone on a server for a class/multiple users, db.lck does not get removed

Posted by Mahesh Sawaiker <ma...@persistent.com>.
You could copy the spark folder to home directory of each user and set a different Spark home for each one..not sure what derby is used for, but you could try using mysql instead(if its for the hive metastore)

From: Robert Kudyba [mailto:rkudyba@fordham.edu]
Sent: Wednesday, June 28, 2017 8:25 PM
To: user@spark.apache.org
Subject: using Apache Spark standalone on a server for a class/multiple users, db.lck does not get removed

We have a Big Data class planned and we’d like students to be able to start spark-shell or pyspark as their own user. However the Derby database locks the process from starting as another user:


-rw-r--r-- 1 myuser staff   38 Jun 28 10:40 db.lck

And these errors appear:

ERROR PoolWatchThread: Error in trying to obtain a connection. Retrying in 7000ms
java.sql.SQLException: A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection.
                at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
                at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
                at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
                at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
                at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
                at org.apache.derby.impl.jdbc.EmbedConnection.setReadOnly(Unknown Source)
                at com.jolbox.bonecp.ConnectionHandle.setReadOnly(ConnectionHandle.java:1324)
                at com.jolbox.bonecp.ConnectionHandle.<init>(ConnectionHandle.java:262)
                at com.jolbox.bonecp.PoolWatchThread.fillConnections(PoolWatchThread.java:115)
                at com.jolbox.bonecp.PoolWatchThread.run(PoolWatchThread.java:82)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                at java.lang.Thread.run(Thread.java:748)
Caused by: ERROR 25505: A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection.
                at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
                at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
                at org.apache.derby.impl.sql.conn.GenericAuthorizer.setReadOnlyConnection(Unknown Source)
                at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.setReadOnly(Unknown Source)


Is there a work around or best practice for this scenario?
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.