23 October 2009

JForum on OpenSolaris

I decided to go ahead and setup a forum for one of the projects I am working on.  I already had a zone setup that was hosting a "coming soon" page.

Looking around, I spent quite awhile trying to decide which forum software I was going to use.  As a Java developer, I decided to go with a Java-based one so that it is easier for me to maintain.  I ended up choosing JForum.

Installation was actually pretty easy.  Getting the forums configured not so much (by default new forums were not visible until I went and reconfigured every user group -- each time I added a forum -- very annoying).

I had zlogin'd to the domain and:

# pkg install SUNWtcat
# pkg install SUNWj6dvx
# svcadm enable tomcat6

Checking port 8080 on the domain I saw that tomcat was indeed running.

I downloaded jforum-2.1.8.war and placed it as: /var/tomcat6/webapps/jforum.war

Going to http://THEMACHINE:8080/jforum/install.jsp I specified to use HSQLDB, UTF-8, my URLs and a password.

Still a few things I'd like to fix, but as of now the forums are working.

22 October 2009

Gnome-terminal just disappears after upgrading to snv_125

After upgrading today, I was unable to launch the terminal.  Let me correct that -- the window would come up, but before any text was displayed it would close.  I didn't see any error messages or logs or anything that indicated what the problem was.

Then I found bug #6892167.  To verify if that was my problem, I went up to "Applications | Run Application" and did 'gnome-terminal -e /bin/bash'.  It launched fine.

Confirmed, I followed the instructions in the workaround to the best of my ability.  The "old" copy of the libvte I had was 9.6.0, but it still appears to work.  Also, I was unable to unmount the old boot environment without forcing (-f) it.

All seems to work now.

27 August 2009

Private Repositories with Nexus

So one of the projects I am working on is not open source (I know, I know)... that led me to realize I needed to provide both private AND anonymous access to my repositories -- depending on which repo.

A bit of googling and I came across this page.  I mostly followed his instructions -- but here are a few sidenotes in case you go to try it.

In step #2, be careful about long names.  When I got to step 3, I couldn't tell "Anonymous Public Snapshot Repository (read)" apart from "Anonymous Public Snapshot Repository (delete)" since they both looked like "Anonymous Public Snapshot Repositor".

I didn't do the last half of step #5 or step 6. Instead, I went into the user dialog and removed the permissions that the "anonymous" user originally had and added in mine instead.

Here's some screenshots...

This is the roles assigned to the "Public Role"



This is the "Private Role"
This is the "anonymous" user
And my personal user

You can test it by logging out then trying to look at the repositories. You click on the private ones and it says access denied. Public ones are still accessible.

22 August 2009

Subversion working in Unix but not on Windows

So as I was checking out my ambrosia project on Windows today and got this error:

A    ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\phiTest.java
A    ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\PhiTest.java
A    ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\tanTest.java
A    ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\A052119Test.java
A    ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\A073333Test.java
A    ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\eTest.java
A    ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\A113011Test.java
A    ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\piTest.java
svn: In directory 'ambrosia\thoth\src\test\java\org\eoti\math\cf\constants'
svn: Can't open file 'ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\.svn\tmp\text-base\PhiTest.java.svn-base': The system cannot find the file spe
cified.

Now, it may not be obvious looking at the error message, but here's the note as to the reason:

"Failed to add file '(name here)': object of the same name already exists.
or
"Can't open file 'folder\.svn\tmp\text-base\file.svn-base': The system cannot find the file specified."
Both mean that two files in the same folder have the same name except for capitalization; for example "Readme.txt" and "README.TXT". Unix and Subversion are case-sensitive, so the files are considered to be completely unrelated. But in Windows is not case-sensitive, so when it tries to update README.TXT on top of Readme.txt (say), it breaks.
The surest way to fix the problem is to log in to a Unix system (such as io.uwplatt.edu) and use the unix notes to check out the repository there. You can then use the svn mv command to rename one of the files. If you are in the middle of trying to add a file to your repository, you might try using TortoiseSVN->Rename... to rename the existing file to something entirely different and then updating. Note that you need to use the TortoiseSVN rename commands; merely renaming the file in Windows Explorer won't fix your problems. 

Do you see it? We have phi and Phi; phiTest and PhiTest... why you ask? Because phi and Phi are not the same number.  I am not quite sure how I am going to resolve it (well, will have to change the names - but to what?) but have created an issue for it.

18 August 2009

Framework error: code: 28 reason: Operation timed out after 30000 milliseconds

When trying to install a package (in my case openjdk7-dev) you might run into this [on command line OR in the pkg ui]:


Error:
Please check the network connection.
Is the repository accessible?

1: Framework error: code: 28 reason: Operation timed out after 30000 milliseconds with 18904080 out of 20853709 bytes received
URL: 'http://pkg.opensolaris.org/dev'.
2: Framework error: code: 28 reason: Operation timed out after 30000 milliseconds with 18999276 out of 20853709 bytes received
URL: 'http://pkg.opensolaris.org/dev'.
3: Framework error: code: 28 reason: Operation timed out after 30000 milliseconds with 19187200 out of 20853709 bytes received
URL: 'http://pkg.opensolaris.org/dev'.
4: Framework error: code: 28 reason: Operation timed out after 30000 milliseconds with 18991256 out of 20853709 bytes received
URL: 'http://pkg.opensolaris.org/dev'.

The solution to fix this was to simply set an environment variable:
export PKG_CLIENT_TIMEOUT=300

11 August 2009

FTPConnectionClosedException: Connection closed without indication

After installing the ftp server yesterday, I was trying to connect to it with the commons-net library.  Unfortunately it kept failing:

org.apache.commons.net.ftp.FTPConnectionClosedException: Connection closed without indication.
    at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:297)
    at org.apache.commons.net.ftp.FTP.getReply(FTP.java:619)
    at org.apache.commons.net.ftp.FTPClient.completePendingCommand(FTPClient.java:1244)
    at org.apache.commons.net.ftp.FTPClient.retrieveFile(FTPClient.java:1301)

As download worked from the browser, I thought this kinda odd.  Looking a little closer, I decided to manually try the steps from the command line and see if I could figure out what was going on.

I ftp'd in and did the same commands I was doing from Java (passive, binary, etc).

When I tried to 'get ' I saw:


150 Opening BINARY mode data connection for aopalliance-1.0.jar (6371 bytes).
421 Service not available, remote server has closed connection
ftp> 

Since I had found through my debugging that after the exception, the 150 FILE_STATUS_OK was the last reply I got; I looked up 421.  It appears that there is a current bug on OpenSolaris that causes this behavior.

So here's the workaround (for the setup I did yesterday):

cp /lib/libsendfile.so.1 /home/ftp/lib
chown root:bin /home/ftp/lib/libsendfile.so.1
svcadm restart ftp

Everything works beautifully now :)

Installing ftpd into a zone

from zone:

  • pkg install SUNWftp
  • svcadm enable ftp
  • ftpconfig /home/ftp ((it will fail at the end))
from global:
  • ftpconfig -d ((zonepath))/root/home/ftp

should work now

22 July 2009

Western Digital My Book World

So awhile back, I installed a My Book World onto the network. The other day I came home and the rings were spinning frantically and the drive was inaccessible.

I tried rebooting it, power cycling it, etc. No luck.

I contacted support. So far there has been 6 responses from Tech Support (which of course) started off with:

My apologies; I failed to notice you are using Linux.Western Digital technical support only provides jumper configuration and physical installation support for hard drives used in systems running the Linux/Unix operating systems. For setup questions beyond physical installation of your Western Digital hard drive, please contact the vendor of your Linux/Unix operating system.
Which of course is *really* helpful since it is a *Linux* NETWORK drive accessed via web browser and samba. Of course, I understand they aren't trained to understand that a browser or ping on a non-windows system is just as accurate as on a windows system, but...

Still no resolution. I am expecting they are going to tell me to RMA the drive -- but I have a lot of personal sentimental pictures and such on there that have no backups (as these were the backups to the Windows box that died)... No clue what I am going to do -- but since I seem to have to RMA every Western Digital device I buy (internal or external) maybe I should quit buying WD.

07 July 2009

Hanging during boot

As a followup to the previous post (and this one before that)...

It still takes 4-5 hours to boot.... specifically, dmesg shows that this took 4 hours...

Jul  7 08:15:32 serveris xpv_psm: [ID 805372 kern.info] xVM_psm: ide (ata) instance 0 irq 0xe vector 0x90 ioapic 0x4 intin 0xe is bound to cpu 2
(previous line [cdrom] was fine... rest are not)
Jul  7 08:15:32 serveris xpv_psm: [ID 805372 kern.info] xVM_psm: ide (ata) instance 1 irq 0xf vector 0x98 ioapic 0x4 intin 0xf is bound to cpu 3
Jul  7 08:15:32 serveris xpv_psm: [ID 805372 kern.info] xVM_psm: ide (ata) instance 1 irq 0xf vector 0x98 ioapic 0x4 intin 0xf is bound to cpu 0
Jul  7 08:15:40 serveris xpv_psm: [ID 805372 kern.info] xVM_psm: ide (ata) instance 1 irq 0xf vector 0x98 ioapic 0x4 intin 0xf is bound to cpu 3
Jul  7 08:15:57 serveris xpv_psm: [ID 805372 kern.info] xVM_psm: ide (ata) instance 1 irq 0xf vector 0x98 ioapic 0x4 intin 0xf is bound to cpu 0
Jul  7 08:15:57 serveris xpv_psm: [ID 805372 kern.info] xVM_psm: ide (ata) instance 1 irq 0xf vector 0x98 ioapic 0x4 intin 0xf is bound to cpu 1
Jul  7 08:15:57 serveris xpv_psm: [ID 805372 kern.info] xVM_psm: ide (ata) instance 1 irq 0xf vector 0x98 ioapic 0x4 intin 0xf is bound to cpu 2
Jul  7 08:15:57 serveris xpv_psm: [ID 805372 kern.info] xVM_psm: ide (ata) instance 1 irq 0xf vector 0x98 ioapic 0x4 intin 0xf is bound to cpu 3
(repeat and repeat and repeat)
Jul  7 12:21:13 serveris xpv_psm: [ID 805372 kern.info] xVM_psm: ide (ata) instance 1 irq 0xf vector 0x98 ioapic 0x4 intin 0xf is bound to cpu 0
Jul  7 12:21:14 serveris xpv_psm: [ID 805372 kern.info] xVM_psm: ide (ata) instance 1 irq 0xf vector 0x98 ioapic 0x4 intin 0xf is bound to cpu 1


(system becomes usable here)
Jul  7 15:24:19 serveris xpv_psm: [ID 805372 kern.info] xVM_psm: ide (ata) instance 1 irq 0xf vector 0x98 ioapic 0x4 intin 0xf is bound to cpu 3


Any thoughts why a non-existant IDE device is polled for 4 hours during boot?  Or why after finally booting, it is *still* doing it?

UPDATE: Bug submitted

27 June 2009

Update: Ardor3d and DarkMMO on OpenSolaris

As noted in the previous entry, I have Ardor3d working now in OpenSolaris (as of v 0.6-SNAPSHOT of Ardor3d).

I now have a mavenized-version of DarkMMO working as well (poms will be checked in soon).

Below is the startup script I am currently using to launch it.
#!/bin/bash

DS_PATH=`pwd`
DS_CP="$DS_PATH/DarkMMO-Client/target/DarkMMO-Client-1.0-SNAPSHOT.jar"
for file in $DS_PATH/DarkMMO-Client/target/dependency/*.jar; do
    DS_CP="$DS_CP:$file"
done

export LD_LIBRARY_PATH=/export/home/malachi/work/Ardor3Dv1/ardor3d-lwjgl/lib/lwjgl/native/solaris

java -cp $DS_CP -Ddarkmmo.nwndatadir="$DS_PATH/nwn" com.worldwizards.darkmmo.client.DarkMMOClient

24 June 2009

Maxine on OpenSolaris

Maxine is a VM designed for and written in the Java(TM) Programming Language with an emphasis on leveraging meta-circularity, componentized design, and code reuse to achieve flexibility, configurability, and productivity for academic and industrial virtual machine researchers.
So I thought I'd give it a shot.

I extracted the zip file into into /opt.  Originally permissions were as root:root (due to pfexec usage for opt) but I had to change it since maxine didn't like not having write access to the directory.  I also created a symlink to /opt/maxine [which will be how I refer to it from now on].

I copied junit-4.4.jar into /opt/maxine/bin and added a line at the top of /opt/maxine/bin/max:

JUNIT4_CP=/opt/maxine/bin/junit-4.4.jar
I modified my .zshrc to set /opt/maxine as MAXINE_HOME and added $MAXINE_HOME/bin to the beginning of my path.

Following these instructions, I took it for a little spin. 

# max build

This actually failed (cc: language M1 not recognized) as long as gcc was in the PATH before the SunStudioExpress/bin; swapping those around it began working.


# max helloworld
Hello World



# max vm -cp VM/bin test.output.GCTest2
Could not load main class: java.lang.ClassNotFoundException: test.output.GCTest2

KK, let's troubleshoot that...

# max -v helloworld
/opt/maxine/Native/generated/solaris/maxvm -classpath /opt/maxine/VM/bin util.HelloWorld
Hello World!


# max -v vm -cp VM/bin util.HelloWorld
/opt/maxine/Native/generated/solaris/maxvm -cp VM/bin util.HelloWorld
Could not load main class: java.lang.ClassNotFoundException: util.HelloWorld

# max -v vm -cp /opt/maxine/VM/bin util.HelloWorld
/opt/maxine/Native/generated/solaris/maxvm -cp /opt/maxine/VM/bin util.HelloWorld
Hello World!


Ok, I think I have it...

# max -v vm -cp /opt/maxine/VM/bin test.output.GCTest2
/opt/maxine/Native/generated/solaris/maxvm -cp /opt/maxine/VM/bin test.output.GCTest2
Garbage Collector Test
...
GCTest2 done.

I don't have 'max gate'  working yet and 'max inspect' core dumped while trying to fork... but hey, it's a start.

22 June 2009

Ardor3D on OpenSolaris

I noticed earlier today that Sun finally changed the licensing on Darkstar, as per my request. Before going and working on my design, I decided to see what the status of DarkMMO was. Jeff has picked it back up, and has started porting it to Ardor3d.

Ardor3d? I hadn't heard of that...

Apparently, Joshua Slack has moved the development from jMonkeyEngine to Ardor3d. The little bit of research I did seems to indicate that there is a bit of a rift with that -- but that Ardor3d is more current.

Ok, well, can I get Ardor3d working on OpenSolaris?

I go and check out their 'getting started' and was very disappointed to see references to Eclipse. Yes, I know many of you out there like Eclipse; but I am a purist and so have been against it since day 1. Besides, I really didn't like IBM's deceptive practices regarding its launch.

Oh well, let's see if this project is worth using after all. I download the source (subversion, yay!) and go to compile it (maven, yay!)... First failure is obvious... I needed to add a mirror to their nexus repository inside mine.

Try again...

Ok, well now the ardor3d-swt is failing. As much as I hate to, I decide to troubleshoot why it isn't building. As could be expected from a non-java library, the problem was caused by their repo not having the native libraries (yes, native - that's the main reason I despise SWT -- whoever heard of requiring native libraries for a java app intentionally?).

Ok, screw it. I commented out the ardor3d-swt module and then added an exclusion for **/*Swt*.java to the compiler in the top level pom. Ok, now everything else builds.

Now to run the example... hmmm... well that's annoying, I don't really want to have to find all the jars to test it... So I copied the dependency plugin configuration from ambrosia's pom into the top level pom and rebuilt.

Good. Now I have all the runtime dependencies for the examples in one place. I added all of them (why is the Java6 -classpath directory not working?) to the classpath, as well as the auto-generated ardor3d-examples-0.6-SNAPSHOT.jar.

Try again. Close.
export LD_LIBRARY_PATH=/export/home/malachi/work/Ardor3Dv1/ardor3d-lwjgl/lib/lwjgl/native/solaris:$LD_LIBRARY_PATH

Try again. Ok this time it runs. Can't use JOGL in the popup because there isn't a native library for it. Can't use 8 samples, because then it complains about GLX13 configuration. Can't use fullscreen -- well, that's a bit harsh. I *can* use fullscreen but it looks like crap because it changes to 320x240 and has severe artifacts. However, 4 samples, LWJGL, 1152x864 looks pretty good. Colors look a LOT better on 1024x768 though.

So not sure how much time I will spend on it. Definitely appears that it will be a bit of work to make it usable on OpenSolaris. Then again, maybe I should retry on Windows since my Emotiv Epoc won't run on anything else right now anyways.

BTW: To run the example after setting up the classpath and LD_LIBRARY_PATH...
java com.ardor3d.example.basic.BoxExample

10 June 2009

Firefox 3.5 and Java is not enabled

So I download the 3.5 Preview of Firefox (luckily the tarball rather than overwriting my working Firefox) and when I try to do just about anything:

The current version of Java on this system (0 - Java Not Enabled)
So haven't figured out yet how to fix this. Edit|Preferences says that it is enabled. The other version of Firefox (3.1) can run at the same time and Java is working on it...  Hope they iron that out soon.  Especially since that little attempt completely wiped out all my personal data in the 3.1 version (bookmarks, passwords, history, everything -- which by the way, REALLY sucks).