Primary links

The 2.3 server gives us an error right after installation

Default setup, right from the package to
/opt/activegrid_8086

After installation we've executed the following:

cd /opt/activegrid_8086/local/deployments
rm *
cp /opt/activegrid_8080/local/deployments/carel.conf .
/opt/activegrid_8086/bin/activegridctl restart --init

So far so good:

root@websrv1:/opt/activegrid_8086# bin/activegridctl restart --init
httpd not running, trying to start
Initializing application at http://localhost:8086/carel

But now we try to open the application from the webbrowser, and we get the following error message:

Mod_python error: "PythonHandler mphandler"

Traceback (most recent call last):

File "/opt/activegrid_8086/3rdparty/python/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
result = object(req)

File "/opt/activegrid_8080/lib/common/python/mphandler.py", line 16, in handler
return modpythonhandler.handler(req)

File "/opt/activegrid_8080/lib/common/python/activegrid/server/modpythonhandler.py", line 139, in handler
ctx = ModPythonContext(req, dplName)

File "/opt/activegrid_8080/lib/common/python/activegrid/server/modpythonhandler.py", line 234, in __init__
params, path)

File "/opt/activegrid_8080/lib/common/python/activegrid/server/runtimesupport.py", line 1533, in __init__
isTestMode=isTestMode)

File "/opt/activegrid_8080/lib/common/python/activegrid/server/runtimesupport.py", line 649, in __init__
self.dataServiceMgr = findDataServiceMgr(self.processModelName, preview=self.isPreviewMode)

File "/opt/activegrid_8080/lib/common/python/activegrid/server/runtimesupport.py", line 484, in findDataServiceMgr
dataServiceMgr = dataservice.DataServiceMgr(dply)

File "/opt/activegrid_8080/lib/common/python/activegrid/data/dataservice.py", line 693, in __init__
self._dataSourceMgr = DataSourceMgr(self._deployment)

File "/opt/activegrid_8080/lib/common/python/activegrid/data/dataservice.py", line 555, in __init__
self.addDataSource(dataSource)

File "/opt/activegrid_8080/lib/common/python/activegrid/data/dataservice.py", line 572, in addDataSource
dataSource.connectionFactory, dataSource.sqlGenerator = createDataSourceFactories(dataSource)

File "/opt/activegrid_8080/lib/common/python/activegrid/data/dataservice.py", line 419, in createDataSourceFactories
return _createDataSourceFactories(dataSource, type=_TYPE_CONNECTION)

File "/opt/activegrid_8080/lib/common/python/activegrid/data/dataservice.py", line 486, in _createDataSourceFactories
raise DataServiceException(msg, ex)

DataServiceException: Cannot find database client library for MySQL.
Caused by pkg_resources.ExtractionError: Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

[Errno 13] Permission denied: '/root/.python-eggs'

The Python egg cache directory is currently set to:

/root/.python-eggs

Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.

Is this some extra setting that we have to create on top of the normal settings?

FYI, we are using the exact same deployment that is running properly on 2.2.2.2, we just want to start testing speed, etc...

Eljakim

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gcohen's picture

Can you stop the server,

Can you stop the server,

export PYTHON_EGG_CACHE=/tmp

Then restart it, and tell me if the problem persists?

thanks,
geremy

--
Geremy Cohen
Community Dev Manager
ActiveGrid, Incorporated
150 Spear Street, Suite 525
San Francisco, California 94105

I'll check this in

I'll check this in Monday,

for now we've done:

sudo su
mkdir /root/.python-eggs
chmod 777 /root/.python-eggs

so, created this directory.

It seems like an installer problem that this happens.

Eljakim

gcohen's picture

If you wish to file this as

If you wish to file this as an issue prepended with 5992 we can track it here.

geremy

I'm having the same problem.

I'm having the same problem. Is there a solution for this? I tried the suggestion but I still can't run the deployed app.

small's picture

I believe this is fixed in

I believe this is fixed in the latest version, so once that is released, upgrading should fix your problem.  In the meantime, there are two workarounds:

 

For the first, stop the server, set the PYTHON_EGG_CACHE variable like so:

export PYTHON_EGG_CACHE=/tmp

And start the server again.

 

The second workaround, as Eljakim mentioned, is just to allow anyone to write to the /root/.python-eggs directory.  His instructions are above.

 

If neither of those work, could you paste your stack trace just so we can confirm the problem?

 

Thanks,

Matt

 

I tried but it didn't work

The attached file has the traceback log. Thanks.

 

 

Mod_python error: "PythonHandler mphandler"

Traceback (most recent call last):

File "/opt/activegrid-server-2.3/3rdparty/python/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
result = object(req)

File "/opt/activegrid-server-2.3/lib/common/python/mphandler.py", line 16, in handler
return modpythonhandler.handler(req)

File "/opt/activegrid-server-2.3/lib/common/python/activegrid/server/modpythonhandler.py", line 144, in handler
ctx = ModPythonContext(req, dplName)

File "/opt/activegrid-server-2.3/lib/common/python/activegrid/server/modpythonhandler.py", line 248, in __init__
params, path)

File "/opt/activegrid-server-2.3/lib/common/python/activegrid/server/runtimesupport.py", line 1570, in __init__
isTestMode=isTestMode)

File "/opt/activegrid-server-2.3/lib/common/python/activegrid/server/runtimesupport.py", line 666, in __init__
self.dataServiceMgr = findDataServiceMgr(self.processModelName, preview=self.isPreviewMode)

File "/opt/activegrid-server-2.3/lib/common/python/activegrid/server/runtimesupport.py", line 501, in findDataServiceMgr
dataServiceMgr = dataservice.DataServiceMgr(dply)

File "/opt/activegrid-server-2.3/lib/common/python/activegrid/data/dataservice.py", line 717, in __init__
self._dataSourceMgr = DataSourceMgr(self._deployment)

File "/opt/activegrid-server-2.3/lib/common/python/activegrid/data/dataservice.py", line 576, in __init__
self.addDataSource(dataSource)

File "/opt/activegrid-server-2.3/lib/common/python/activegrid/data/dataservice.py", line 590, in addDataSource
dataSource.connectionFactory, dataSource.sqlGenerator = createDataSourceFactories(dataSource)

File "/opt/activegrid-server-2.3/lib/common/python/activegrid/data/dataservice.py", line 440, in createDataSourceFactories
return _createDataSourceFactories(dataSource, type=_TYPE_CONNECTION)

File "/opt/activegrid-server-2.3/lib/common/python/activegrid/data/dataservice.py", line 507, in _createDataSourceFactories
raise DataServiceException(msg, ex)

DataServiceException: Cannot find database client library for MySQL.
Caused by pkg_resources.ExtractionError: Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

[Errno 13] Permission denied: '/root/.python-eggs'

The Python egg cache directory is currently set to:

/root/.python-eggs

Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.

small's picture

Hmm.. Let's focus on the

Hmm.. Let's focus on the second workaround.  Could you tell me the output of:

 

ls -ald /root/.python-eggs

Here is the output

Sure... here it is.

drwxrwxrwt 2 root root 4096 May  6 15:04 /root/.python-eggs

small's picture

Hmm, that looks OK.  Let me

Hmm, that looks OK.  Let me try this later today.

 

In the meantime, could you verify that you're using the latest 2.3.1 installer?

 

Thanks,
Matt

Thanks Matt! I'm on 2.3 but

Thanks Matt!

I'm on 2.3 but I will try 2.3.1 today. For some reason I can't access the activegrid website from my home connection (optimum online) and have to wait until I download this from work today.

updating the server to 2.3.1

updating the server to 2.3.1 resolved the startup issue, but now I can't access any protected pages or sign on.

small's picture

Glad that worked.   I'm not

Glad that worked.

 

I'm not sure about this other issue, though.  Could you open another thread so we can get some more info on that?

 

-matt