summaryrefslogtreecommitdiffstats
path: root/docs/en/xml/troubleshooting.xml
blob: f42436d2e8a16c0faee1a8dce4700e969dd93505 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<?xml version="1.0"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
                      "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
    <!ENTITY % myents SYSTEM "bugzilla.ent">
    %myents;
]>

<appendix id="troubleshooting">
<title>Troubleshooting</title>

  <para>This section gives solutions to common Bugzilla installation
  problems. If none of the section headings seems to match your
  problem, read the general advice.
  </para>
    
  <section id="general-advice">
  <title>General Advice</title>
    <para>If you can't get <filename>checksetup.pl</filename> to run to 
    completion, it normally explains what's wrong and how to fix it.
    If you can't work it out, or if it's being uncommunicative, post 
    the errors in the 
    <ulink url="news://news.mozilla.org/mozilla.support.bugzilla">mozilla.support.bugzilla</ulink>
    newsgroup.
    </para>

    <para>If you have made it all the way through
    <xref linkend="installation"/> (Installation) and
    <xref linkend="configuration"/> (Configuration) but accessing the Bugzilla
    URL doesn't work, the first thing to do is to check your web server error
    log. For Apache, this is often located at
    <filename>/etc/logs/httpd/error_log</filename>. The error messages
    you see may be self-explanatory enough to enable you to diagnose and
    fix the problem. If not, see below for some commonly-encountered 
    errors. If that doesn't help, post the errors to the newsgroup.
    </para>

    <para>
      Bugzilla can also log all user-based errors (and many code-based errors)
      that occur, without polluting the web server's error log.  To enable
      Bugzilla error logging, create a file that Bugzilla can write to, named
      <filename>errorlog</filename>, in the Bugzilla <filename>data</filename>
      directory.  Errors will be logged as they occur, and will include the type
      of the error, the IP address and username (if available) of the user who
      triggered the error, and the values of all environment variables; if a
      form was being submitted, the data in the form will also be included.
      To disable error logging, delete or rename the
      <filename>errorlog</filename> file.
    </para>
  </section>
        
  <section id="trbl-testserver">
  <title>The Apache web server is not serving Bugzilla pages</title>
    <para>After you have run <command>checksetup.pl</command> twice,
    run <command>testserver.pl http://yoursite.yourdomain/yoururl</command>
    to confirm that your web server is configured properly for
    Bugzilla.
    </para>
    <programlisting>
<prompt>bash$</prompt> ./testserver.pl http://landfill.bugzilla.org/bugzilla-tip
TEST-OK Webserver is running under group id in $webservergroup.
TEST-OK Got ant picture.
TEST-OK Webserver is executing CGIs.
TEST-OK Webserver is preventing fetch of http://landfill.bugzilla.org/bugzilla-tip/localconfig.
</programlisting>
  </section>

  <section id="trbl-perlmodule">
  <title>I installed a Perl module, but 
      <filename>checksetup.pl</filename> claims it's not installed!</title>
      
    <para>This could be caused by one of two things:</para>
    <orderedlist>
      <listitem>
        <para>You have two versions of Perl on your machine. You are installing
        modules into one, and Bugzilla is using the other. Rerun the CPAN
        commands (or manual compile) using the full path to Perl from the 
        top of <filename>checksetup.pl</filename>. This will make sure you 
        are installing the modules in the right place.
        </para>
      </listitem>
      <listitem>
        <para>The permissions on your library directories are set incorrectly.
        They must, at the very least, be readable by the web server user or
        group. It is recommended that they be world readable.
        </para>
      </listitem>
    </orderedlist>
  </section>

  <section id="trbl-dbdSponge">
  <title>DBD::Sponge::db prepare failed</title>
      
    <para>The following error message may appear due to a bug in DBD::mysql
    (over which the Bugzilla team have no control):
    </para>
      
<programlisting><![CDATA[ DBD::Sponge::db prepare failed: Cannot determine NUM_OF_FIELDS at D:/Perl/site/lib/DBD/mysql.pm line 248.
  SV = NULL(0x0) at 0x20fc444
  REFCNT = 1
  FLAGS = (PADBUSY,PADMY)
]]></programlisting>

    <para>To fix this, go to 
    <filename>&lt;path-to-perl&gt;/lib/DBD/sponge.pm</filename> 
    in your Perl installation and replace
    </para>
        
<programlisting><![CDATA[ my $numFields;
 if ($attribs->{'NUM_OF_FIELDS'}) {
     $numFields = $attribs->{'NUM_OF_FIELDS'};
 } elsif ($attribs->{'NAME'}) {
     $numFields = @{$attribs->{NAME}};
]]></programlisting>

    <para>with</para>

<programlisting><![CDATA[ my $numFields;
 if ($attribs->{'NUM_OF_FIELDS'}) {
     $numFields = $attribs->{'NUM_OF_FIELDS'};
 } elsif ($attribs->{'NAMES'}) {
     $numFields = @{$attribs->{NAMES}};
]]></programlisting>

     <para>(note the S added to NAME.)</para>
  </section>
    
  <section id="paranoid-security">
  <title>cannot chdir(/var/spool/mqueue)</title>

    <para>If you are installing Bugzilla on SuSE Linux, or some other
    distributions with <quote>paranoid</quote> security options, it is
    possible that the checksetup.pl script may fail with the error: 
<programlisting><![CDATA[cannot chdir(/var/spool/mqueue): Permission denied
]]></programlisting>
    </para>
      
    <para>This is because your <filename>/var/spool/mqueue</filename>
    directory has a mode of <computeroutput>drwx------</computeroutput>.
    Type <command>chmod 755 <filename>/var/spool/mqueue</filename></command>
    as root to fix this problem. This will allow any process running on your
    machine the ability to <emphasis>read</emphasis> the
    <filename>/var/spool/mqueue</filename> directory.
    </para>
  </section>    

  <section id="trbl-relogin-everyone">
  <title>Everybody is constantly being forced to relogin</title>
  
  <para>The most-likely cause is that the <quote>cookiepath</quote> parameter
  is not set correctly in the Bugzilla configuration.  You can change this (if
  you're a Bugzilla administrator) from the editparams.cgi page via the web interface.
  </para>

  <para>The value of the cookiepath parameter should be the actual directory
  containing your Bugzilla installation, <emphasis>as seen by the end-user's
  web browser</emphasis>. Leading and trailing slashes are mandatory. You can
  also set the cookiepath to any directory which is a parent of the Bugzilla
  directory (such as '/', the root directory). But you can't put something
  that isn't at least a partial match or it won't work. What you're actually
  doing is restricting the end-user's browser to sending the cookies back only
  to that directory.
  </para>

  <para>How do you know if you want your specific Bugzilla directory or the
  whole site?
  </para>

  <para>If you have only one Bugzilla running on the server, and you don't
  mind having other applications on the same server with it being able to see
  the cookies (you might be doing this on purpose if you have other things on
  your site that share authentication with Bugzilla), then you'll want to have
  the cookiepath set to "/", or to a sufficiently-high enough directory that
  all of the involved apps can see the cookies.
  </para>

  <example id="trbl-relogin-everyone-share">
  <title>Examples of urlbase/cookiepath pairs for sharing login cookies</title>

    <blockquote>
      <literallayout>
urlbase is http://bugzilla.mozilla.org/
cookiepath is /

urlbase is http://tools.mysite.tld/bugzilla/
        but you have http://tools.mysite.tld/someotherapp/ which shares
        authentication with your Bugzilla
cookiepath is /
      </literallayout>
    </blockquote>
  </example>

   <para>On the other hand, if you have more than one Bugzilla running on the
   server (some people do - we do on landfill) then you need to have the
   cookiepath restricted enough so that the different Bugzillas don't
   confuse their cookies with one another.
   </para>


   <example id="trbl-relogin-everyone-restrict">
   <title>Examples of urlbase/cookiepath pairs to restrict the login cookie</title>
      <blockquote>
        <literallayout>
urlbase is http://landfill.bugzilla.org/bugzilla-tip/
cookiepath is /bugzilla-tip/

urlbase is http://landfill.bugzilla.org/bugzilla-4.0-branch/
cookiepath is /bugzilla-4.0-branch/
        </literallayout>
      </blockquote>
    </example>

    <para>If you had cookiepath set to <quote>/</quote> at any point in the
    past and need to set it to something more restrictive
    (i.e. <quote>/bugzilla/</quote>), you can safely do this without
    requiring users to delete their Bugzilla-related cookies in their
    browser (this is true starting with Bugzilla 2.18 and Bugzilla 2.16.5).
    </para>
  </section>

  <section id="trbl-index">
  <title><filename>index.cgi</filename> doesn't show up unless specified in the URL</title>
    <para>
      You probably need to set up your web server in such a way that it
      will serve the index.cgi page as an index page.
    </para>
    <para>
      If you are using Apache, you can do this by adding 
      <filename>index.cgi</filename> to the end of the 
      <computeroutput>DirectoryIndex</computeroutput> line
      as mentioned in <xref linkend="http-apache"/>.
    </para>

  </section>

  <section id="trbl-passwd-encryption">
    <title>
      checksetup.pl reports "Client does not support authentication protocol
      requested by server..."
    </title>

    <para>
      This error is occurring because you are using the new password
      encryption that comes with MySQL 4.1, while your
      <filename>DBD::mysql</filename> module was compiled against an
      older version of MySQL. If you recompile <filename>DBD::mysql</filename>
      against the current MySQL libraries (or just obtain a newer version
      of this module) then the error may go away.
    </para>

    <para>
      If that does not fix the problem, or if you cannot recompile the
      existing module (e.g. you're running Windows) and/or don't want to
      replace it (e.g. you want to keep using a packaged version), then a
      workaround is available from the MySQL docs:
      <ulink url="http://dev.mysql.com/doc/mysql/en/Old_client.html"/>
    </para>

  </section>

</appendix> 

<!-- Keep this comment at the end of the file 
Local variables: 
mode: sgml 
sgml-always-quote-attributes:t
sgml-auto-insert-required-elements:t
sgml-balanced-tag-edit:t
sgml-exposed-tags:nil
sgml-general-insert-case:lower
sgml-indent-data:t 
sgml-indent-step:2 
sgml-local-catalogs:nil
sgml-local-ecat-files:nil 
sgml-minimize-attributes:nil
sgml-namecase-general:t 
sgml-omittag:t
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
sgml-shorttag:t 
sgml-tag-region-if-active:t 
End: -->