Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> H&H on Solaris11 Guide

 
post Jun 6 2012, 05:47
Post #1
pureyang



Regular Poster
******
Group: Gold Star Club
Posts: 764
Joined: 6-June 12
Level 490 (Dovahkiin)


Here is a guide on how to get hath (Hentai@Home) to run on Solaris 11.
I am reusing a thread here (where I asked about my first specific issue with hath on Solaris 11) so you can find the original post at the bottom.

Step 1 - Java:
First thing you need to know is that java on Solaris 11 is a mess.
The package repository has very outdated versions (As of june 25th 2012, the versions it has are from 2011).
It's also messy, symlinks pointing at other symlinks, nonsensical directory structure, and bad advice galore. So we are just going to IGNORE the built in OS java, manually install the newest version in an appropriately separate location, and run it specifically for hath from there.

The first thing you need to do is fix/bypass that java mess issue. You will want to go to [www.oracle.com] http://www.oracle.com/technetwork/java/jav...oads/index.html and download the latest 1.6 update of java (as of hath v1.0.9 you should NOT use v1.7 of java for it), at the moment the latest 1.6 java is 1.6.0_33 (aka 1.6 update 33 aka 1.6u33). If you use the built in java in solaris 11 (1.6.0_26) then the hath client will crap out on you about every day or so and require restarting.

Make sure to get JRE not JDK. On solaris x86 you only need to install the file for Solaris x86 (jre-6u33-solaris-i586.sh)
On Solaris x64 you MUST install BOTH Solaris x86 (jre-6u33-solaris-i586.sh) AND Solaris x64 (jre-6u33-solaris-x64.sh)

A. Download both files, by default they will download into ~/Downloads/
B. You now must enable execution of those files
Open terminal and go superuser.
CODE
#chmod +x ~/Downloads/jre-6u33-solaris-i586.sh
#chmod +x ~/Downloads/jre-6u33-solaris-x64.sh

C. Run the two installation files while inside the directory /usr/jdk/instances/jdk1.6.0
CODE
#cd /usr/jdk/instances/jdk1.6.0
#~/Downloads/jre-6u33-solaris-i586.sh
#~/Downloads/jre-6u33-solaris-x64.sh

D. /usr/jdk/instances/jdk1.6.0 will now contain a subdirectory called jre (where u26 is installed) and jre1.6.0_33 (latest version, hurrah!)

Step 2 - Getting hath:
A. Download hath from https://e-hentai.org/hentaiathome.php into a directory of choice and extract it somewhere of choice, preferably in your usr directory so that you have write access to it without going superuser (necessary for hath).
B. After extracting it, use
CODE
#chmod 777 -r <hath directory name>
this prevents hath from crashing if run as a user rather then as a superuser.

Step 3 - Creating a run script:
By default, when you execute a file (double click or command line) on windows it sets the run location to that files current location. This is NOT how its done in most other OS which means that hath will crash on run due to not finding requisite files. In solaris it will set the operation location to be the current folder. That is, if you are showing
CODE
ComputerName@/$
then it will set execution folder to be "/". (ComputerName = your computer's name; @ indicates the following is the current directory; $ inducate you are a regular user... it would be # if you are a superuser)
If you are showing
CODE
ComputerName@/usr/data/programs/hath/$
then it will set execution folder to be "/usr/data/programs/hath/".

You thus want the script you create to start with "cd <directory where hath located>"
You also want to directly invoke the java version we manually installed.
To create a script open a text editor like gedit, write the contents of the script, and then save it as "ScriptName.sh".
Personally I called it "hath.sh" and saved it in the same directory as HentaiAtHome.jar

Here is a sample script:
CODE
cd /tank/share/programs/hath_1.0.9/
/usr/jdk/instances/jdk1.6.0/jre1.6.0_33/bin/java -jar HentaiAtHomeGUI.jar --silentstart

The first line changes the operating directory to ensure hath doesn't crash on start.
The second line invokes the v1.6u33 java we manually installed with the command -jar which orders it to execute a .jar file. the we call for the hath gui program with the --silentstart modifier to it (optional) which tells it to start minimized to tray.
Do NOT put in just "java" instead of "/usr/jdk/instances/jdk1.6.0/jre1.6.0_33/bin/java" as that will run the outdated version from the package repository (v1.6u26)

Worth noting is that regardless of permissions on the file and whether gedit was running as superuser or not, gedit refused to allow me to modify a file ending with ".sh". The solution was to
A. click ok on the error message saying it failed to write if one exists (its a tab dropdown that will NOT prevent you from attempting the next step but WILL prevent them from working)
B. use save as to save it under a different name, for example hath1.sh
C. delete hath.sh and rename hath1.sh to hath.sh

Step 4 - exectuion:
Double click hath.sh to run it, you can also make shortcuts to it. You will be given (by default) a menu asking you what to do with it, choose execute.
If you don't want that menu or accidentally changed the default association of .sh files then right click, chose open with, other application, custom command, and type in "bash" without quotes. It will add bash to the list and allow you to quick select it from open with in future attempts. (I have yet to figure out how to restore the original dialog or how to make it actually take a custom command such as bash as the default)

QUOTE(original post)
I downloaded v1.09 to my Solaris11 server, I unpacked it to /programs/HentaiAtHome_1.09/
(with chmod 777) Double clicked, nothing happens.

I went and tried in terminal.
java -jar /programs/HaH_1.0.9/HentaiAtHomeGUI.jar (note: I renamed the directory, so the reply below by Tiap is referring to my previous directory name. which was /programs/HentaiAtHome_1.09/)

I got an error saying a required file HentaiAtHome.jar cannot be found, even though it is in the same directory as the HentaiAtHomeGUI.jar file.
Does the GUI look for the required files in an absolute directory or what?

I hope I can get it to run soon... The instructions I found on how to make a program run on startup / shut down on shutdown are scary and I can't wait to start gnashing my teeth against that process (IMG:[invalid] style_emoticons/default/smile.gif)

PS. I have not yet submitted my application for H&H. If I cannot resolve the issues with running it on solaris then I will not be running it at all (since my windows computer gets shut down every night).
Should I go ahead and submit the H&H application now or wait until I have a working client on my server?


This post has been edited by mrttao: Jun 26 2012, 20:57
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jun 6 2012, 06:28
Post #2
hzqr



Savagely Still
********
Group: Gold Star Club
Posts: 4,672
Joined: 13-May 09
Level 462 (Dovahkiin)


Try navigating to the directory first, then launch Java from there:

CODE
cd /programs/HentaiAtHome_1.09; java -jar HentaiAtHomeGUI.jar
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jun 6 2012, 06:45
Post #3
pureyang



Regular Poster
******
Group: Gold Star Club
Posts: 764
Joined: 6-June 12
Level 490 (Dovahkiin)


QUOTE(Tiap @ Jun 5 2012, 23:28) *

Try navigating to the directory first, then launch Java from there:

CODE
cd /programs/HentaiAtHome_1.09; java -jar HentaiAtHomeGUI.jar



Holy guacamole it worked! Thank you very much. I went ahead and submitted the application now so as soon as that clears I can start hosting.

I am still baffled it doesn't work when launched from the GUI file explorer or from root directory via a full path. Is there a setting I can change that will make it work?

Next step is to set it up so it runs automatically on startup. I believe that this issue is going to be a problem when I try to set it to run automatically on startup. Any ideas how to workaround it?

BTW: I had just finished modifying the class-path in the manifest files to absolute directory locations and that gave me the following errors
CODE
# java -jar /programs/HaH_1.0.9/HentaiAtHomeGUI.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/hath/base/HathGUI
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Caused by: java.lang.ClassNotFoundException: org.hath.base.HathGUI
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 12 more
Could not find the main class: org.hath.gui.HentaiAtHomeClientGUI. Program will exit.


This post has been edited by mrttao: Jun 6 2012, 07:00
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jun 6 2012, 08:33
Post #4
RichardB73



Casual Poster
***
Group: Members
Posts: 151
Joined: 5-May 12
Level 82 (Champion)


Without a client id and passkey the client wont even load/start properly, so not much to test either.
Well at least you can set it up to start and see if you can get it to connect.

Someone mentioned H@H not working right with the latest java versions when setting it up on a ubuntu linux server, might want to take a look at that thread https://forums.e-hentai.org/index.php?showtopic=68979

This post has been edited by RichardB73: Jun 6 2012, 08:36
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jun 6 2012, 08:59
Post #5
pureyang



Regular Poster
******
Group: Gold Star Club
Posts: 764
Joined: 6-June 12
Level 490 (Dovahkiin)


QUOTE(RichardB73 @ Jun 6 2012, 01:33) *

Without a client id and passkey the client wont even load/start properly, so not much to test either.
Well at least you can set it up to start and see if you can get it to connect.


True, I can't fully test until I have an ID. But if it loads properly then it asks me to input an ID. I can at least try to get it to that stage rather then having it crash with errors right away (IMG:[invalid] style_emoticons/default/smile.gif)

QUOTE
Someone mentioned H@H not working right with the latest java versions when setting it up on a ubuntu linux server, might want to take a look at that thread https://forums.e-hentai.org/index.php?showtopic=68979

Thanks, will read that thread.

This post has been edited by mrttao: Jun 6 2012, 08:59
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jun 6 2012, 11:31
Post #6
Rikis



Bringer of Light
********
Group: Gold Star Club
Posts: 3,679
Joined: 7-July 09
Level 500 (Godslayer)


Do you really need GUI? You can just launch HentaiAtHome.jar.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jun 6 2012, 17:47
Post #7
pureyang



Regular Poster
******
Group: Gold Star Club
Posts: 764
Joined: 6-June 12
Level 490 (Dovahkiin)


QUOTE(Rikis @ Jun 6 2012, 04:31) *

Do you really need GUI? You can just launch HentaiAtHome.jar.

I would have done that already if I could. But the commandline version depends on the SQL jar which runs into the same problem.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jun 6 2012, 20:04
Post #8
Hairs Fan



Women body fetishist
******
Group: Members
Posts: 859
Joined: 15-September 08
Level 219 (Ascended)


The (three) JAR files have to be in the current working directory. It won't work otherwise, even if you modify the manifest files (but it might work if you modify the H@H client source code). If you want to launch the application at startup, just create a script that launches it, maybe with a "cd" to the installation directory first.

Note that it is the same with Windows (hence the remark in the troubleshooting wiki article).

This post has been edited by Hairs Fan: Jun 6 2012, 20:04
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jun 6 2012, 21:04
Post #9
pureyang



Regular Poster
******
Group: Gold Star Club
Posts: 764
Joined: 6-June 12
Level 490 (Dovahkiin)


QUOTE(Hairs Fan @ Jun 6 2012, 13:04) *

The (three) JAR files have to be in the current working directory. It won't work otherwise, even if you modify the manifest files (but it might work if you modify the H@H client source code). If you want to launch the application at startup, just create a script that launches it, maybe with a "cd" to the installation directory first.

Note that it is the same with Windows (hence the remark in the troubleshooting wiki article).


The issue seems to be that with windows launching a file from the GUI explorer sets working directory to the directory in which that file is located automatically.

Solaris (probably ubuntu too) HAS a built in ability to launch jar files from the GUI, but it does not launch with the working directory being the same as the directory in which the jar is located.

What you describe is basically the workaround needed for launching said files. I was curious to know though if this limitation can be eliminated by combining the files into a single jar. However it is not as simple as changing the manifest, the code itself has to be changed.

My guess is that Solaris' GUI file explorer simple generates "#java -jar <full path including directory>" to launch jar files when double clicked rather then "#<directory path> java -jar <filename>" like the windows GUI does. And that the java run-time environment is kinda stupid about this and assumes the directory from which the command was given is the working directory, rather then the directory in which the file is located.

This post has been edited by mrttao: Jun 6 2012, 21:09
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jun 25 2012, 21:53
Post #10
pureyang



Regular Poster
******
Group: Gold Star Club
Posts: 764
Joined: 6-June 12
Level 490 (Dovahkiin)


Alright, I finally have everything resolved on running hath on Solaris 11.
So I totally rewrote the first post from a question about the first step into a step by step guide for anyone interested.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 4 2012, 20:21
Post #11
pureyang



Regular Poster
******
Group: Gold Star Club
Posts: 764
Joined: 6-June 12
Level 490 (Dovahkiin)


Crapping out still occurs, that 3 day stability was a fluke. (IMG:[invalid] style_emoticons/default/sad.gif)
Is there a way to send a restart command to the server? (If not I guess I will have to just shut it down, wait 1 min, then turn it on again)

I am currently researching bash scripting to make a script that restarts the server every 12 hours..
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 4 2012, 20:41
Post #12
lovehcomics



Active Poster
*******
Group: Members
Posts: 1,354
Joined: 28-August 09
Level 272 (Godslayer)


Cool - thanks - linked to this! Now we have info on Arch, Debian, and Solaris, Windows, and Mac OSX, at the very least. (IMG:[invalid] style_emoticons/default/smile.gif)

A link between them means that when a person finds one and has trouble, they can instantly see the others without having to guess at search terms.

This post has been edited by lovehcomics: Jul 4 2012, 21:28
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 5 2012, 23:17
Post #13
Hairs Fan



Women body fetishist
******
Group: Members
Posts: 859
Joined: 15-September 08
Level 219 (Ascended)


QUOTE(mrttao @ Jul 4 2012, 20:21) *

Crapping out still occurs, that 3 day stability was a fluke. (IMG:[invalid] style_emoticons/default/sad.gif)

There were some temporarily issues with the RPC these last days. Seem fixed now, so I'd restart my client if I were you.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 14 2012, 11:40
Post #14
pureyang



Regular Poster
******
Group: Gold Star Club
Posts: 764
Joined: 6-June 12
Level 490 (Dovahkiin)


QUOTE(lovehcomics @ Jul 4 2012, 13:41) *

Cool - thanks - linked to this! Now we have info on Arch, Debian, and Solaris, Windows, and Mac OSX, at the very least. (IMG:[invalid] style_emoticons/default/smile.gif)

A link between them means that when a person finds one and has trouble, they can instantly see the others without having to guess at search terms.


I would happily link them but I didn't find the links on your thread.

QUOTE(Hairs Fan @ Jul 5 2012, 16:17) *

There were some temporarily issues with the RPC these last days. Seem fixed now, so I'd restart my client if I were you.


Thank you, I did do that, it still occurs and only on my solaris box (I move the whole thing to my win box when I got on a trip out of state).
Last night I had an exceptional case where it happened 1 hour after I ran the server. Normally it takes a day or two.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 25th April 2024 - 21:15