Debian Codegraph @

doc/howto/LogMessages.html

raw symbols SCIP
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>ProFTPD Logging: Log Messages</title>
5 </head>
6
7 <body bgcolor=white>
8
9 <hr>
10 <center><h2><b>ProFTPD Logging: Log Messages</b></h2></center>
11 <hr>
12
13 <p>
14 <b>Log Messages</b>
15 This document attempts to list the most common messages logged (either via
16 <code>syslog</code> or the <code>SystemLog</code> file), grouped by the
17 <a href="LogLevels.html">log level</a> for the message.
18
19 <p><a name="EMERG">
20 <b><code>EMERG</code> Log Messages</b><br>
21 There are currently no <code>EMERG</code>-level messages logged by
22 <code>proftpd</code>.
23
24 <p><a name="ALERT">
25 <b><code>ALERT</code> Log Messages</b><br>
26 <code>ALERT</code>-level messages are logged by <code>proftpd</code> when a
27 crucial system resource (<i>e.g.</i> memory, CPU, file descriptors, disk
28 space) has been exhausted.
29
30 <ul>
31 <li>"Out of memory!"<br>
32 This log message can be generated by various core subsystems and modules,
33 and indicates that <code>proftpd</code> could not allocate enough memory.
34 </li>
35
36 <p>
37 <li>"unable to fork"<br>
38 This log message indicates that <code>proftpd</code> tried to fork a new
39 process (<i>e.g.</i> to read passphrases, execute a script, <i>etc</i>) and
40 failed. This can happen when the process table is full, or when there is
41 not enough system memory to create a new process.
42 </li>
43
44 <p>
45 <li>"cannot write ExtendedLog", <i>or</i> "failed to write <em>file</em>: No space on device"<br>
46 These log messages indicate that the filesystem on which the files are
47 being written is out of space.
48 </li>
49 </ul>
50
51 <p><a name="CRIT">
52 <b><code>CRIT</code> Log Messages</b><br>
53 There are currently no <code>CRIT</code>-level messages logged by
54 <code>proftpd</code>.
55
56 <p><a name="ERR">
57 <b><code>ERR</code> Log Messages</b><br>
58 <code>ERR</code>-level messages are logged by <code>proftpd</code> when
59 <code>proftpd</code> cannot start up because it cannot use the given
60 configuration for some reason: no DNS resolution for hostnames, unable to listen
61 on addresses/ports, or necessary cryptographics keys/certs are unusable.
62 <ul>
63 <li>Failed binding to <i>address</i>, port <i>port</i><br>
64 Check the ServerType directive to ensure you are configured correctly<br>
65 Check to see if inetd/xinetd, or another proftpd instance, is already using <i>address</i>, port <i>port</i><br>
66 <br>
67 When <code>proftpd</code> starts up, it will attempt to bind sockets to,
68 and listen on, all of the configured addresses/ports. If it cannot bind
69 to an address/port, the above message is logged. As mentioned in the log
70 message, the most common cause is that another <code>proftpd</code> daemon
71 is running and is using the address/port, <i>or</i> that
72 <code>inetd/xinetd</code> is using the address/port because your FTP
73 server is supposed to be run that way; if so, check that the
74 <a href="ServerType.html"><code>ServerType</code></a> in the
75 <code>proftpd.conf</code> file is "inetd" and not "standalone".
76 </li>
77
78 <p>
79 <li>"unable to listen on <i>address</i>#<i>port</i>"<br>
80 When <code>proftpd</code> starts up, it will attempt to bind sockets to,
81 and listen on, all of the configured addresses/ports. If it cannot listen
82 on an address/port, the above message is logged. The most common cause of
83 this message is the use of different DNS names in
84 <code>&lt;VirtualHost&gt;</code> sections which resolve to the same IP
85 address(es). FTP, unlike HTTP, only deals with IP addresses, and thus
86 <code>proftpd</code> resolves the <code>&lt;VirtualHost&gt;</code> DNS name
87 to its IP address, then listens on that address. If two different
88 <code>&lt;VirtualHost&gt;</code> sections have different DNS names which
89 resolve to the same IP address, then the first section will get the
90 address, and listening to the second address will fail (probably with the
91 "Address already in use" error).
92 </li>
93
94 <p>
95 <li>"(Running from command line? Use `ServerType standalone' in config file!)"<br>
96 This log message almost always happen when you have "ServerType inetd" in
97 your <code>proftpd.conf</code>, <b>but</b> you are attempting to start
98 <code>proftpd</code> from the command line (or some init script). Chances
99 are that you do not really want to be doing this; if you do, see the
100 <a href="ServerType.html"><code>ServerType</code></a> docs for more
101 information.
102 </li>
103
104 <p>
105 <li>"unable to accept incoming connection"<br>
106 The server cannot accept a TCP connection from a remote client; the most
107 likely cause is too many open files (which includes sockets) and hitting
108 the per-process, or the system-wide, open file limit.
109 </li>
110
111 <p>
112 <li>"chroot to <em>directory</em> failed for user <em>name</em>"<br>
113 Restricting users via the <a href="Chroot.html">DefaultRoot</a> directive
114 requires that the logging-in user have the <i>execute</i> permission on
115 the target directory. Without that permission -- or if there are other
116 filesystem permission errors -- the above message will be logged.
117 </li>
118
119 <p>
120 <li>"RELINQUISH PRIVS", "REVOKE PRIVS", "ROOT PRIVS", "SETUP PRIVS", "USER PRIVS", "unable to set UID/GID"</br>
121 These log messages indicate that changing the UID/GID of the current
122 process (as during authentication, or the handling of
123 <a href="../modules/mod_core.html#UserOwner"><code>UserOwner</code></a>/<a href="../modules/mod_core.html#GroupOwner"><code>GroupOwner</code></a>
124 directives) has failed for some reason. The most common cause of these
125 messages is starting <code>proftpd</code> as a non-root user.
126 </li>
127
128 <p>
129 <li>"unable to open <em>log-file</em>: <em>parent-dir</em> is a world-writable directory"<br>
130 These log messages indicate that your logging configuration <b>is
131 insecure</b>. Log files in a world-writable directory can be deleted or
132 modified by <b>any user on the system</b>, which means that your logged
133 data cannot be trusted. For this reason, <code>proftpd</code> refuses to
134 write log files to such directories.
135 </li>
136
137 <p>
138 <li>"unable to open <em>log-file</em>: <em>log-file</em> is a symbolic link"<br>
139 These log messages indicate that your logging configuration <b>may</b> be
140 insecure. Symbolic links are subject to race conditions, where a local
141 user on the system might try to replace portions of the symlink path with
142 their own directories, changing the symlink to point somewhere else, such
143 as causing the log file to overwrite an existing file (<i>e.g.</i>
144 <code>/etc/passwd</code>).
145
146 <p>
147 For this reason, <code>proftpd</code> refuses to write log files to
148 symlinks, unless configured to do so via the <a href="../modules/mod_log.html#AllowLogSymlinks"><code>AllowLogSymlinks</code></a> directive.
149 </li>
150
151 <p>
152 <li>"unable to open <em>log-file</em>"<br>
153 These log messages indicate that the log file could be not used for some
154 other reason, such as lack of permissions or nonexistent directories.
155 </li>
156
157 <p>
158 <li>"mod_sql: unrecoverable backend error"<br>
159 Backend database server (<i>e.g.</i> MySQL, Postgres, SQLite, <i>etc</i>)
160 rejected the SQL statement being executed. This usually happens when a
161 table or column in the SQL statement does not exist, or if the table/column
162 names have a typo/mismatch between the config file and database server.
163 </li>
164
165 <p>
166 <li>"error: unable to set groups: Invalid argument"<br>
167 Setting the list of GIDs to use for the logged-in user uses the
168 <code>setgroups(2)</code> system call, which has some restrictions. Most
169 notably, attempting to make the user be a member of too many groups will
170 cause the above error. The maximum number of groups varies from platform
171 to platform, but can be anywhere from 4 to 32 (or more).
172 </li>
173
174 <p>
175 <li>"error opening scoreboard"<br>
176 The <a href="Scoreboard.html"><code>ScoreboardFile</code></a> is needed for
177 useful things like <code>ftpwho</code> and <code>ftptop</code>, thus if the
178 path cannot be opened, <code>proftpd</code> will fail to start. The most
179 common cause for this failure is that the configured
180 <code>ScoreboardFile</code> is in a directory which does not exist; the
181 parent directory <b>must</b> exist prior to starting <code>proftpd</code>.
182 </li>
183
184 <p>
185 <li>"Malformed entry in AuthUserFile/AuthGroupFile"<br>
186 The configured <a href="AuthFiles.html">AuthUserFile/AuthGroupFile</a>
187 has a line which is not in the necessary format. The most common cause
188 for this is when one of the file fields is missing, or if there an extra
189 colon (':') character in a field (<i>e.g.</i> in the name field).
190 </li>
191 </ul>
192
193 <p><a name="WARNING">
194 <b><code>WARNING</code> Log Messages</b><br>
195
196 <p><a name="NOTICE">
197 <b><code>NOTICE</code> Log Messages</b><br>
198
199 <p><a name="INFO">
200 <b><code>INFO</code> Log Messages</b><br>
201 <code>INFO</code>-level messages are logged by <code>proftpd</code> when
202 common events happen: a connection session begins/ends, a user logs in,
203 idle connections are dropped, <i>etc</i>.
204 <ul>
205 <li>"FTP/SSH2 session opened/closed"<br>
206 When a client connects, a session process begins. The type of session
207 (<i>i.e.</i> FTP, SSH2, <i>etc</i>) is determined by the server to which
208 the client connected.
209 </li>
210
211 <p>
212 <li>"USER <i>user</i>: Login successful" <i>or</i> "ANON <i>user</i>: Login successful"<br>
213 Successful authentication (via password, or anonymously) happened, as
214 opposed to a failed authentication/login.
215 </li>
216
217 <p>
218 <li>"<i>address</i>:<i>port</i> masquerading as <i>address</i>"<br>
219 This message is logged when the <a href="../modules/mod_core.html#MasqueradeAddress"><code>MasqueradeAddress</code></a> directive is in effect.
220 </li>
221
222 <p>
223 <li>"Client session idle timeout, disconnected"<br>
224 The configured <a href="../modules/mod_core.html#TimeoutIdle"><code>TimeoutIdle</code></a> was reached while the client did nothing useful, and so the
225 client had to be disconnected. This is quite common/normal.
226 </li>
227
228 <p>
229 <li>"mod_dso: module <i>name</i> already loaded"<br>
230 This log message happens when a <a href="../modules/mod_dso.html#LoadModule"><code>LoadModule</code></a> directive attempts to load a module which has
231 already been loaded, either by a previous <code>LoadModule</code> directive
232 <i>or</i> because the named module is a static module (and is thus always
233 "loaded"). Either way, this log message indicates that the configuration
234 has redundant <code>LoadModule</code> directives which can be removed.
235 </li>
236 </ul>
237
238 <p><a name="DEBUG">
239 <b><code>DEBUG</code> Log Messages</b><br>
240 There are many <code>DEBUG</code>-level messages logged by
241 <code>proftpd</code>. This section will be filled, over time, with the
242 ones most commonly seen/asked about by users.
243
244
245 <p><a name="strerror">
246 Many of the reasons for various errors/failures that appear in log messages
247 (and elsewhere) come from the <code>strerror(3)</code> libc function, which
248 provides human readable strings, given a numeric <code>errno</code> value.
249 The table below lists the reason strings you may commonly see, with a fuller
250 description of what it means.
251
252 <p>
253 <table border=1 summary="Error Messages">
254 <tr>
255 <td><b>Message</b></td>
256 <td><b>Code</b></td>
257 <td><b>Details</b></td>
258 </tr>
259
260 <tr>
261 <td>&nbsp;Operation not permitted&nbsp;</td>
262 <td>&nbsp;<code>EPERM</code>&nbsp;</td>
263 <td>Indicates that the requested operation cannot be done for some reason,
264 usually caused by misconfigurations or lack of system support/resources.
265 Note: Some platforms (<i>e.g.</i> Solaris) actually translate the
266 <code>EACCES</code> code to this message, which is confusing.
267 </td>
268 </tr>
269
270 <tr>
271 <td>&nbsp;Permission denied&nbsp;</td>
272 <td>&nbsp;<code>EACCES</code>&nbsp;</td>
273 <td>Means that the request operation is not allowed due to access controls:
274 the logged-in user does not have sufficient filesystem permissions
275 to open/read/write/delete a file/directory, the logged-in user (or
276 client) is barred from access by configuration, <i>etc</i>.
277 </td>
278 </tr>
279
280 <tr>
281 <td>&nbsp;Invalid argument&nbsp;</td>
282 <td>&nbsp;<code>EINVAL</code>&nbsp;</td>
283 <td>This generic message indicates that the supplied parameters are
284 considered invalid; the reasons behind this are myriad, depending on
285 the requested operation.
286 </td>
287 </tr>
288
289 <tr>
290 <td>&nbsp;No such file or directory&nbsp;</td>
291 <td>&nbsp;<code>ENOENT</code>&nbsp;</td>
292 <td>The requested resource does not exist; can apply to files,
293 directories, and other non-filesystem resources.
294 </td>
295 </tr>
296
297 <tr>
298 <td>&nbsp;Is a directory&nbsp;</td>
299 <td>&nbsp;<code>EISDIR</code>&nbsp;</td>
300 <td>The requested operation expects to operate on a file, but the
301 requested resource was a directory, not a file.
302 </td>
303 </tr>
304
305 <tr>
306 <td>&nbsp;Bad file descriptor&nbsp;</td>
307 <td>&nbsp;<code>EBADF</code>&nbsp;</td>
308 <td>Read/write/close/delete operation on a file was requested on a
309 file descriptor which was not already opened.
310 </td>
311 </tr>
312
313 <tr>
314 <td>&nbsp;Address already in use&nbsp;</td>
315 <td>&nbsp;<code>EADDRINUSE</code>&nbsp;</td>
316 <td>Process is attempting to listen on a network address/port which is
317 already bound; usually some other process on the system is listening
318 on that address (<i>e.g.</i> <code>inetd</code>/<code>xinetd</code>).
319 </td>
320 </tr>
321
322 <tr>
323 <td>&nbsp;Broken pipe&nbsp;</td>
324 <td>&nbsp;<code>EPIPE</code>&nbsp;</td>
325 <td>Process tried to send something to a connected TCP peer, and found
326 out that the connection had already been closed; can happen when
327 a firewall/router/NAT between TCP peers silently closes the connection
328 without informing one or both peers.
329 </td>
330 </tr>
331
332 <tr>
333 <td>&nbsp;Connection reset by peer&nbsp;</td>
334 <td>&nbsp;<code>ECONNRESET</code>&nbsp;</td>
335 <td>Remote TCP peer sent the <code>RST</code> TCP flag, indicating that
336 the connection should be reset; this almost always indicates an
337 issue with the connected client (or some firewall/router/NAT device
338 between the client and the server).
339 </td>
340 </tr>
341
342 <tr>
343 <td>&nbsp;Connection refused&nbsp;</td>
344 <td>&nbsp;<code>ECONNREFUSED</code>&nbsp;</td>
345 <td>The remote peer refused to accept the TCP connection; could be
346 firewalls/routers/NATs in the way, other network ACLs that deny the
347 connection, <i>etc</i>.
348 </td>
349 </tr>
350
351 <tr>
352 <td>&nbsp;Too many open files&nbsp;</td>
353 <td>&nbsp;<code>EMFILE</code>&nbsp;</td>
354 <td><b>Per-process</b> limit of number of open files (including sockets)
355 has been reached.
356 </td>
357 </tr>
358
359 <tr>
360 <td>&nbsp;Too many open files in system&nbsp;</td>
361 <td>&nbsp;<code>ENFILE</code>&nbsp;</td>
362 <td><b>System-wide</b> limit of number of open files (including sockets)
363 has been reached.
364 </td>
365 </tr>
366 </table>
367
368 <p>
369 <hr>
370 <font size=2><b><i>
371 &copy; Copyright 2013-2017 The ProFTPD Project<br>
372 All Rights Reserved<br>
373 </i></b></font>
374 <hr>
375
376 </body>
377 </html>