Re: OPeNDAP Hyrax Installation

21 views
Skip to first unread message

James Gallagher

unread,
Jan 24, 2018, 1:00:07 PM1/24/18
to Benedict Castro, James Gallagher, support@opendap.org support


On Jan 24, 2018, at 00:46, Benedict Castro <benedict...@gmail.com> wrote:

Hi James,

I'm Benedict Castro, a researcher from the Philippines, and I am in need of assistance in performing the OPeNDAP Hyrax installation. I got your email from github since I was searching the web for easier ways to install the server. Upon looking at the OPENDAP github profile, I've seen there are repositories there on installation procedures. I'm not that proficient yet in this kind of work, so I wanted to know if how can I get started? Do I need to download all repositories? And what should I look first from those? Any kind of help will be appreciated. I hope you can help me on this endeavor. Thank you.

P.S. I'm working using CentOS 7. 

There are two ways forward: You can build the Hyrax source code or install binaries. Have you tried installing the binaries we provide? Here’s the link if you have not: https://www.opendap.org/software/hyrax/1.14.0

That page also have a link to the server’s installation and configuration documentation. Installation is very straightforward on a C7 machine: get the RPMs and one WAR file, use yum to install the RPMs and copy the WAR file to the correct place. Start the server. Configuration can be very simple too, but depends on how many optional features you want to tweak.

Let me know if you need more information.

James



Best regards,

Benedict Z. Castro
Physical Oceanography Laboratory
The Marine Science Institute
University of the Philippines
Diliman, Quezon City



--
James Gallagher




James Gallagher

unread,
Jan 26, 2018, 11:34:32 AM1/26/18
to Benedict Castro, James Gallagher, support@opendap.org support


On Jan 24, 2018, at 18:35, Benedict Castro <benedict...@gmail.com> wrote:

Hi,

Good day!

As a summary, I have already installed java (1.8.0_161) and tomcat 8 on a CentOS 7 machine. I also tried installing the binaries but I had troubles in using BES. At first, I can start the BES, but upon reboot, I can no longer initialize it. I used sudo service besd start and the error that I've encountered is shown below:


/usr/bin/besctl start
Starting the BES
The besctl command cannot write to /var/run/bes.
Check that the directory exists and that the user running besctl has write permission for it.


So I tried to create that directory and fortunately I can start BES again. But after rebooting, the created /var/run/bes directory no longer exists and the error above reoccurs. I've tried searching solutions to the problem but no luck as of now. I've seen one, though, but it would mean reverting back to CentOS 6. Have you encountered this kind of problem before? 

Yes. What’s happening here is that, in the second case,  you’re running the BES as a regular user. When you use ‘sudo service besd start’ you’re starting the service as root and root can create directories, etc., everywhere.

Have you set the BES daemon to start up on boot? Since ‘root’ handles that, the BES will start on boot. As a plus, you won’t have to remember to start it on every boot. Here’s a page that describes what to do for Centos 6, and 7 and Ubuntu. Unfortunately, the exact command differs between OSs.


James



Thank you for the time and assistance.


Best regards,

Benedict


--
James Gallagher




James Gallagher

unread,
Jan 31, 2018, 12:21:08 AM1/31/18
to Benedict Castro, James Gallagher, support@opendap.org support
On Jan 30, 2018, at 7:47 PM, Benedict Castro <benedict...@gmail.com> wrote:

Hi,

I just installed the latest version of the CentOS 7 and I haven't installed other binaries except for hyrax-specific dependencies. I tried editing the besd file in the init.d directory to create or do sudo mkdir /var/run/bes. Is that okay or would it cause future problems? Thank you.
I don’t think that would be a problem. I’ll double check in the morning.

James

Best regards,

Beni

Benedict Z. Castro
Physical Oceanography Laboratory
The Marine Science Institute
University of the Philippines
Diliman, Quezon City



On Wed, Jan 31, 2018 at 12:21 AM, James Gallagher <jgall...@opendap.org> wrote:


On Jan 29, 2018, at 18:12, Benedict Castro <benedict...@gmail.com> wrote:

That directory always disappears or seems to be removed after every boot. In any case, how can I know who owns the directory? I tried logging as root but the problem persists.

We’ll try to reproduce the problem here. Is there anything unusual you think we should know about the CentOS 7 machine you’re using?

James


Best regards,

Beni

Benedict Z. Castro
Physical Oceanography Laboratory
The Marine Science Institute
University of the Philippines
Diliman, Quezon City



On Tue, Jan 30, 2018 at 8:38 AM, James Gallagher <jgall...@opendap.org> wrote:


On Jan 28, 2018, at 23:55, Benedict Castro <benedict...@gmail.com> wrote:

Hi James,

I can't seem to make BES start up on boot. Every time I reboot, I still get the same error before (see below).

<image.png>

Then I tried creating the directory and started bes again. Fortunately, it initialized.

<image.png>


However, I can't set it to start on boot. Here's what I did in the terminal:

<image.png>

After rebooting, the BES hasn't been enabled and I go back to my initial problem (at the topmost of this email). I don't know the problem so I hope you can help.

Who owns the var/run/bes directory.

James


Thank you.


Best regards,

Beni

--
James Gallagher






--
James Gallagher






--
James Gallagher
jgall...@opendap.org


James Gallagher

unread,
Feb 1, 2018, 5:35:36 PM2/1/18
to Uday Kari, James Gallagher, support@opendap.org support


Begin forwarded message:

--
James Gallagher




James Gallagher

unread,
Feb 6, 2018, 12:10:06 PM2/6/18
to Uday Kari, James Gallagher, support@opendap.org support
Uday,

When you are responding to users, please include sup...@opendap.org on the CC list - even if they don’t initially send their message to support. That way the fix(es) will show up in the archived support messages.

Thanks,
James

On Feb 6, 2018, at 00:32, Uday Kari <uk...@opendap.org> wrote:

Hi Benedict,

1. 
Is that okay? Yes, should be OK, as temporary workaround, since we just need that directory to exist somehow (for now).  We are modifying the RPM to ensure that this will no longer be a concern. We recommend using the -p option for mkdir, as advised below. 

2. 
didn't find the file (and directory)...just FYI:  The /var/lib/cloud/... directories should be installed in the Centos 7 AMI mentioned in message below and available at (just Google "Centos 7 AMI"): 
https://aws.amazon.com/marketplace/pp/B00O7WM7QW

If still not there, you will need to perhaps look into cloud-init:
https://stackoverflow.com/questions/23411408/how-do-i-set-up-cloud-init-on-custom-amis-in-aws-centos

3. 
text box with gray background. I just copied and pasted from our jira
https://opendap.atlassian.net/browse/HYRAX-600?focusedWorklogId=21534&page=com.atlassian.jira.plugin.system.issuetabpanels%3Aworklog-tabpanel#worklog-21534

to get codes below where I used {code} tag to generate the html needed like so:
{code}
This is some code
{code}


Thanks,

Uday Kari


On 2/5/18 5:28 PM, Benedict Castro wrote:
Hi Uday,

I didn't find the file (and directory) /var/lib/cloud/scripts/per-boot/per-boot.sh so what I did was I tried editing the /etc/init.d/besd file. There, I added the sudo mkdir /var/run/bes. Is that okay? Or would it cause problems in the future? So far, I haven't encountered any. Thanks!

On a side note, how do you write codes or scripts in a sort of text box with gray background as you did in your message? I'm just curious. Thanks!

Best regards,

Benedict Castro

Benedict Z. Castro
Physical Oceanography Laboratory
The Marine Science Institute
University of the Philippines
Diliman, Quezon City



On Tue, Feb 6, 2018 at 4:09 AM, Uday Kari <uk...@opendap.org> wrote:
Hi Benedict,

Thanks for reporting this issue.  We are looking into this, so Hyrax is stable between reboots.  We will provide a fix as soon as we have it done.  For now, we have found that creating the /var/run/bes directory just before bes start will allow normal start.  Specifically, with Centos 7 AMI,   I was able to start BES on boot by editing (or add if not existing) the following file
/var/lib/cloud/scripts/per-boot/per-boot.sh

with following shell script

#!/bin/sh
sudo mkdir -p /var/run/bes
sudo besctl start

Thanks,

Uday Kari

--
James Gallagher




Reply all
Reply to author
Forward
0 new messages