Difference between revisions of "Can't open GUI"

From Kolmisoft Wiki
Jump to navigationJump to search
 
(79 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Image:something_went_wrong.png]]
==Troubleshooting==
==Troubleshooting==


* Check for error msg when trying to open GUI
* Check for error message when trying to open GUI.
* [[Check GUI log]] just after window fails to open.
* [[Check GUI log]] just after the window fails to open.
* Make sure that MySQL is running.
* Check MySQL log for read errors.


<br><br>
<br><br>
Line 17: Line 21:


===LoadError (Expected /home/mor/app/controllers/callc_controller.rb to define CallcController)===
===LoadError (Expected /home/mor/app/controllers/callc_controller.rb to define CallcController)===
'''gem install pdf-writer'''
====Debian====


  apt-get install libopenssl-ruby
  apt-get install libopenssl-ruby
/etc/init.d/apache2 restart
====Centos====
In file ''/home/mor/controllers/callc_controller.rb''
Comment line:
#require 'smtp_tls'
Restart Apache. If MOR GUI starts working, your ruby does not support SMTP. Either the ruby should be recompiled or an appropriate package should be installed.


----
----
Line 27: Line 47:


  gem install pdf-writer -y --no-rdoc --no-ri  
  gem install pdf-writer -y --no-rdoc --no-ri  
----
===rrno::EACCES (Permission denied - /tmp/mor_debug.txt)===
Login to bash and execute:
chmod 777 tmp


----
----
Line 32: Line 61:
===NoMethodError (undefined method `in_place_edit_for' for CallcController:Class)===
===NoMethodError (undefined method `in_place_edit_for' for CallcController:Class)===


The problem is that overnight Rails 2.0 was released. That ruined MOR running properly.
To fix this, you need to execute:
 
To fix this you need to execute:


  gem install rails -v=1.2.6
  gem install rails -v=1.2.6
Line 40: Line 67:
then go to /home/mor/config/environment.rb
then go to /home/mor/config/environment.rb


and add line:
and add the line:


'''RAILS_GEM_VERSION = '1.2.6''''
'''RAILS_GEM_VERSION = '1.2.6''''


save and restart apache – it should work.
Save and restart Apache – it should work now.


MOR code will be fixed to be Rails 2.0 compatible.
MOR code will be fixed to be Rails 2.0 compatible.
Line 79: Line 106:
  RailsFCGIHandler.process!
  RailsFCGIHandler.process!


That means mod_fcgid is not installed for Apache.
... it means that mod_fcgid is not installed for Apache.


[[mod_fcgid installation| Install mod_fcgid]]
[[mod_fcgid installation| Install mod_fcgid]]
Line 93: Line 120:


  chmod 777 /var/spool/asterisk/outgoing
  chmod 777 /var/spool/asterisk/outgoing
----
===Error sending email or when user registers===
[[Can't send email]]
----
===ActiveRecord::RecordNotFound (Couldn't find User with ID=0)===
Execute to DB:
UPDATE users SET id = 0 WHERE username = 'admin';
----
===Interlaced PNG images are not currently supported===
This happens when generating a PDF Invoice. Make sure your PNG image is not interlaced and does not have transparency. Also you can save your logo as a .jpg.
----
<br>
===No route matches "/" with {:method=>:get}===
Reason: MOR GUI files are not copied to /home/mor
Solution:
cp -r /usr/src/mor/gui/* /home/mor/
----
<br>
===Uninitialized constant Gem::GemRunner===
In file /usr/bin/gem add line:
require 'rubygems/gem_runner'
----
<br>
===Errno::EXDEV (Invalid cross-device link)===
This is an old error, prior to MOR PRO 0.6.
'''/home/app/mor/controllers/functions_controller.rb'''
def create_call_file...
      #create file
      fout = File.open(tmp_file, "w")
      fout.puts cf
      fout.close
      #activate file
      File.rename(tmp_file, spool_file)
change to:
      #create file
      fout = File.open(spool_file, "w")
      fout.puts cf
      fout.close
      #activate file
      #File.rename(tmp_file, spool_file)
Restart Apache.
----
<br>
===Folder content is shown===
Disable SELinux.
/bin/cp -r /usr/src/mor/centos/selinux/config /etc/selinux/
echo 0 >/selinux/enforce
Also make sure the Apache configuration file describes the MOR folder and AllowOverwrite=All where necessary.
----
<br>
===No such file or directory - /tmp/mysql.sock===
Make symlink from original mysql.sock (found in /etc/mysql/my.cnf or /etc/my.cnf) to /tmp/mysql.sock
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
----
<br>
===NoMethodError (undefined method 'exchange_rate' for nil:NilClass)===
Make sure you have all currencies for tariffs.
Example: if you have tariff in USD, but do not have USD in Currencies window - you will get this error. Create USD in Currencies window.
----
<br>
===TypeError (PNG alpha channel transparency is not supported; only palette transparency is supported.)===
Save your logo without transparency.
----
<br>
===ActiveRecord::StatementInvalid (Mysql::Error: Got a packet bigger than 'max_allowed_packet' bytes:===
In /etc/mysql/my.cnf, enter a bigger value for '''max_allowed_packet''' e.g.
max_allowed_packet = 100M
Reference: http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html
Do not forget to restart MySQL service:
/etc/init.d/mysqld restart
----
<br>
===Ruby Cairo bindings version 1.0.0.beta is too low. At least 1.5 is required===
cd /usr/src
wget http://cairographics.org/releases/rcairo-1.6.2.tar.gz
tar xzvf rcairo-1.6.2.tar.gz
cd rcairo-1.6.2
ruby extconf.rb
make
make install
Restart Apache.
----
<br>
===Uninitialized constant PDF::Wrapper::Gdk===
Debian:
apt-get -y install libgdk-pixbuf2-ruby libglib2-ruby libgtk2-ruby libgtk2.0-0 libgtk2.0-common
Centos/Fedora:
yum install gtk+ glib gdk-pixbuf
yum install ruby-gtk2
Restart Apache.
----
<br>
=== Ruby/Pango library not found. Visit http://ruby-gnome2.sourceforge.jp/ ===
apt-get update
apt-get install libpango1-ruby
/etc/init.d/apache2 restart
----
<br>
===Undefined method `set_source_pixbuf' for #<Cairo===
This error shows that you have a new Cairo installation, and MOR (RCairo) does not support newest image placing in PDF.
cd /usr/lib/ruby/gems/1.8/gems/pdf-wrapper-0.1.0/lib/pdf/wrapper/
Open file images.rb
and comment 140 and 141 lines:
#@context.set_source_pixbuf(pixbuf, 0, 0)
#@context.paint
Restart Apache.
Your PDF will not support images until pdf-wrapper is upgraded by its developers (http://github.com/yob/pdf-wrapper/tree/master/lib/pdf/)
More info:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/deprecated.html
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/namespaceGdk_1_1Cairo.html#ef7409ee62dfeab51ed980ca429b93e1
----
<br>
=== Errno::ECONNREFUSED (Connection refused - connect(2)) ===
Check [[AMI Connection]]

Latest revision as of 13:53, 21 February 2012

Something went wrong.png

Troubleshooting

  • Check for error message when trying to open GUI.
  • Check GUI log just after the window fails to open.
  • Make sure that MySQL is running.
  • Check MySQL log for read errors.



Error

Forbidden You don't have permission to access /mor/ on this server.

Possible reason: Apache is misconfigured and does not describe MOR page.

Solution not described yet...


LoadError (Expected /home/mor/app/controllers/callc_controller.rb to define CallcController)

gem install pdf-writer

Debian

apt-get install libopenssl-ruby
/etc/init.d/apache2 restart


Centos

In file /home/mor/controllers/callc_controller.rb

Comment line:

#require 'smtp_tls'

Restart Apache. If MOR GUI starts working, your ruby does not support SMTP. Either the ruby should be recompiled or an appropriate package should be installed.


LoadError (Expected /home/mor/app/controllers/stats_controller.rb to define StatsController)

Execute:

gem install pdf-writer -y --no-rdoc --no-ri 

rrno::EACCES (Permission denied - /tmp/mor_debug.txt)

Login to bash and execute:

chmod 777 tmp



NoMethodError (undefined method `in_place_edit_for' for CallcController:Class)

To fix this, you need to execute:

gem install rails -v=1.2.6

then go to /home/mor/config/environment.rb

and add the line:

RAILS_GEM_VERSION = '1.2.6'

Save and restart Apache – it should work now.

MOR code will be fixed to be Rails 2.0 compatible.



FCGI info is shown in text format

If you see something like this:

#!/usr/bin/ruby
#
# You may specify the path to the FastCGI crash log (a log of unhandled
# exceptions which forced the FastCGI instance to exit, great for debugging)
# and the number of requests to process before running garbage collection.
#
# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
# and the GC period is nil (turned off).  A reasonable number of requests
# could range from 10-100 depending on the memory footprint of your app.
#
# Example:
#   # Default log path, normal GC behavior.
#   RailsFCGIHandler.process!
#
#   # Default log path, 50 requests between GC.
#   RailsFCGIHandler.process! nil, 50
#
#   # Custom log path, normal GC behavior.
#   RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
#
require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'
RailsFCGIHandler.process!

... it means that mod_fcgid is not installed for Apache.

Install mod_fcgid



Errno::EACCES (Permission denied - /tmp/mor_cf_xxxx or /var/spool/asterisk/outgoing/mor_cf_xxxx)

Bad permissions on /var/spool/asterisk/outgoing/

Fix:

chmod 777 /var/spool/asterisk/outgoing

Error sending email or when user registers

Can't send email


ActiveRecord::RecordNotFound (Couldn't find User with ID=0)

Execute to DB:

UPDATE users SET id = 0 WHERE username = 'admin';



Interlaced PNG images are not currently supported

This happens when generating a PDF Invoice. Make sure your PNG image is not interlaced and does not have transparency. Also you can save your logo as a .jpg.




No route matches "/" with {:method=>:get}

Reason: MOR GUI files are not copied to /home/mor

Solution:

cp -r /usr/src/mor/gui/* /home/mor/




Uninitialized constant Gem::GemRunner

In file /usr/bin/gem add line:

require 'rubygems/gem_runner'


Errno::EXDEV (Invalid cross-device link)

This is an old error, prior to MOR PRO 0.6.

/home/app/mor/controllers/functions_controller.rb

def create_call_file...

     #create file
     fout = File.open(tmp_file, "w")
     fout.puts cf
     fout.close
     #activate file
     File.rename(tmp_file, spool_file)

change to:

     #create file
     fout = File.open(spool_file, "w")
     fout.puts cf
     fout.close
     #activate file
     #File.rename(tmp_file, spool_file)

Restart Apache.



Folder content is shown

Disable SELinux.

/bin/cp -r /usr/src/mor/centos/selinux/config /etc/selinux/
echo 0 >/selinux/enforce 

Also make sure the Apache configuration file describes the MOR folder and AllowOverwrite=All where necessary.




No such file or directory - /tmp/mysql.sock

Make symlink from original mysql.sock (found in /etc/mysql/my.cnf or /etc/my.cnf) to /tmp/mysql.sock

ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock





NoMethodError (undefined method 'exchange_rate' for nil:NilClass)

Make sure you have all currencies for tariffs.

Example: if you have tariff in USD, but do not have USD in Currencies window - you will get this error. Create USD in Currencies window.




TypeError (PNG alpha channel transparency is not supported; only palette transparency is supported.)

Save your logo without transparency.




ActiveRecord::StatementInvalid (Mysql::Error: Got a packet bigger than 'max_allowed_packet' bytes:

In /etc/mysql/my.cnf, enter a bigger value for max_allowed_packet e.g.

max_allowed_packet = 100M

Reference: http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html

Do not forget to restart MySQL service:

/etc/init.d/mysqld restart


Ruby Cairo bindings version 1.0.0.beta is too low. At least 1.5 is required

cd /usr/src
wget http://cairographics.org/releases/rcairo-1.6.2.tar.gz
tar xzvf rcairo-1.6.2.tar.gz
cd rcairo-1.6.2
ruby extconf.rb
make
make install

Restart Apache.



Uninitialized constant PDF::Wrapper::Gdk

Debian:

apt-get -y install libgdk-pixbuf2-ruby libglib2-ruby libgtk2-ruby libgtk2.0-0 libgtk2.0-common

Centos/Fedora:

yum install gtk+ glib gdk-pixbuf
yum install ruby-gtk2

Restart Apache.




Ruby/Pango library not found. Visit http://ruby-gnome2.sourceforge.jp/

apt-get update
apt-get install libpango1-ruby
/etc/init.d/apache2 restart


Undefined method `set_source_pixbuf' for #<Cairo

This error shows that you have a new Cairo installation, and MOR (RCairo) does not support newest image placing in PDF.

cd /usr/lib/ruby/gems/1.8/gems/pdf-wrapper-0.1.0/lib/pdf/wrapper/

Open file images.rb

and comment 140 and 141 lines:

#@context.set_source_pixbuf(pixbuf, 0, 0)
#@context.paint

Restart Apache.

Your PDF will not support images until pdf-wrapper is upgraded by its developers (http://github.com/yob/pdf-wrapper/tree/master/lib/pdf/)

More info:

http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/deprecated.html
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/namespaceGdk_1_1Cairo.html#ef7409ee62dfeab51ed980ca429b93e1




Errno::ECONNREFUSED (Connection refused - connect(2))

Check AMI Connection