Difference between revisions of "Dev Troubleshooting"

From Dreamwidth Notes
Jump to: navigation, search
(New page: == Is your system updated? == Make sure that your system is updated. Dreamwidth code is best supported by Ubuntu Intrepid. To update all your packages, you should be logged in as root an...)
 
(took away unfilled in update note, added a note about checkconfig.pl)
 
(13 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
== Is your system updated? ==
 
== Is your system updated? ==
  
Make sure that your system is updated.  Dreamwidth code is best supported by Ubuntu Intrepid. To update all your packages, you should be logged in as root and then run:
+
If you are running your own system and not a Dreamhack, make sure that your system is updated.  Dreamwidth code is best supported by Ubuntu. To update all your packages, you should be logged in as root and then run:
  
 
  apt-get update
 
  apt-get update
 
  apt-get upgrade
 
  apt-get upgrade
  
If you need to upgrade Ubuntu from Hardy to Intrepid, first you will want to edit this file:
+
== Is your code updated? ==
  
vi /etc/apt/sources.list
+
There are instructions to update your DW code at [[Dev Maintenance]].
  
And replace all instances of "hardy" with "intrepid".  The easy vi command for that is:
+
== Restarting Apache ==
  
  %s/hardy/intrepid/g
+
Sometimes stopping and restarting Apache can help. If you are on a Dreamhack use the commands:
  
Then, run the two <code>apt-get</code> commands above.
+
stop-apache
 +
start-apache
  
== Apache Error Logs ==
+
If you are on your own machine, probably something closer to:
  
The error logs for Apache (the web server) are probably located at:
+
sudo /etc/init.d/apache2 stop
 +
sudo /etc/init.d/apache2 start
  
/var/log/apache2/error.log
+
Restarting Apache is also needed when you've changed Perl code.
  
Loading blank pages are probably the result of mod_perl crashing (often called a "segfault").
+
== Apache access and error logs ==
 +
 
 +
The access and error logs for Apache (the web server) are located at <code>/var/log/apache2/access.log</code> and <code>/var/log/apache2/error.log</code> for a default Ubuntu installation.  Loading blank pages are probably the result of mod_perl crashing (often called a "segfault").
 +
 
 +
You can see the latest access and error messages by using the tail command:
 +
 
 +
sudo tail /var/log/apache2/error.log
 +
 
 +
== Apache fails to start ==
 +
 
 +
If you've been coding and Apache fails to restart, make sure to check the error logs for the problem:
 +
 
 +
sudo tail /var/log/apache2/error.log
 +
 
 +
== Maybe you are missing packages ==
 +
 
 +
If you are not on a Dreamhack, consider that you might be missing some packages.  For instance, OpenID no longer works unless you have the libraries installed on your system:
 +
 
 +
apt-get install libnet-openid-consumer-perl libnet-openid-server-perl
 +
 
 +
You can run a check config to see if it has any warnings for you:
 +
 
 +
bin/checkconfig.pl
 +
 
 +
== Correct version of Perl ==
 +
 
 +
You need a 64-bit Perl to run Dreamwidth. If the Linux distribution you're using is 64-bit, then you should have a 64-bit version of Perl already. If you're not sure, though, this command will tell you:
 +
 
 +
perl -e 'print unpack("Q", pack("Q", length(sprintf("%b", ~0)))) . "-bit\n";'
 +
 
 +
This should print out "64-bit". If it prints anything else, or gives you any errors (like "Invalid type 'Q'"), it's not 64-bit.
 +
 
 +
Also, the version of Perl used in the "Lucid" distribution of Ubuntu (5.10.1-8ubuntu2.1) has a bug in it that the Dreamwidth code can run into; if you're using that version, you may want to upgrade. [http://dw-dev.dreamwidth.org/120658.html Perl 5.8 is no longer considered supported for Dreamwidth development as of 2012 July 18.]
  
 
[[Category: Development]]
 
[[Category: Development]]

Latest revision as of 02:49, 21 August 2012

Is your system updated?

If you are running your own system and not a Dreamhack, make sure that your system is updated. Dreamwidth code is best supported by Ubuntu. To update all your packages, you should be logged in as root and then run:

apt-get update
apt-get upgrade

Is your code updated?

There are instructions to update your DW code at Dev Maintenance.

Restarting Apache

Sometimes stopping and restarting Apache can help. If you are on a Dreamhack use the commands:

stop-apache
start-apache

If you are on your own machine, probably something closer to:

sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 start

Restarting Apache is also needed when you've changed Perl code.

Apache access and error logs

The access and error logs for Apache (the web server) are located at /var/log/apache2/access.log and /var/log/apache2/error.log for a default Ubuntu installation. Loading blank pages are probably the result of mod_perl crashing (often called a "segfault").

You can see the latest access and error messages by using the tail command:

sudo tail /var/log/apache2/error.log

Apache fails to start

If you've been coding and Apache fails to restart, make sure to check the error logs for the problem:

sudo tail /var/log/apache2/error.log

Maybe you are missing packages

If you are not on a Dreamhack, consider that you might be missing some packages. For instance, OpenID no longer works unless you have the libraries installed on your system:

apt-get install libnet-openid-consumer-perl libnet-openid-server-perl

You can run a check config to see if it has any warnings for you:

bin/checkconfig.pl

Correct version of Perl

You need a 64-bit Perl to run Dreamwidth. If the Linux distribution you're using is 64-bit, then you should have a 64-bit version of Perl already. If you're not sure, though, this command will tell you:

perl -e 'print unpack("Q", pack("Q", length(sprintf("%b", ~0)))) . "-bit\n";'

This should print out "64-bit". If it prints anything else, or gives you any errors (like "Invalid type 'Q'"), it's not 64-bit.

Also, the version of Perl used in the "Lucid" distribution of Ubuntu (5.10.1-8ubuntu2.1) has a bug in it that the Dreamwidth code can run into; if you're using that version, you may want to upgrade. Perl 5.8 is no longer considered supported for Dreamwidth development as of 2012 July 18.