Promise Technology VTrak configure webserver - admin

I inherited management of some Promise VTrak disk array servers. They recently had to be transferred to a different location. We've got them set up and networking is all configured, and even have a linux server mounting to it. Before they were transferred I was trained with the web gui it comes with. However, since the move we have not been able to connect to the web gui interface.
I can ssh into the system and really do everything from there, but I would love to figure out why webserver is not coming up.
The VTRAK system does not allow for much configuration it seams. From the CLI I can start, stop, or restart the webserver, and the only thing I can configure is the amount of time someone can be logged into the gui for. I don't see anywhere where you can configure http or anything like that.
We're pretty sure it's not a firewall issue as well.

I got the same issue this morning, and resolved it as follows:
It appears there are conditions that can render the WebPam webserver with invalid configuration HttpPort and HttpsPort values. One condition that causes this is if the sessiontimeout parameter exceeds 1439 set in the GUI. Apparently the software then freaks and creates invalid configuration which locks out the GUI because the http ports have been changed to 25943 and 29538.
To fix this login through CLI:
swmgt -a mod -n webserver -s "sessiontimeout=29"
swmgt -a mod -n webserver -s "HttpPort=80"
swmgt -a mod -n webserver -s "HttpsPort=443"
swmgt -a restart -n Webserver
You should now be able to access the WebPam webserver interface again through your web browser.

After discussing with my IT department we found it was a firewall issue.

Related

Where is my socket server on AWS EC2 instance?

I have taken over a project that has an AWS ec2 elasticbeanstalk instance running a socket.io server.
I have logged in via and done the following steps.
SSH in
cd /var directory.
ls > account app cache db elasticbeanstalk empty games kerberos lib local lock log mail nis opt preserve run spool tmp www yp
I can't see to find the socket server code? Nor the logs for the socket server?
I am not sure where they would be located.
There are myriad methods to get code on to a server and to run it. Without any information about the code or the OS or anything else, assuming its a Linux based OS, if I’m looking for something and know what it is, I can usually find it by searching for a string that I know I will find inside at least one of the files on the server.
In this case, since its a socket.io, I’d search for socket.io:
grep -rnw '/' -e 'socket.io'
The result will show me all files, including the full path, that contain “socket.io”, and you should be able to determine where the code is pretty quickly.

Websocket server on AWS EC2 instance doesn't respond after two days of inactivity

We are using AWS EC2(ubuntu-xenial-16.04-amd64-server) instance for running PHP Websocket server.
We are using following command, in order to keep WebSocket server running continuously.
nohup php -q server.php >/dev/null 2>&1 &
It is running very well up to two days.But if no client has
connected to WebSocket server in last two days,it automatically stops
responding.
I checked the status of WebSocket port with this command (lsof -i:9000).I got following output(5&6)
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
php 1467 ubuntu 4u IPv4 17137 0t0 TCP *:9000 (LISTEN)
It seems WebSocket server is running.But client(i.e. mobile application) is not able to connect.
Is there any specific reason behind this problem? We are not able to figure out exact issue.
You'll need to provide more information for SO community to be able to help you.
Let's look at the layers for your infrastructure make an educated guess where the problem might be.
We have:
external connector (the mobile app)
PHP script acting as a server (receiver).
OS (Ubuntu)
OS kernel can kill running processes for various misbehaves. Most common OOM-killer (out-of-memory).
It's not uncommon to see PHP scripts becoming unresponsive especially when stream (sockets) programming is involved, we'll need to see that code.
You are saying that everything is fine for two days, so we can rule out external connector problem and concentrate on mismanaging of resources problems: garbage-collection, memory leaks, stream leaks, etc. Some external process is either killing your PHP script or PHP script itself becomes unresponsive.
The investigation should start at:
Sharing the server.php, and then moving to
Log analysis.

Custom django runserver command which establish ssh tunel before running server

My application use database which is on another server. To increase security, access to db server was restricted only for specified production servers.
However sometimes I need to have access to this db, when running development environment from my localhost.
For now a simply run in another console before running server:
ssh tunnel#server-with-access-to-db.com -L 12345:localhost:3306
..which works great, however I need to remember to do that.
I am wondering how to write custom runserver which will establish tunnel automatically, and what is important, will close that tunnel after server will be shut down.
I know that in the future VPN will be much better, however it is not possible for now.
I will be grateful for any suggestions.
FYI: one part of writing custom runserver command is extending it. You can use this example to do so.

Controlling Gunicorn in a new ssh session

I am using Gunicorn to power Django application on a remote server (ubuntu), to which I connect by ssh. Once Gunicorn has started the status log pops up showing you what is going on and such. However when I close my ssh session and reconnect later on I cant seem to reopen the process without killing Gunicorn and rebooting the server.
Not sure if i understand your issue correctly...
When running django/gunicorn usually it is helpful to use some tools to control the processes. One really good option to do so is the use of supervisord:
http://docs.gunicorn.org/en/latest/deploy.html#supervisor
If you just want to run processes directly and being able to (dis-)connect - generally screen is a good option.
It allows you to to disconnect an ssh-session while leaving your 'virtual?' terminals running.
Just re-ssh to your server and reconnect using:
screen -xr

How to set up Micro CloudFoundry on Windows

tldr; This question was to get help setting up Micro Cloud Foundry on Windows XP behind a corporate firewall as an innovation-demonstration project for a Fortune 500 IT departent. Basically, the project stalled, despite this stackoverflow page - the magic wasn't strong enough. I am accepting #DanHigman answer below, but if anyone sees this and can provide a simple straight-forward answer, by all means...
Can anyone provide a clear step-by-step on setting up MCF on a Windows (XP in my case) machine behind a corporate firewall, for demostrating the feasibility of PaaS in the corporate IT world?
My VM is installed and running and I can use the menu ok. I have vmc working. I have a test Node.js server app, that works on local, ready to push. But I can't get past that stage.
The firewall gave me trouble so I lowered my goal to just work offline. I followed the instructions noted below as best I could, but often the instructions are mac oriented - I would like them for a Windows command line (especially SSH tunneling):
http://blog.cloudfoundry.com/2011/09/08/working-offline-with-micro-cloud-foundry/
http://support.cloudfoundry.com/entries/20332921-micro-cloud-foundry-trouble-shooting-help
This blogger may have half-way covered my problem doing the SSH tunnel settings, but all it gives is "use Putty" - more detail would help:
http://support.cloudfoundry.com/entries/20419943-using-micro-cloud-locally
Also, whenever the vmc obviously gets an error or other message, it only outputs the following in the command line:
vmc target http://api.vcap.me
<<<
[200, "<html><body>SNP/2.0/102/Unknown Command 'info'</body></html>\r\n\r\n", {}
]
>>>
Thanks for any help. BTW - I know I could do this on my mac, the big obstacle is the windows and firewall environment.
Update:
#Dan and #ebottard: Thanks to your help, I'm almost there. ping is working now, hosts file seems right, but the vmc target api.vcap.me still does not find the VM at that 192.168.253.128 IP - even tho ping does. In the first link above, Martin wrote the following, but assuming we are doing it on a mac:
After the update is complete, you will need to make some changes on your local system. What you will need to do is to set up an SSH tunnel to access your Micro Cloud Foundry VM (note that you will need to supply the IP address in the command below with the actual IP of your VM, which is displayed in the console).
sudo ssh -L 80:192.168.168.149:80 vcap#192.168.168.149
Password:
vcap#192.168.168.149's password:Â
The first password being prompted is the sudo password for your machine, as it is needed to open port 80 which requires root privileges. The second password is the vcap user password which you entered during the initial configuration of your Micro Cloud Foundry.
I need to have these instructions translated into Windows, and all I have to go on is that I might use puTTy (which I have downloaded) to do it. Any more ideas?
Looks like you're running an application on your Windows machine called "Snarl" (a poor Windows-based clone of the OS 10 app Growl :-p). It looks like it's interfering with communication to the MCF intstance, close it and have another try.