Project

General

Profile

FAQ » History » Version 115

Toshi MARUYAMA, 2017-04-11 18:40
X_FORWARDED_PROTO or X-Forwarded-Proto (#24880, #25577)

1 1 Jean-Philippe Lang
h1. Frequently Asked Questions
2
3 2 Jean-Philippe Lang
{{TOC}}
4 1 Jean-Philippe Lang
5
h2. Installing and Running Redmine
6
7 60 Daniel Jones
h3. Does Redmine work with Rails 2.x.x?
8 28 Thomas Lecavelier
9 39 Jean-Philippe Lang
See compatibility in the [[RedmineInstall|Installation]] guide.
10 28 Thomas Lecavelier
11 18 Jean-Philippe Lang
h3. When I start the application, I get this error "in 'gem_original_require': no such file to load -- initializer (LoadError)"
12 10 Jean-Philippe Lang
13
Make sure "Ruby on Rails":http://rubyonrails.org/ is properly installed on your machine.
14
15 22 Jean-Philippe Lang
h3. When I start the application, I get this error message: "cannot connect to mysql: No such file or directory - /tmp/mysql.sock"
16
17
You have to specify the socket location in @config/database.yml@.
18 9 Jean-Philippe Lang
See http://dev.rubyonrails.org/ticket/200.
19 3 Thomas Lecavelier
20 9 Jean-Philippe Lang
h3. The application freeze after a long time of inactivity.
21 3 Thomas Lecavelier
22 45 Joe Stewart
There's a bug in ruby/mysql adapter < 2.7.3 that leads to lose the database connection. Please update your adapter.
23 15 Thomas Lecavelier
You can see thread at: http://rubyforge.org/forum/message.php?msg_id=25951.
24
25 35 Eric Davis
h3. Why does Redmine use http links when I want it to use https links in Apache? (SSL)
26
27
This happens when Apache sending requests to a backend server, like mongrel or thin.  Apache isn't telling the backend server to use https so the links are generated incorrectly.  Add the following configuration to Apache:
28
29 114 Sergiy Tkachuk
    RequestHeader set X_FORWARDED_PROTO 'https'
30 35 Eric Davis
31 115 Toshi MARUYAMA
or
32
33
    RequestHeader set X-Forwarded-Proto 'https'
34
35 84 Holger Just
h3. I get this error message with a Passenger deployment: ActionController::RoutingError (No route matches "/index.html" with {:method=>:get})
36
37
Your Apache erroneously interprets the @public/.htaccess@ file which is needed for (f)cgi deployments. You can stop that by eiter completely removing the file (as it is not needed by Passenger) or by inserting the following configuration directive to Apache.
38
39
    AllowOverride None
40
41 7 Jean-Philippe Lang
h2. Issue tracking
42
43
h3. I've created a new issue status but I can't use it, it doesn't show up in the status drop-down list.
44
45 8 Jean-Philippe Lang
Once you've created a new issue status, you need to include it in the workflow.
46 7 Jean-Philippe Lang
47 13 Jean-Philippe Lang
Say you have created a status named 'In progress' and you want the developers to be able to change bugs from 'New' to 'In progress'.
48 85 JC Wren
Go to "Administration -> Workflow", select 'Bug' and 'Developer', uncheck the 'Only display statuses that are used by this tracker' box then click edit.
49 86 JC Wren
You now see all the transitions allowed for developers on bugs. In the 'New' row, click the checkbox in the 'In progress' column and save.
50 13 Jean-Philippe Lang
51 1 Jean-Philippe Lang
See [[RedmineIssueTrackingSetup|Workflow setup]].
52 36 Mischa The Evil
53
h3. I've created a new tracker but I can't use it, it doesn't show up in the trackers drop-down list.
54
55
Once you've created a new tracker, you need to "activate" it for a specific project.
56
57
Say you have created a tracker named 'Task' and you want the new tracker to be used for your project;
58
* go to "(Project-)Settings -> tab 'Information' -> fieldset 'Trackers'",
59
* check the checkbox of the new tracker 'Task',
60
* and then click save.
61
62
You can now start using the new tracker 'Task' in the project for which you've just activated the new tracker.
63 11 Thomas Lecavelier
64 20 Eric Davis
h3. How does "Related issues" work?
65
66 82 Mischa The Evil
See [[RedmineIssues#Related-issues]] for an in-depth explanation.
67 20 Eric Davis
68 37 Mischa The Evil
h2. Time tracking
69
70
h3. The time calculations in "Spent time Reports" are wrong.
71
72 81 Mischa The Evil
You are probably entering spent-time values in Redmine using "decimal time format":http://en.wikipedia.org/wiki/Decimal_time. See [[RedmineTimeTracking#Decimal-time-format]] for an in-depth explanation.
73 37 Mischa The Evil
74 12 Jean-Philippe Lang
h2. Repositories
75
76
h3. Commits don't show up in the activity until I click on 'Repository'
77
78
By default, Redmine fetches the new commits from the repository only when you browse it.
79
80
If you want the commits to be retrieved periodically by Redmine in the background for all your repositories, uncheck 'Autofetch commits' setting and add a cron that runs (with appropriate environment):
81
82 87 Patrick Meidl
  rake -f /path/to/redmine/Rakefile RAILS_ENV=production redmine:fetch_changesets
83 12 Jean-Philippe Lang
84 47 Marco Bernasocchi
For SVN repositories you can also add the following command to a post-commit hook:
85
86
  ruby /path_to_redmine/redmine/script/runner "Repository.fetch_changesets" -e production
87
88 52 George Montana Harkin
*Note, the second method of post-commit hook will slow down commits and could possibly cause commits to fail if Redmine is not functioning. 
89
90 80 Daniel Widerin
You can bypass these disadvantages by sending the ruby-command to background.
91 79 Daniel Widerin
92
  ruby /path_to_redmine/redmine/script/runner "Repository.fetch_changesets" -e production > /dev/null 2>&1 &
93
94 19 Thomas Lecavelier
h3. I can't browse my svn repository through redmine
95
96 25 Jean-Philippe Lang
Check the following:
97
* Make sure you're using a svn client and server >= 1.3. Redmine parse the -xml output from subversion, which is a svn 1.3 feature.
98 55 Alex Ford
* Make sure that the web app is able to run the svn binary. (hint: check your path and ensure the svn binary is on it)
99 53 Jan from Planio www.plan.io
* When using a file:/// link, make sure the system user under which Redmine runs has access to the location specified by file:/// on your local file system. (Hint: By default, when using passenger, Redmine runs as the user which owns your config/environment.rb.)
100 25 Jean-Philippe Lang
101
If you're accessing the repository over HTTPS:
102
103
The initial import of a subversion repository over https requires that the ssl certificate fingerprint be manually validated and stored in a config-dir accessible by the user running the web server. It is recommended that a directory local to the redmine application root be provided, either as a default (./svn/.subversion) or as a provided parameter in the repository settings for subversion.
104
105
The work around for the certificate acceptance issue is to manually checkout anything from the svn server specifying the local config-dir and accepting the certificate +permanently+.
106
Example:
107
108
<pre>
109
$ svn --config-dir ./svn/.subversion co https://svn.mydomain.com/project/trunk delete-me
110
111
Error validating server certificate for 'https://svn.mydomain.com:443':
112
- The certificate is not issued by a trusted authority. Use the
113
fingerprint to validate the certificate manually!
114
- The certificate hostname does not match.
115
- The certificate has expired.
116
Certificate information:
117
- Hostname: svn.mydomain.com
118
- Valid: from Apr 8 12:00:00 2006 GMT until Sep 24 12:00:00 2010 GMT
119
- Issuer: mydomain.com, vrsource.org, Geneva, UN
120
- Fingerprint: 01:27:d9:6a:b8:db:63:f3:24:e3:41:c8:15:0a:f8:93:f6:7c:0f:11
121
(R)eject, accept (t)emporarily or accept (p)ermanently? p
122 1 Jean-Philippe Lang
</pre>
123 55 Alex Ford
124 56 Ki Won Kim
or modify subversion_adapter.rb in <redmine root>/lib/redmine/scm/adapters/subversion_adapter.rb
125
in credentials_string definition section chagne svn globaly options
126
from
127
<pre>
128
--no-auth-cache --non-interactive
129
</pre>
130
to
131
<pre>
132
--trust-server-cert --no-auth-cache --non-interactive
133
</pre>
134 55 Alex Ford
For additional information on the problem, check your log file for problems encountered during the svn operation. (e.g. /log/production.log )
135 19 Thomas Lecavelier
136 71 Roger Lipscombe
or list the certificate in @/etc/subversion/servers@. See http://www.geekforgod.com/2006/12/01/making-svn-trust-a-new-root-ca-certificate/ for details.
137
138 26 Jean-Philippe Lang
h3. Repository statistics doesn't show up
139 44 Mischa The Evil
140
* If you are using ruby 1.8.6:
141
There's a bug in rexml 3.1.7 provided with ruby 1.8.6. You can fix it yourself:
142 1 Jean-Philippe Lang
In @ruby/1.8/rexml/document.rb@ (line 186), change: @if transitive@ to @if trans@ then restart the app.
143 26 Jean-Philippe Lang
See http://www.germane-software.com/projects/rexml/ticket/115 for details.
144 44 Mischa The Evil
* If you are using Internet Explorer:
145
You'll need an SVG plugin like the one "Adobe provides":http://www.adobe.com/svg/viewer/install/beta.html to be able to display SVG-images properly within Internet Explorer.
146 26 Jean-Philippe Lang
147 42 Mischa The Evil
h2. Wikis
148
149
h3. How do I create sub-pages (parent/child relationships) in the wiki
150
151 83 Mischa The Evil
See [[RedmineWikis#Creating-sub-pages-parentchild-relationships]] for an in-depth explanation.
152 42 Mischa The Evil
153 78 Felix Schäfer
h3. Global Wiki
154
155
There is currently no global wiki, and the current permission system won't allow one. A workaround is to create a project, if needed only with a wiki, and to use it for all global needs.
156
157 11 Thomas Lecavelier
h2. Performance
158
159 49 Greg Mefford
h3. When I create a new issue, Redmine freezes for one minute.
160 11 Thomas Lecavelier
161 49 Greg Mefford
Make sure your SMTP server is properly configured or deactivate *email notifications* (remove @config/email.yml@) and restart Redmine.
162 21 Jean-Philippe Lang
163 1 Jean-Philippe Lang
h2. Miscellaneous
164 29 Thomas Lecavelier
165 48 Eric Davis
h3. Emails use the incorrect url
166
167 101 Mischa The Evil
The urls used in email is configured with the *[[RedmineSettings#Host-name-and-path|Host name and path]]* setting in Administration > Settings > General tab. It defaults to localhost:3000 (Ruby on Rails default). It should not include the protocol handler ("http://").
168 48 Eric Davis
169 62 Mischa The Evil
h3. Email notifications are not working
170
171
First, try to send a test email: go to _"Administration -> Settings -> Email notifications"_ and click _"Send a test email"_.
172
It will send an email to the email address of your Redmine account:
173 88 Justin M
* If you get an error, check your configuration in @config/configuration.yml@. See [[EmailConfiguration]].
174 62 Mischa The Evil
* If you don't receive any email, check your SMTP server log to see if the email was properly relayed.
175
176
For other problems (eg. some people receive notifications but others don't), you can enable email debug output in your Redmine log file by commenting out this line in @config/environments/production.rb@:
177
178
<pre>
179
config.action_mailer.logger = nil
180
</pre>
181
182
After restarting the application, every email sent will be dumped to your log file (@log/production.log@).
183
This way you can check the @To:@ field of emails to see if all the expected email addresses are present.
184
185 21 Jean-Philippe Lang
h3. All times are off by 1 hour after the daylight savings switched
186
187
Rails < 2.1 built-in time zone implementation doesn't handle DST. You have to install "TZInfo":http://tzinfo.rubyforge.org/.
188 31 Jean-Philippe Lang
To do so, run the following from your Redmine directory:
189 21 Jean-Philippe Lang
190
  ruby script/plugin install tzinfo_timezone
191 31 Jean-Philippe Lang
192 54 Jean-Philippe Lang
Do not install this plugin if you're using Redmine 0.8.
193
194
h3. What is the difference between Documents and Files?
195
196
The "Documents" section is for publishing specifications, notices, or other documents that do not belong in a SCM.
197
The "Files" section is for publishing versions of the tracked project, as a bundle (release).
198
199
h3. I get a 404-error when I try to view or diff a PHP-file
200
201
It's because Apache is seeing the extension @.php@ and tries to run the PHP-interpreter on the file. Since the requested URL isn't a real file, it returns a 404 error.
202
The solution is to turn off mod_php for your Redmine virtual host. That will cause Apache to call Redmine to serve up the file.
203
To do so, add the following lines to your virtual host configuration:
204
205
<pre><code>RemoveHandler .php
206 1 Jean-Philippe Lang
php_flag engine off    # Try without this line first
207
</code></pre>
208 64 Mischa The Evil
209
h3. Why are Textile inline styles not working?
210
211
Textile inline styles were disabled starting from Redmine version#2 for security reasons (see #2416).
212
213 102 Dieter Egert
If you really need this feature and don't fear XSS attacks as you don't have projects with public write access, then you'll need to manually change the Redmine source (source:/trunk/lib/redmine/wiki_formatting/textile/formatter.rb@2192#L33), or you change this in /lib/redmine/wiki_formatting/textile/formatter.rb :
214
215
<pre>self.filter_styles=false</pre>
216 105 petit dragon999
217
h3. Reset password lost without admin redmine account but with admin redmine database account
218
219 106 petit dragon999
Found in file /app/models/user.rb: 'The hashed password is stored in the following form: SHA1\(salt + SHA1(password))'
220 105 petit dragon999
So you can reset password in two steps:
221
- clear salt 
222
- calculate sha1(sha1(new_password))
223 110 Pawel Orzechowski
For example for the password "password" (without quote) it will be "353e8061f2befecb6818ba0c034c632fb0bcae1b"
224 107 petit dragon999
sah1(password)=0bd181063899c9239016320b50d3e896693a96df
225 110 Pawel Orzechowski
sha1(0bd181063899c9239016320b50d3e896693a96df)=353e8061f2befecb6818ba0c034c632fb0bcae1b
226 107 petit dragon999
227 111 Pawel Orzechowski
You have to go to redmine database, find "users" table, find user to reset password, clear "salt" field's user and put "353e8061f2befecb6818ba0c034c632fb0bcae1b" in "hashed_password" field's user and log to redmine with new password 'password' (without quote). To do this redmine database changes, do the following from command line in the operating system where Redmine is working:
228
* note user and password from a file config/database.yml.
229
* For MySQL
230
** execute command: @mysql -u <db user from database.yml> -p@
231
** enter: <password from database.yml>
232
** execute: @UPDATE users SET hashed_password='353e8061f2befecb6818ba0c034c632fb0bcae1b' WHERE login='admin';@
233
** execute: @UPDATE users SET salt='' WHERE login='admin';@
234
** execute: @exit@ 
235
236
Now you can go to Redmine login web page to login as user admin with 'password' as password.
237 112 Mischa The Evil
238
h3. Redirections after editing some content (e.g. versions) are incorrect when using FireFox >= 28
239
240
Redmine uses the HTTP referrer, specifically including the @path@ part of it, for correct redirection after editing some content (e.g. versions). Whenever the @path@ is not available, redirections will not work as expected (e.g. you are being redirected to the Home page instead of the Roadmap or project versions page); see #18058.
241
Mozilla Firefox 28 introduced a set of new settings (see changeset "e544d02(in Firefox SCM)":https://hg.mozilla.org/mozilla-central/rev/e544d028da74 and "this third-party summary":http://seenthis.net/sites/484641) to limit the default behavior for sending of HTTP referrers (see issue "822869(in Firefox bug tracker)":https://bugzilla.mozilla.org/show_bug.cgi?id=822869). At least one of them, namely @network.http.referer.trimmingPolicy@, is confirmed to break some redirections within Redmine after editing some content whenever its default value of '@0@' is changed and set to '@2@'. In that case the @path@ part is omitted in the HTTP referrers.
242
Changing this value to either '@0@' or '@1@' fixes the incorrect redirection behavior, as the @path@ part is included in the referrer with both those values.