Search This Blog

04 January 2010

Zones getting out of sync

The other day, I started an update and walked away. I noticed today it was done, so I zfs snapshotted the zones and xvm sessions then rebooted.

Upon bootup, everything seemed OK until I tried to access the web pages on one of the zones. Checking svcs -xv, I saw that the local filesystem was down! That's not good!

While troubleshooting, it occurred to me that the global is reporting snv_130 and zlogin to a zone is reporting snv_101a. Oops. Just a little outdated.

I looked around for how to get them into sync, and ran across this article.

The solution is actually quite simple.  It takes *forever* so I really wish I would have checked the time for you before I started.  The basic jist of it is:

# pfexec zoneadm -z MYZONE halt
# pfexec zoneadm -z MYZONE detach
# pfexec zoneadm -z MYZONE attach -u

At first, I forgot the '-u' and it came back and told me it was out of sync and reminded me to try again with -u.


root@serveris:~# zoneadm -z eoti.org attach -u

Log File: /var/tmp/eoti.org.attach_log.voaWef
Attaching...

       Global zone version: entire@0.5.11,5.11-0.130:20091219T044839Z
   Non-Global zone version: entire@0.5.11,5.11-0.101:20081204T010954Z
           Publisher Check: Zone preferred publisher does not contain
                            entire@0.5.11,5.11-0.130:20091219T044839Z.
           Publisher Reset: Copying preferred publisher from global zone.
  Updating non-global zone: (Stage 1).  Output follows
Creating Plan                
ERROR: Could not update attaching zone

Oops, now what?  At first I started looking online at things like Bug 13190... Then I realized I was missing the obvious...
Log File: /var/tmp/eoti.org.attach_log.voaWef
hmm, ok, so what does it say?

root@serveris:~# cat /var/tmp/eoti.org.attach_log.voaWef

[Monday, January  4, 2010  8:08:03 PM PST] Log File: /var/tmp/eoti.org.attach_log.voaWef
[Monday, January  4, 2010  8:08:07 PM PST] Attaching...
[Monday, January  4, 2010  8:08:07 PM PST] existing
[Monday, January  4, 2010  8:08:07 PM PST]
[Monday, January  4, 2010  8:08:07 PM PST]   Sanity Check: Passed.  Looks like an OpenSolaris system.

Unable to retrieve package data for publisher 'os-dev' from one
of the following origin(s):

http://pkg.opensolaris.org/dev/

The catalog retrieved from one of the origin(s) listed above only
contains package data for: opensolaris.org.

To resolve this issue, correct the origin information provided for
publisher 'os-dev' using the pkg set-publisher subcommand, or re-add
the publisher using the correct name and remove the 'os-dev'
publisher.

To re-add this publisher with the correct name, execute the following
commands as a privileged user:

pkg set-publisher -P -g http://pkg.opensolaris.org/dev/ opensolaris.org
pkg unset-publisher os-dev


Unable to retrieve package data for publisher 'os-dev' from one
of the following origin(s):

http://pkg.opensolaris.org/dev/

The catalog retrieved from one of the origin(s) listed above only
contains package data for: opensolaris.org.

To resolve this issue, correct the origin information provided for
publisher 'os-dev' using the pkg set-publisher subcommand, or re-add
the publisher using the correct name and remove the 'os-dev'
publisher.

To re-add this publisher with the correct name, execute the following
commands as a privileged user:

pkg set-publisher -P -g http://pkg.opensolaris.org/dev/ opensolaris.org
pkg unset-publisher os-dev


pkg: The following pattern(s) did not match any packages in the current catalog.
Try relaxing the pattern, refreshing and/or examining the catalogs:
    entire@0.5.11,5.11-0.130:20091219T044839Z

This may seem odd to most of you... but I had the default opensolaris package repository AND the dev repository setup at one point; so it was getting confused.  I followed the instructions (the pkg set-publisher and pkg unset-publisher) then retried the attach...

root@serveris:~# zoneadm -z eoti.org attach -u

Log File: /var/tmp/eoti.org.attach_log.4kaGTg
Attaching...

       Global zone version: entire@0.5.11,5.11-0.130:20091219T044839Z
   Non-Global zone version: entire@0.5.11,5.11-0.101:20081204T010954Z
           Publisher Check: Zone preferred publisher does not contain
                            entire@0.5.11,5.11-0.130:20091219T044839Z.
           Publisher Reset: Copying preferred publisher from global zone.
  Updating non-global zone: (Stage 1).  Output follows
DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                              121/121 19959/19959  125.0/125.0

PHASE                                        ACTIONS
Removal Phase                              5811/5811
Install Phase                            15876/15876
Update Phase                             12076/12076
PHASE                                          ITEMS
Indexing Packages                            122/122
  Updating non-global zone: (Stage 2).  Output follows
No updates necessary for this image.  
  Updating non-global zone: Zone updated to entire@0.5.11,5.11-0.130:20091219T044839Z
Attach complete.
Yay!

30 December 2009

Sun Microsystems Inc. (JAVA), Oracle Corp. (ORCL)

Premium offered: $0.14 or 1.50%
Acquirer: ORCL
Target: JAVA
Offer per share: $9.50 cash (too bad I paid $12.25/share)
Value of outstanding common equity: $7,074,650,000
Target share price: $9.36
Acquirer share price: $25.00
Expected closing: N/A
Annualized gain: N/A
Note: The U.S. Justice Department cleared the way for Oracle's acquisition
of Sun Microsystems about a month after Sun's shareholders approved the
deal. Oracle withdrew its application for clearance in Russia where
authorities are unwilling to approve the deal ahead of a decision from the
European Commission. The EC objected to the deal, saying Sun's MySQL
database software would reduce competition in the database market. The
European Union later extended its review of the deal to the end of Jan.
after Oracle asked for the extension to allow it more time to respond to the
concerns the Commission voiced. A bipartisan group of U.S. senators have
been urging the European Commission to speed up its investigation into the
ORCL/JAVA deal, saying JAVA's financial position has become more precarious
as the EC's inquiry has continued. Oracle's Chief Executive Larry Ellison
has said he's willing to create a separate entity to house its MySQL open
database business in order to placate European regulators and follow through
with the acquisition.

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.