A trouble while installing in mod-mono server

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
6/30/2007 11:34:04 PM
Gravatar
Total Posts 16

A trouble while installing in mod-mono server

Hi Joe,

Another trouble occurred.

I downloaded mojoportal-2-2-2-8-pgsqlreleasefiles-for-mono.zip and installed it to my CentOS 5.0 server running mod-mono.

When I access to the installed url, I got this.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Parser Error
Description: Error parsing a resource required to service this request. Review your source file and modify it to fix this error.
Error message:
Cannot find type mojoPortal.Web.ModuleWrapper

File name: /var/www/mojoportal/Controls/ModuleWrapper.ascx Line: 1

Source Error: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ModuleWrapper.ascx.cs" Inherits="mojoPortal.Web.ModuleWrapper" %>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

What's wrong ?

7/1/2007 7:31:52 AM
Gravatar
Total Posts 18439

Re: A trouble while installing in mod-mono server

Hi Kiyoshi,

What version of Mono are you using? 1.2.4 or higher is needed.

The root of your web would need to be /var/www/mojoportal/ so it will correctly find the bin folder.

To rule out (or rule in) if it is a mod_mono configuration issue, you can try running the site from the command line with xsp2

cd into the /var/www/mojoportal/ and do

MONO_OPTIONS="--debug " xsp2

then you will be able to open a browser and navigate to http://localhost:8080 to see the site. If there are errors you may get more information from the console output. If it works then the problem is probably something about your mod_mono/apache configuration. I have some notes I made a while back about mod_mon/apache configuration here, hopefully they are still accurate.

Hope it helps,

Joe

7/1/2007 8:56:21 AM
Gravatar
Total Posts 16

Re: A trouble while installing in mod-mono server

Hi Joe,

Thank you for your reply.

My mono version is 1.2.3. Is this the reason of the trouble? Upgrading of mono is not easy, because rpm package for CentOS 5.0 (or RHEL 5) is not distributed, and I failed to build mono from source.

I think my mod_mono configuration is correct, because I got the same error message, when I tried running xsp2.

If it is impossible to run on mono 1.2.3, I will try to upgrade it.

Kiyoshi 

 

7/1/2007 9:24:24 AM
Gravatar
Total Posts 18439

Re: A trouble while installing in mod-mono server

Hi Kiyoshi,

I'm afraid it really will require 1.2.4 or higher.

I build mono from source without too much difficulty, but I build just the minimum needed stuff for ASP.NET. Its really much better if you have mono from svn head.

I have some notes here that may help. There is a script you can download to help checkout just the needed things. I think the script needs editing though because the url for mono svn changed recently.

The other thing is I hope you are using apache2, not the older apache, I never had much luck with the older version.

Hope it helps,

Joe

7/5/2007 7:22:27 PM
Gravatar
Total Posts 16

Re: A trouble while installing in mod-mono server

Hi Joe,

Thank you for your reply. I upgraded mono to 1.2.4, and then I could access to the installation site.

But this time I got this.

Welcome to mojoPortal Setup

The system cannot connect to the database. Please check your connection string.

I checked the connection string in "Web.config", and it was OK. I can access it by "psql" using the same userid and password written in "Web.config".

What's wrong?

7/5/2007 8:10:26 PM
Gravatar
Total Posts 18439

Re: A trouble while installing in mod-mono server

Hi Kiyoshi,

In Web.config there is a setting ShowConnectionErrorOnSetup, set that to true and maybe it will show a more helpful error message.

You are using the PostgreSQLConnectionString for your connection string right?

Hope it helps,

Joe

7/5/2007 8:12:09 PM
Gravatar
Total Posts 18439

Re: A trouble while installing in mod-mono server

Also, if the web server is on a different machine then you have to configure to allow the postgres user to connect from remote machines. This is disabled by default in postgresql I think.

Hope it helps,

Joe

7/5/2007 9:28:57 PM
Gravatar
Total Posts 16

Re: A trouble while installing in mod-mono server

Hi Joe,

Thank you. I set "ShowConnectionErrorOnSetup"  to true and got this.

Npgsql.NpgsqlException: Access denied at Npgsql.NpgsqlClosedState.Open (Npgsql.NpgsqlConnector context) [0x00000] at Npgsql.NpgsqlConnector.Open () [0x00000] at Npgsql.NpgsqlConnectorPool.GetNonPooledConnector (Npgsql.NpgsqlConnection Connection) [0x00000] at Npgsql.NpgsqlConnectorPool.RequestConnector (Npgsql.NpgsqlConnection Connection) [0x00000] at Npgsql.NpgsqlConnection.Open () [0x00000] at (wrapper remoting-invoke-with-check) Npgsql.NpgsqlConnection:Open () at mojoPortal.Data.NpgsqlHelper.ExecuteReader (System.String connectionString, CommandType commandType, System.String commandText, Npgsql.NpgsqlParameter[] commandParameters) [0x00000] 

My web server and postgres server is the same machine. And I can access to this db from a windows IIS server using the same "Web.config" file. 
 

7/6/2007 7:33:15 AM
Gravatar
Total Posts 18439

Re: A trouble while installing in mod-mono server

If using the same Web.config then you would need to change the server to localhost on the mono web/pgsql machine in connection string on the mono machine.

Still its possible even if the connection string is correct that pgsql is configured to allow tcp connections from the windows machine but not from the local machine.

Hope it helps,

Joe

7/6/2007 6:30:07 PM
Gravatar
Total Posts 16

Re: A trouble while installing in mod-mono server

Hi Joe,

I found that SELinux is causing trouble. In "/var/log/audit/audit.log" the following message is written:

type=AVC msg=audit(1183730735.410:200077): avc: denied { name_connect } for pid=12276 comm="mono" dest=5432 scontext=user_u:system_r:httpd_t:s0 tcontext=system_u:object_r:postgresql_port_t:s0 tclass=tcp_socket

I rebuilt the SELinux policy, then I can access my site successfully.

Thank you for your help,

Kiyoshi

You must sign in to post in the forums. This thread is closed to new posts.