Change Chef Server Address - amazon-web-services

I'm using AWS to host my Chef server, and I've connected to it from my workstation using Knife. However, after shutting down and turning the server on, the Public DNS changed, and I'm unable to reconnect to the server, resulting in this message:
ERROR: Error connecting to https://*.compute-1.amazonaws.com/organizations/*/cookbooks?num_versions=all
Is there any way to change the address of the Chef server on the workstation without making the workstation think it's connecting to an entirely new server?

You need to reconfigure the Chef Server, possibly updating it's config file first to ensure the right hostname is in the right places. After that, make sure you update the chef_server_url in the knife.rb or client.rb of every machine.

Related

Cosmos SDK remote connection refused

I am new to Cosmos SDK and I just forked the official Cosmos SDK nameservice tutorial. It works well on my local machine so I just deployed it to cloud server and I want to access it thru nscli from my local machine.
First I configured nscli to set the node to remote server address on my local machine
nscli config node tcp://{{my remote server ip here}}:26657
Then I tried to run the following query
nscli query account $(nscli keys show jack -a)
Finally I got some error like ERROR: ABCIQuery: Post failed: Post "{{my remote server ip}}:26657": dial tcp : connect: connection refused
I am curios since I don't think there is any network related problem in my case. Did I mis-configured something?
Thank you very much!
Best,
Min
My config file is configured to listen on 127.0.0.1:26657, which should be set to 0.0.0.0:26657 instead. So the connection succeeded if I start the daemon node like tendermint node --rpc.laddr=tcp://0.0.0.0:26657

How to ssh port forward into a server to access a mysql host server for local work on Django web app and Jupyter notebook?

I'm unfamiliar with this terrain, so if any one can guide me in a step by step manner- it would really help. My MySQL database sits on a AWS host X- "ec2-xxx-xxx-xxx-xx.compute-1.amazonaws.com". It is blocked to access from individual local machines and is usually accessed from another working server Y- "ec2-yy-yyy-yyy-yy.compute-1.amazonaws.com" through port '3306'. Now it is especially inconvenient to access this via terminal SSH every time and scripts while they run, its hard to prototype or build an elaborate app. I'd like to set up a SSH tunnel from my local to server Y to be able to access MySQL host X from my local machine, to run queries from my locally deployed Jupyter notebook as well as local working-in-progress Django web app.
The reason why I ask for something more step-by-step is that I have to port forward to another server hosting a redis database which again is accessible through a specific server only. So, I'll be able to carry the solution from here to there too. I'm willing to go into chat as well if needed, but I need to resolve this rather quickly. Thanks!
PS: I've tried many guides off of the internet, but nothing has worked, it's become clear to me that I'm missing some foundational understanding or pathway. That's why I'm here, trying to start from the ground.

vCenter Server Appliance 6.0 : 503 Service Unavailable

503 Service Unavailable (Failed to connect to endpoint: [N7Vmacore4Http16LocalServiceSpecE:0x7fc8bad2f810] _serverNamespace = /vsphere-client _isRedirect = false _port = 9090)
This is the error i'm constantly getting when trying to connect to the vCenter Server Web Client.
Details :
I'v installed the vCS Appliance 6.0 on an ESXi 6.0 host. It's running on top of it along other VMs.
I can access the vCS appliance thourght an SSH client, but every attempt to access the web client ends with the error above.
I'v found that causes for this error are: the server being overloaded or under maintenance. However, I'm the only one to have access to this platform.
Any ideas ?
EDIT: Solved
I had a copy of the current vCenter appliance stored on the same ESXi. This created an IP conflict. I changed the IP address of the backup before its creation and the problem was solved
I found the answer:
The problem was that I made a backup of the current vCenter appliance and stored it on the ESXi 6.0 without changing it's IP address. This created an access conflict. All I had to do is to change the IP address of the backup during its creation and the problem was solved
I was getting that 503 error, but my case was a little different:
I changed the IP address of my VCSA 6.0 Update 2 plus its default gateway via the GUI (https://x.x.x.x:5480).
I was able to ping it and ssh into it afterwards, but I was not able to login using either the old (thick) client or the web client. Both were giving me the 503 Server error.
I tried rebooting, but nothing.
After the reboot, I SSHd into it and was able to see that the web client service was not running. The vpxd service was running though. So I started it:
vcsa6:~ # service vsphere-client status
VMware vSphere Web Client is not running.
vcsa6:~ # service vmware-vpxd status
vmware-vpxd is running
vcsa6:~ # service vsphere-client start
Last login: Sat Dec 10 23:40:00 UTC 2016 on console
Starting VMware vSphere Web Client...
Waiting for VMware vSphere Web Client......
running: PID:22433
vcsa6:~ # service vsphere-client status
VMware vSphere Web Client is running: PID:22433, Wrapper:STARTED, Java:STARTED
I was still getting the 503.
I found then this link, which basically told me to edit the /etc/hosts file of the VCSA and voila: the VCSA FQDN entry in there was still pointing to the old IP address. I changed it and rebooted and now both clients, web and thick, work as before.
I had 503 error issues on my lab/test vCenter 6.0 Update 1. I installed the integrated VCSA on a host that has limited memory, so I dropped the default 8G RAM and multiple CPU to 1 CPU and 4G. I would not go below those and use the default values if you can as webclient 503 errors occur and inventory service connection issues arise without the required RAM. I experienced no issues on the fat client.
I've solved it with:
/etc/init.d/vpxa restart
Then I had some problems with hostd.
/etc/init.d/hostd restart
It worked great after.
ESXi 6.5 here.
check to see if the vmware-vpxd is not stopped. If it is, start it.
-Putty into vcenter (VCSA)-

VMware vCenter Server 5.5 Single Sign-On Install finds wrong ip address for FQDN

I am migrating my vCenter Server 5.5 to a new server (databases have already been moved to a new SQL server and all is OK on existing vCenter Server 5.5 implementation). When I begin the simple install process on the new vCenter Server host the Single Sign-On component presents me with an IP address of 10.10.10.117 as the ip address of the FQDN file01.xxxxxxxxx.com. This is the iSCSI interface address. I need it to use the 10.1.1.17 ip address that is the address of the production NIC that the ESXi 5.5 hosts will be communicating with. I have already changed the binding order of the NIC cards and flushed the DNS cache. I also added file01.xxxxxxxx.com with the proper IP address to the hosts file and also file01 to the hosts file. Still, during the install, 10.10.10.117 is discovered. Thanks in advance! Babak C.
Just to get a quick clarification...are you freshly installing vCenter 5.5? Or are you migrating an existing vCenter server to a new host and using the update utility to upgrade? I am assuming you are doing a fresh install based on your details about the SQL server and SSO. Here is my suggestion, in case it is a fresh install.
We had a similar problem with 5.5 on a new install where the IP address that was discovered during the actual vCenter Server install was that of the public facing NIC which we never use for management traffic (it's for internet access on the vC server, for update manager, etc.)
The strange thing is that there had NEVER been an entry in ANY of our DNS servers for that interface. So, after looking into it a little bit, I started thinking the IP that was returned during install was not a DNS result at all. Rather, it was (most likely) simply gathered from the interfaces on the Server based on binding order (e.g. which NIC has the default gateway.)
In order to save having to uninstall and clean up a major mess if the install completed wrong, we stopped and got in touch with VMware support. They suggested we clear all of the temporary files both in the standard "temporary" folder on windows as well as under /ApplicationData/vmware/xxx, where 'xxx' would be whatever product is giving you trouble and HAS NOT been FULLY INSTALLED* (e.g. you started the install and noticed the incorrect IP, so you terminated the installer and there is metadata and cached files remaining from the partially run install).
Basically, what we had to do, was clear the temporary files and then make sure the NIC Binding Priority was correct (so you should check in Network Adapters|(press-alt)|Advanced Settings. Make sure the correct binding is checked (e.g. if you don't use IPv6 on the private network, clear it) and make sure that the Windows Network is at the top of the priority list on the second pane of the advanced settings. This helps tremendously with SSO by making sure the Windows Network stack is the first queried when you are signing in and SSO must submit a kerberos ticket to the AD DC for validation.
It is possible, that once you delete the partial install files and temporary files and fix the network settings (probably be a good idea to reboot as well), the next time you run the installer you might have success.
I will try to check this post later to see if it helped you at all... or it I just succeeded in making your life even more difficult (which I certainly hope not!) :)
One more thing...prior to initializing the installer, open up a PS session, perform ipconfig /flushdns and then ping the hostname of your vCenter server in order to get it in the DNS cache. You should also perform the following:
nslookup
NS>{your vcenter server IP address}
/* make sure the resulting hostname is correct..this ensures your PTRs and rDNS is working correctly. vCenter HEAVILY relies on accurate reverse DNS configuration...then do the following lookup for forward DNS */
NS>{your vcenter server FQDN}
Hope it helps. Best of luck my friend!
SIETEC

filezilla Connection timed out

This might seem like a duplicate question but it is not. I tried to go through similar questions but I couldn't find a fix for my problem. Here is my problem:
I need to set up an ftp connection on company servers.
I can easily connect to ftp server from fileZilla on my PC but when I try it over one of the server machines to the file server all I see is the following:
Response: fzSftp started
Command: open "*****#***.***.***.**" **
Error: Connection timed out
Error: Could not connect to server
Status: Waiting to retry...
Status: Connecting to ***.***.***.**...
Response: fzSftp started
Command: open "*****#***.***.***.**" **
Error: Connection timed out
Error: Could not connect to server
I googled the "Connection timed out"
error and I realized that the first place to check is firewall or router setting. these are outsourced to another company and they say that the issue is solved and it should work fine. I don't know where to look at.
I've had lots of issues with Filezilla. You may try another software first to see if Filezilla itself is the issue.
If you're on Windows, I highly suggest the open source project WinSCP (https://winscp.net/eng/download.php). For Mac, Cyberduck (https://cyberduck.io/?l=en) is solid (and free), though you may prefer Transmit.
I was having this problem after upgrading Filezilla. I downgraded it to a previous version and it worked like charm. I came across this ticket thread and it was absolutely helpful : Filezilla Support Ticket
Check your security group rules. You need a security group rule that allows inbound traffic from your public IP address(Google: What is my ip?) on the proper port.
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
In the navigation pane, choose Instances, and then select your instance.
In the Description tab, next to Security groups, choose view rules to display the list of rules that are in effect.
For Linux instances: Verify that there is a rule that allows traffic from your computer(public ip) to port 22 (SSH).
For Windows instances: Verify that there is a rule that allows traffic from your computer(public ip) to port 3389 (RDP).
Also take a look at here and here for more details
I need to set up an ftp connection on company servers. I can easily connect to ftp server from fileZilla on my PC but when I try it over one of the server machines to the file server all I see is the following:
<failure to connect code>
Please note that public IP and internel IPs will be a different address; such as 123.456.675.574 for the public but internal to the server network it will be something more like 192.168.10.574 .
This is why you can easily connect from your PC because it uses the public IP address but from the internal IP network of the company servers that address will not be valid, and the internal one would need to be used instead.
Try this, 200 is just an example, just increase it and try.
Edit --> Settings --> Connection --> Timeout in seconds = 200