This post is a shameless plug for soapUI.
I came across soapUI while running through the Self-Paced Workshop for the JBoss SOA Platform (pdf download.) It is incredibly simple to create a test for a web service. There is even an Eclipse plugin, but I haven't tried that yet.
Happy coding.
Tuesday, January 11, 2011
Monday, November 29, 2010
Recursive setfacl or how to add your PostgreSQL data directory to Git
This was an interesting annoyance.
I was working on some examples and wanted to be able to delete everything cleanly after I was done.
I had an instance of JBoss and wanted PostgreSQL to use a local directory for data.
My directory structure was :
example/
data
jboss-eap-5.1
logs
I had a user "postgres" to run PostgreSQL. Since the rest of the directory was created by me, "jeremy," I used setfacl to add "postgres" to the data directory:
When I ran :
It wasn't happy. I got :
Next up was :
That worked for "initdb." I was able to su to the "postgres" user and execute "initdb" in "data/."
I was happy until I tried to add "data/" to Git :
setfacl to the rescue!
Unfortunately I got the same error.
I was missing the important "d" argument. The following worked :
I added everything to Git.
The moral of this rambling story : use the "d" flag with setfacl to cascade permissions to the files.
I was working on some examples and wanted to be able to delete everything cleanly after I was done.
I had an instance of JBoss and wanted PostgreSQL to use a local directory for data.
My directory structure was :
example/
data
jboss-eap-5.1
logs
I had a user "postgres" to run PostgreSQL. Since the rest of the directory was created by me, "jeremy," I used setfacl to add "postgres" to the data directory:
setfacl -m u:postgres:rwx ./data/
When I ran :
initdb -D data/
It wasn't happy. I got :
"initdb: could not change permissions of directory"
Next up was :
sudo chown -R postgres:postgres data/
That worked for "initdb." I was able to su to the "postgres" user and execute "initdb" in "data/."
I was happy until I tried to add "data/" to Git :
[jeremy@jeremy example]$ git add data
error: open("data/PG_VERSION"): Permission denied
error: unable to index file data/PG_VERSION
fatal: adding files failed
setfacl to the rescue!
sudo setfacl -Rm u:jeremy:rwx ./data/
Unfortunately I got the same error.
I was missing the important "d" argument. The following worked :
sudo setfacl -Rm u:jeremy:rwx,d:u:jeremy:rwx ./data/
"sudo" was necessary because of changing the ownership to the "postgres" user.I added everything to Git.
The moral of this rambling story : use the "d" flag with setfacl to cascade permissions to the files.
Tuesday, October 12, 2010
xlcip or How to copy past from the command line to x-windows
Brain Ashburn, my colleague in the Atlanta Red Hat office, introduced me to the xclip utility today. It copies output from the command line and puts it into x-windows.
For example, to copy the current directory :
There are of course more useful things that can be piped to it. To try it out create a file, add some text and :
Its available through yum :
For example, to copy the current directory :
pwd | xclip -i -sel "clip"
There are of course more useful things that can be piped to it. To try it out create a file, add some text and :
cat newfile | xclip -i -sel "clip"
Its available through yum :
sudo yum install xclip
Tuesday, October 5, 2010
Installing MySQL with Yum
A quick note on installing mysql with yum in case anyone else is lazy (like me) and runs :
That only installs half of what's needed. nixCraft sums it up nicely for RHEL. It also works for Fedora :
To start it up and set the root user/password :
sudo yum install mysqlThat only installs half of what's needed. nixCraft sums it up nicely for RHEL. It also works for Fedora :
$ sudo yum install mysql
$ sudo yum install mysql-server
To start it up and set the root user/password :
$ sudo yum install mysql
$ sudo chkconfig mysqld on
$ sudo /etc/init.d/mysqld start
$ mysqladmin -u root password PASSWORD
$ mysql -u root -p
H2 Connections in Eclipse
H2 is a great database for prototyping and local work. Eclipse does not come with a default driver definition though.
Dan Allen has a nice tutorial on Google code illustrating how to set one up.
Dan Allen has a nice tutorial on Google code illustrating how to set one up.
Friday, October 1, 2010
You don't have permission to access / on this server.
More fun with Apache.
There was a time when I could configure Apache without the help of Google. Alas, that time was years ago.
I wanted several versions of Apache on my machine so that I could test different mod_cluster configurations side by side.
I downloaded the Apache source, built it and put in "/examples" under my home directory. After I started it I got :
I immediately checked the directory permissions. They looked okay. I spent some time monkeying with the SELinux security settings.
The problem was simple: Apache needs execute permissions all the way up to the root directory.
Simply moving my "examples" directory to the root fixed it.
There was a time when I could configure Apache without the help of Google. Alas, that time was years ago.
I wanted several versions of Apache on my machine so that I could test different mod_cluster configurations side by side.
I downloaded the Apache source, built it and put in "/examples" under my home directory. After I started it I got :
You don't have permission to access / on this server.
I immediately checked the directory permissions. They looked okay. I spent some time monkeying with the SELinux security settings.
The problem was simple: Apache needs execute permissions all the way up to the root directory.
Simply moving my "examples" directory to the root fixed it.
Friday, September 24, 2010
httpd dead but subsys locked
While firing up apache this morning I got nothing. A quick "httpd status" returned an interesting message :
The solution was simply to delete the lock :
httpd dead but subsys locked
I have no idea when the lock got created. I assume it was the last time I ran apache. I don't use it as a daemon.The solution was simply to delete the lock :
sudo rm /var/lock/subsys/httpd
All was well after that.
Subscribe to:
Posts (Atom)