Opened 5 years ago

Closed 3 years ago

Last modified 17 months ago

#1118 closed defect (fixed)

I2P fails to start on FreeBSD 10

Reported by: orion Owned by:
Priority: minor Milestone: 0.9.26
Component: wrapper Version: 0.9.8.1
Keywords: upstream bsd Cc:
Parent Tickets:

Description

FreeBSD 10 includes libiconv in the base, and as a result the i2psvc binary no longer works (linking error because of the library path change).

Subtickets

Attachments (1)

9124edd717da0ab8c432c1cd285e05247e41d9ce.patch (1.9 KB) - added by anonimal 3 years ago.

Download all attachments as: .zip

Change History (29)

comment:1 Changed 5 years ago by killyourtv

  • Component changed from package/other to wrapper

Thanks for the report. This will most likely have to be reported upstream to Tanuki.

/me fetches the Beta3 ISO for local testing

comment:2 Changed 5 years ago by orion

$ ./i2prouter start
**Failed to load the wrapper**

The wrapper requires libiconv.

It can be installed with pkg_add -r libiconv
$ ldd i2psvc
i2psvc:
	libiconv.so.3 => not found (0)
	libm.so.5 => /lib/libm.so.5 (0x800765000)
	libthr.so.3 => /lib/libthr.so.3 (0x80098b000)
	libc.so.7 => /lib/libc.so.7 (0x800bb0000)

It should be noted that in FreeBSD 10, pkg_add is no longer used (it's pkg add now).

comment:3 Changed 5 years ago by killyourtv

  • Owner set to killyourtv
  • Status changed from new to accepted

Oh...that's probably bug with the i2prouter script itself.

To be investigated/fixed.

comment:4 Changed 5 years ago by killyourtv

No, it's not the i2prouter script but that may need updating as well.

Running ./i2psvc wrapper.config gives the following error:

Shared object "libiconv.so.3" not found, required by "i2psvc"

This will have to go to upstream.

comment:5 Changed 5 years ago by killyourtv

  • Keywords upstream freebsd added
  • Owner killyourtv deleted
  • Status changed from accepted to new

The latest 3.5.22 wrapper also has this problem. Worse yet, I cannot even build it on FreeBSD 10.

comment:6 Changed 5 years ago by killyourtv

Filed bug #283 with Tanuki.

comment:7 Changed 5 years ago by killyourtv

  • Milestone changed from 0.9.9 to 0.9.10
  • Owner set to killyourtv
  • Status changed from new to accepted

Per Tanuki:

Thank you again for the bug submission.

I wanted to let you know this has been fixed on the Java Service Wrapper 3.5.23.

3.5.23 is not out yet but let's hope it'll be ready for 0.9.10.

comment:8 Changed 5 years ago by killyourtv

3.5.23 has been released.

I'll start testing it soon but won't check it in to MTN until later in the 0.9.10 cycle.

comment:9 Changed 5 years ago by killyourtv

No luck with 3.5.23 in FreeBSD 10. Filed upstream ticket #286.

comment:10 Changed 5 years ago by killyourtv

No luck with 3.5.24 in FreeBSD 10.

comment:11 Changed 5 years ago by killyourtv

efkt notified me that the wrapper in ports does work in FreeBSD 10. I was able to confirm that the port in /usr/ports/sysutils/javaservicewrapper works fine.

Still no success with 3.5.24, however.

comment:12 Changed 5 years ago by killyourtv

Updated the upstream Tanuki ticket #286

comment:13 Changed 5 years ago by killyourtv

Workaround:

As root, install the port for the javaservicewrapper

cd /usr/ports/sysutils/javaservicewrapper
make install

Switch to the account which will be running I2P, then:

cd $HOME/i2p            # or the path you installed to
cp /usr/local/bin/javaservicewrapper i2psvc
cp /usr/local/lib/javaservicewrapper/lib/wrapper.jar lib/
cp /usr/local/lib/javaservicewrapper/lib/libwrapper.so lib/

At this point, I2P should run with i2prouter start.

comment:14 Changed 5 years ago by killyourtv

  • Milestone changed from 0.9.10 to 0.9.13

comment:15 Changed 4 years ago by str4d

  • Keywords bsd added; freebsd removed
  • Milestone 0.9.13 deleted

The upstream ticket is waiting on us:

"Could you paste in here the output from the wrapper?"

Could you follow up on this kytv?

comment:16 Changed 4 years ago by killyourtv

  • Priority changed from critical to minor

comment:17 Changed 4 years ago by killyourtv

I need to set up a FreeBSD VM again to try reproducing.

comment:18 Changed 3 years ago by anonimal

15:11:01 anonimal | Np. While I'm at it, #1118 doesn't seem to be an issue now. FBSD 10.2 ships JSW 3.5.21 in ports by default and everything appears to work fine.


In other words, I can't reproduce.

  1. Install javaservicewrapper from ports.
  2. ./i2prouter start works with https://trac.i2p2.i2p/ticket/1118#comment:13 applied and libiconv *not* installed.
  3. Removed the work-around, re-installed && ./i2prouter start works *with* libiconv installed (as satisfied by vim).

I haven't looked into this further. Can anyone else reproduce?

$ uname -a
FreeBSD test 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug 12 15:26:37 UTC 2015 root@…:/usr/obj/usr/src/sys/GENERIC amd64

comment:19 Changed 3 years ago by killyourtv

Of course the service wrapper from FreeBSD's ports works. That's precisely what I suggested at ticket:1118#comment:13. You've only confirmed that what I wrote works. :)

The problem is with the upstream Tanuki wrapper for FreeBSD which we package. That did not work starting with FreeBSD 10 and that is what this ticket is for.

comment:20 Changed 3 years ago by killyourtv

Note: The problem with iconv is only with the upstream wrapper binaries.

comment:21 Changed 3 years ago by anonimal

Ah, it was late, I see now: all presently used tanuki methods work with the ports version but until upstream is patched, we must use a workaround because i2p bundles upstream. Got it. But even with the present workaround, ./i2prouter causes confusion:

Current working solution:

  1. cd /usr/ports/sysutils/javaservicewrapper && make install
  2. pkg install libiconv # if only needed for upstream, ./i2prouter still complains so remove dependency? Note: copying jar/so/i2psvc, as mentioned above in point 3, also appears to not be needed
  3. java -jar i2pinstall_0.9.22.jar -console
  4. ./i2prouter start
  5. Done. Works.
  6. Add a note about 1. and 2. to the install instructions/website and adjust ./i2prouter accordingly
  7. Remove 2+ year old deprecations in ./i2prouter

EDIT: Easier: simply update the url in ./i2prouter to point to ticket:1118#comment:13 and clarify some minor points. Patch attached.

Pending any unforeseeable objections, and until upstream is patched, I think we should follow through with this approach or at least something similar.

EDIT: Sorry kytv, I jumped the gun!

Last edited 3 years ago by anonimal (previous) (diff)

Changed 3 years ago by anonimal

comment:22 Changed 3 years ago by zzz

  • Milestone set to 0.9.26
  • Owner killyourtv deleted
  • Status changed from accepted to open

3.5.29 has a fix?

http://forum.i2p/viewtopic.php?t=12429
http://wrapper.tanukisoftware.com/doc/english/release-notes.html
No update to https://sourceforge.net/p/wrapper/bugs/286/

@anonimal what are the implications for i2prouter? New patch required?

kytv in comment 20 above says the problem is only with upstream binaries, but the anonimal patch above changes the text to 'bundled with'. Looking in mtn, it appears that kytv did just include the community edition freebsd binaries from tanuki. He didn't recompile them.

So do we update our bundled binaries to 3.5.29, and what changes are needed to i2prouter (whether we update or not)?

Note that neither i2prouter nor the wrapper binaries are included in i2p in-net updates, so this is for new installs only.

comment:23 Changed 3 years ago by zzz

Need somebody to test the 3.5.29 freebsd wrapper, following the instructions at http://i2p-projekt.i2p/en/misc/manual-wrapper to upgrade.

If successful, need a report or patch on what change, if any, is required to i2prouter. It appears that the message in freebsd10() which is called from failed() is only called on failure, so perhaps it just works now, no change required.

comment:24 Changed 3 years ago by anonimal

Following manual-wrapper instructions for 3.5.29 proves successful.

With that said, I assume (since I haven't spent time on this) that bundling 3.5.29 with the next jar will eliminate the need for the patch and for bsd10 manual-wrapper instructions though, if someone puts in the work to bundle/provide the jar, I can test on this machine to confirm.

Note: if we do keep failed(), I would keep the pkg part of the patch because of the deprecation.

comment:25 Changed 3 years ago by zzz

Thanks for testing.

We don't include either the wrapper or the i2prouter script in the update, so this will only take effect on new installs.

However, in Debian/Ubuntu? packages, the wrapper is a dependency, so we can't control the version. However, that doesn't apply to FreeBSD.

But from above, I see that people could have the wrapper from BSD ports.

Given all the uncertainty, and since kytv isn't around, seems like we should leave the failed() part in there, it should be harmless if things work.

If that's the plan, is your patch good as-is?

comment:26 Changed 3 years ago by anonimal

AFAICT, yes.

comment:27 Changed 3 years ago by zzz

  • Resolution set to fixed
  • Status changed from open to closed

Patch applied, binaries updated in 7a2aa44b810b1c349eba6aa1210cb72af4481ca9 0.9.25-10.
As noted in comment 23 above, affects new installs only. See link in that comment for manual upgrade instructions.

comment:28 Changed 17 months ago by slumlord

Console output links to post from 3 years ago

% ./i2prouter start
Starting I2P Service...
Waiting for I2P Service......
WARNING: I2P Service may have failed to start.
**Failed to load the wrapper**

The current version of the Tanuki wrapper that is bundled
with I2P does not support FreeBSD 10.

See http://trac.i2p2.de/ticket/1118#comment:13 for a work-around.
After applying the work-around, as a normal user or a dedicated
i2p user, you can then run:
$ ./i2prouter start

Or, you may also start I2P by running the script:
/usr/home/i2puser/i2p/runplain.sh

Is https://geti2p.net/en/misc/manual-wrapper a better page to link to?

---

  • broken on freebsd 11.0-RELEASE

try:

pkg install javaservicewrapper
Last edited 17 months ago by slumlord (previous) (diff)
Note: See TracTickets for help on using tickets.