Log directory path on windows #467

Open
opened 2025-04-21 15:10:57 -04:00 by idk · 13 comments
Owner

Opened 6 years ago

Last modified 5 years ago

#1410opendefect

Log directory path on windows

Reported by:Eche|onOwned by:
Priority:
minor
Milestone:
undecided
Component:
installer
Version:
0.9.16
Keywords:
windows
Cc:

Parent Tickets:

Sensitive:
no

Description

Just setup I2P 0.9.16-6 on windows 8.1 x64.

  1. I installed service. IMHO there was no real sign of I2P already running after install.

We should somehow start the router console in this situation or make clear I2P is already running.

  1. The install as a service has some issues. Hard to get the path were the files are, as it is not existant neither available.
    ←- Wrapper Stopped

2014/11/21 16:04:38 | Unable to write to the configured log directory: C:\Windows\system32\config\systemprofile\AppData?\Roaming\i2p (The system cannot find the path specified. (0x3))

2014/11/21 16:04:38 | The directory does not exist.

2014/11/21 16:04:38 | Unable to write to the configured log file: C:\Windows\system32\config\systemprofile\AppData?\Roaming\i2p\wrapper.log (The system cannot find the path specified. (0x3))

2014/11/21 16:04:38 | Falling back to the default file in the current working directory: wrapper.log

2014/11/21 16:04:38 | —> Wrapper Started as Service

But router logs tells me: File location: C:\ProgramData?\Application Data\i2p\logs\log-router-1.txt

I cannot access the application data folder.

I put my i2pupdate.zip into the C:\program files\i2p folder and I2P updated.

User experience could be enhanced with this setup.

On the good side: I did open ports in firewall, I did set fixed IPv4 and IPv6 address in windows, ands I2P works flawless on both protocols. Also I started a torrent and 2 days after I got >1000 active peers.

Subtickets

#905: What a mess with log files in Windows :-(open

Opened [6 years ago](/timeline?from=2014-11-23T16%3A37%3A09Z&precision=second "See timeline at Nov 23, 2014 4:37:09 PM") Last modified [5 years ago](/timeline?from=2016-05-04T18%3A20%3A13Z&precision=second "See timeline at May 4, 2016 6:20:13 PM") ## [\#1410](/ticket/1410)[open](/query?status=open)[defect](/query?status=!closed&type=defect) # Log directory path on windows Reported by:[Eche\|on](/query?status=!closed&reporter=echelon)Owned by: Priority: [minor](/query?status=!closed&priority=minor) Milestone: [undecided](/milestone/undecided "No date set") Component: [installer](/query?status=!closed&component=installer) Version: [0.9.16](/query?status=!closed&version=0.9.16) Keywords: [windows](/query?status=!closed&keywords=~windows) Cc: Parent Tickets: Sensitive: [no](/query?status=!closed&sensitive=0) ### Description Just setup I2P 0.9.16-6 on windows 8.1 x64. 1. I installed service. IMHO there was no real sign of I2P already running after install. We should somehow start the router console in this situation or make clear I2P is already running. 1. The install as a service has some issues. Hard to get the path were the files are, as it is not existant neither available. ←\- Wrapper Stopped 2014/11/21 16:04:38 \| Unable to write to the configured log directory: C:\\Windows\\system32\\config\\systemprofile\AppData?\\Roaming\\i2p (The system cannot find the path specified. (0x3)) 2014/11/21 16:04:38 \| The directory does not exist. 2014/11/21 16:04:38 \| Unable to write to the configured log file: C:\\Windows\\system32\\config\\systemprofile\AppData?\\Roaming\\i2p\\wrapper.log (The system cannot find the path specified. (0x3)) 2014/11/21 16:04:38 \| Falling back to the default file in the current working directory: wrapper.log 2014/11/21 16:04:38 \| —> Wrapper Started as Service But router logs tells me: File location: C:\ProgramData?\\Application Data\\i2p\\logs\\log-router-1.txt I cannot access the application data folder. I put my i2pupdate.zip into the C:\\program files\\i2p folder and I2P updated. User experience could be enhanced with this setup. On the good side: I did open ports in firewall, I did set fixed IPv4 and IPv6 address in windows, ands I2P works flawless on both protocols. Also I started a torrent and 2 days after I got >1000 active peers. ### Subtickets [#905](/ticket/905): What a mess with log files in Windows :-(open
idk added this to the undecided milestone 2025-04-21 15:10:57 -04:00
idk added the
#1410
installer
undecided
labels 2025-04-21 15:10:57 -04:00
Author
Owner

comment:7 Changed 5 years ago by zzz

Parent Tickets:
→ 1410Status:new →
open

#1410 and #1736 are dups

[comment:7](https://trac.i2p2.de/\#comment:7) Changed [5 years ago](https://trac.i2p2.de//timeline?from=2016-05-04T18%3A20%3A13Z&precision=second "See timeline at May 4, 2016 6:20:13 PM") by zzz Parent Tickets: → 1410Status:new → open [#1410](https://trac.i2p2.de//ticket/1410 "#1410: defect: Log directory path on windows (open)") and [#1736](https://trac.i2p2.de//ticket/1736 "#1736: defect: 0.9.23 - windows - path does not exist (closed: duplicate)") are dups
Author
Owner

comment:6 Changed 6 years ago by str4d

Keywords:windows install added
Milestone:0.9.6

[comment:6](https://trac.i2p2.de/\#comment:6) Changed [6 years ago](https://trac.i2p2.de//timeline?from=2015-01-03T11%3A56%3A04Z&precision=second "See timeline at Jan 3, 2015 11:56:04 AM") by str4d Keywords:_windows_ _install_ added Milestone:0.9.6
Author
Owner

comment:5 Changed 8 years ago by zzz

correction I meant #741 not #912 in the comment above

[comment:5](https://trac.i2p2.de/\#comment:5) Changed [8 years ago](https://trac.i2p2.de//timeline?from=2013-04-26T14%3A02%3A05Z&precision=second "See timeline at Apr 26, 2013 2:02:05 PM") by zzz correction I meant [#741](https://trac.i2p2.de//ticket/741 "#741: enhancement: Make I2P easier to deal with with Windows firewall software (accepted)") not [#912](https://trac.i2p2.de//ticket/912 "#912: defect: Installer doesn't work (closed: fixed)") in the comment above
Author
Owner

comment:4 Changed 8 years ago by zzz

re: i2prouter.bat

Yeah, I see that i2prouter does a mkdir of PIDDIR and LOGDIR for linux.

Is the wrapper log location wrong on /logs on the first run, or is it correct?

If it's correct, maybe this isn't a problem at all?

Do we want to add an i2prouter.bat right now, since we already have Windows startup stuff changes in the works with #912?

We could also make the dir in install.xml but I guess the permissions could be wrong, or in the wrong place if a different user installed it.

I see comments in wrapper.config that the PIDDIR must exist or the wrapper will fail to start. So that's disabled by default in wrapper.config (overridden for linux users in i2prouter).

[comment:4](https://trac.i2p2.de/\#comment:4) Changed [8 years ago](https://trac.i2p2.de//timeline?from=2013-04-26T13%3A54%3A24Z&precision=second "See timeline at Apr 26, 2013 1:54:24 PM") by zzz re: i2prouter.bat Yeah, I see that i2prouter does a mkdir of PIDDIR and LOGDIR for linux. Is the wrapper log location wrong on /logs on the first run, or is it correct? If it's correct, maybe this isn't a problem at all? Do we want to add an i2prouter.bat right now, since we already have Windows startup stuff changes in the works with [#912](https://trac.i2p2.de//ticket/912 "#912: defect: Installer doesn't work (closed: fixed)")? We could also make the dir in install.xml but I guess the permissions could be wrong, or in the wrong place if a different user installed it. I see comments in wrapper.config that the PIDDIR must exist or the wrapper will fail to start. So that's disabled by default in wrapper.config (overridden for linux users in i2prouter).
Author
Owner

comment:3 Changed 8 years ago by zzz

Milestone:
→ 0.9.6

Router log file name shown even if not yet written to, in 0.9.5-16 rev d9802bced393452a43755b7fa48f1d4eab8dd229 .

[comment:3](https://trac.i2p2.de/\#comment:3) Changed [8 years ago](https://trac.i2p2.de//timeline?from=2013-04-26T13%3A37%3A25Z&precision=second "See timeline at Apr 26, 2013 1:37:25 PM") by zzz Milestone: → 0.9.6 Router log file name shown even if not yet written to, in 0.9.5-16 rev d9802bced393452a43755b7fa48f1d4eab8dd229 .
Author
Owner

comment:2 Changed 8 years ago by killyourtv

Cc:killyourtv added

I found that when I2P starts it tries to write wrapper.log to %appdata%\i2p, but that doesn't exist until I2P is run for the first time. Since it can't write to %appdata%\i2p wrapper.log goes to the CWD.

On subsequent runs, wrapper.log is written to %appdata%\i2p.

One possible solution would be to use the shipped but currently unused script "i2prouter.bat" to start I2P using the wrapper. If we do that we can create %appdata%\i2p ourselves.

--- installer/resources/i2prouter.bat   a1f0a332f42a1ac4e2dbe4401e8d8b3f388bcf65
+++ installer/resources/i2prouter.bat   0bdad331cb3add5e40a48862ec427588423048f4
@@ -85,8 +85,9 @@ rem
rem Start the Wrapper
rem
:startup
+if not exist "%APPDATA%\I2P" mkdir "%APPDATA%\I2P"
"%_WRAPPER_EXE%" -c %_WRAPPER_CONF%
if not errorlevel 1 goto :eof
-pause
+rem pause

:eof
============================================================
--- installer/resources/shortcutSpec.xml        adbea3965cdc4e4da8a0f8976bd8946d4388213e
+++ installer/resources/shortcutSpec.xml        9fd44536d245831eda7c18955b24ebfa8b5fdcaa
@@ -22,8 +22,7 @@
           desktop="yes"
            startup="no" />
<shortcut name="Start I2P (restartable)"
-           target="$INSTALL_PATH\I2Psvc.exe"
-           commandLine="-c wrapper.config"
+           target="$INSTALL_PATH\i2prouter.bat"
            workingDirectory="$INSTALL_PATH"
            iconFile="$INSTALL_PATH\docs\start.ico"
            initialState="noShow"

[comment:2](https://trac.i2p2.de/\#comment:2) Changed [8 years ago](https://trac.i2p2.de//timeline?from=2013-04-21T20%3A22%3A14Z&precision=second "See timeline at Apr 21, 2013 8:22:14 PM") by killyourtv Cc:_killyourtv_ added I found that when I2P starts it tries to write wrapper.log to %appdata%\\i2p, but that doesn't exist until I2P is run for the first time. Since it can't write to %appdata%\\i2p wrapper.log goes to the CWD. On subsequent runs, wrapper.log is written to %appdata%\\i2p. One possible solution would be to use the shipped but currently unused script "i2prouter.bat" to start I2P using the wrapper. If we do that we can create %appdata%\\i2p ourselves. ``` --- installer/resources/i2prouter.bat a1f0a332f42a1ac4e2dbe4401e8d8b3f388bcf65 +++ installer/resources/i2prouter.bat 0bdad331cb3add5e40a48862ec427588423048f4 @@ -85,8 +85,9 @@ rem rem Start the Wrapper rem :startup +if not exist "%APPDATA%\I2P" mkdir "%APPDATA%\I2P" "%_WRAPPER_EXE%" -c %_WRAPPER_CONF% if not errorlevel 1 goto :eof -pause +rem pause :eof ============================================================ --- installer/resources/shortcutSpec.xml adbea3965cdc4e4da8a0f8976bd8946d4388213e +++ installer/resources/shortcutSpec.xml 9fd44536d245831eda7c18955b24ebfa8b5fdcaa @@ -22,8 +22,7 @@ desktop="yes" startup="no" /> <shortcut name="Start I2P (restartable)" - target="$INSTALL_PATH\I2Psvc.exe" - commandLine="-c wrapper.config" + target="$INSTALL_PATH\i2prouter.bat" workingDirectory="$INSTALL_PATH" iconFile="$INSTALL_PATH\docs\start.ico" initialState="noShow" ```
Author
Owner

comment:1 Changed 8 years ago by zzz

Windows version?

Running as service or not?

The router log stays 'uninitialized' until it's first written to, but that's probably bad UI and needs improvement. Also there was a bug #805 on setting the router log location, fixed in 0.9.5

[comment:1](https://trac.i2p2.de/\#comment:1) Changed [8 years ago](https://trac.i2p2.de//timeline?from=2013-04-05T13%3A15%3A35Z&precision=second "See timeline at Apr 5, 2013 1:15:35 PM") by zzz Windows version? Running as service or not? The router log stays 'uninitialized' until it's first written to, but that's probably bad UI and needs improvement. Also there was a bug [#805](https://trac.i2p2.de//ticket/805 "#805: defect: wrapper.config - log setting ignored by routerconsole/logs (closed: fixed)") on setting the router log location, fixed in 0.9.5
Author
Owner

comment:6 Changed 5 years ago by zzz

Add a subticket #905.

[comment:6](https://trac.i2p2.de/\#comment:6) Changed [5 years ago](https://trac.i2p2.de//timeline?from=2016-05-04T18%3A20%3A13Z&precision=second "See timeline at May 4, 2016 6:20:13 PM") by zzz Add a subticket [#905](https://trac.i2p2.de//ticket/905 "#905: enhancement: What a mess with log files in Windows :-( (open)").
Author
Owner

comment:5 Changed 5 years ago by zzz

See also dup #1736

[comment:5](https://trac.i2p2.de/\#comment:5) Changed [5 years ago](https://trac.i2p2.de//timeline?from=2016-05-04T17%3A47%3A45Z&precision=second "See timeline at May 4, 2016 5:47:45 PM") by zzz See also dup [#1736](https://trac.i2p2.de//ticket/1736 "#1736: defect: 0.9.23 - windows - path does not exist (closed: duplicate)")
Author
Owner

comment:4 Changed 5 years ago by zzz

Milestone:
→ undecidedSummary:I2P on windows →
Log directory path on windows

[comment:4](https://trac.i2p2.de/\#comment:4) Changed [5 years ago](https://trac.i2p2.de//timeline?from=2016-05-04T17%3A16%3A45Z&precision=second "See timeline at May 4, 2016 5:16:45 PM") by zzz Milestone: → undecidedSummary:I2P on windows → Log directory path on windows
Author
Owner

comment:3 Changed 5 years ago by str4d

Status:new →
open

[comment:3](https://trac.i2p2.de/\#comment:3) Changed [5 years ago](https://trac.i2p2.de//timeline?from=2016-02-18T04%3A43%3A54Z&precision=second "See timeline at Feb 18, 2016 4:43:54 AM") by str4d Status:new → open
Author
Owner

comment:2 Changed 6 years ago by str4d

Keywords:windows added
Milestone:0.9.18

[comment:2](https://trac.i2p2.de/\#comment:2) Changed [6 years ago](https://trac.i2p2.de//timeline?from=2015-07-24T13%3A10%3A12Z&precision=second "See timeline at Jul 24, 2015 1:10:12 PM") by str4d Keywords:_windows_ added Milestone:0.9.18
Author
Owner

comment:1 Changed 6 years ago by zzz

Component:package/other →
installer

[comment:1](https://trac.i2p2.de/\#comment:1) Changed [6 years ago](https://trac.i2p2.de//timeline?from=2014-12-11T15%3A26%3A57Z&precision=second "See timeline at Dec 11, 2014 3:26:57 PM") by zzz Component:package/other → installer
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: I2P_Developers/i2p.i2p#467
No description provided.