Port number settings in cloud9, for elasticsearch and rails system - ruby-on-rails

now I'm working on a Full-text search system, using web browser UI to find any text data file in my local network.
Here is develop environment.
OS:Macbook Air El Capitan 10.11.6
IDE:Cloud9
Lang:Ruby on Rails
SearchEngine:Elasticsearch
Using this site as a reference, I faced problems of PORT number many times.
(don't need to read sentence, since it's written in Japanese)
==========
I got this error many times importing db:seed, making index( _elasticsearch__.
create.~), ... and so on.
Faraday::ConnectionFailed: Failed to open TCP connection to localhost:9200 (Connection refused - connect(2) for "localhost" port 9200)
Also, I can't see anything in "localhost:9200" in my browser.
I had no setting about PORT number in cloud9, how should I do?
setting parameters in cloud9(cloud-network)
download this project from cloud9, and continue to make in local-network
which is better, or another better plan...

Follow the elastic search documentation
Installation
Download and unzip the Elasticsearch official distribution.
Run bin/elasticsearch on unix, or bin\elasticsearch.bat on windows.
Run curl -X GET http://localhost:9200/.
Start more servers …

Related

Connecting to a remote ArangoDB dockerized server

I am a beginner in regards to ArangoDB and I am trying to deploy my first project using it. The website is PHP based - what I did is that I created an Arango Docker container on Digital Ocean so that I can access it from the browser with the ipv4 provided. Public access to port 8529 is enabled. Locally, I am able to modify the .config file in order to point to the corresponding ip and I can painlessly retrieve data.
As a hosting provider I am using one.com. When uploading the same files that I am able to run locally on my own domain I get the following error:
["_database":"ArangoDBClient\Connection":private]=> string(7) "_system" } ArangoDBClient\ConnectException: cannot connect to endpoint 'tcp://xxx.xx.xxx.xxx:8529/': Connection timed out
I want to mention that I have also tried out ArangoOasis. No luck with it - I get the same error. Been at it for quite a few weeks - I would very much use some guidance. Even what to do next as I am out of ideas and documentation to read.

How to access phpmyadmin on DDEV Windows 10 pro localhost with SSL record too long error

I am using DDEv and Docker with Windows 10 pro to set up a localhost install of drupal 8.8 using Composer. I have set up and configured the local drupal installation (it is a fresh install) and it appears to be running correctly, but in the admin section of the drupal site I receive a warning to change write permissions of sites/default/settings.php.
I tried to change settings using Filezilla, but it appears that local files in Filezilla do not provide access to write permissions? When I right-click the file in Filezilla, no permissions option appears.
Following troubleshooting tips from ddev, I tried to access phpmyadmin at https://mysitename.ddev.site:8036
Instead of loading phpmyadmin, I got the following error message:
Secure Connection Failed
An error occurred during a connection to dmckimep.ddev.site:8036. SSL received a record that exceeded the maximum permissible length.
Error code: SSL_ERROR_RX_RECORD_TOO_LONG
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.
I've been searching around for a couple of hours now and do not find a solution to this. I ran ddev describe and all seems fine with the installation. The drupal site in the container seems to run okay. There are no port conflicts present so far as I have found, so I am not sure why I cannot get access to phpmyadmin.
I am a relative newbie in terms of skills, but have successfully maintained drupal 4-7 on localhost with XAMPP and my web host. Now I am wrestling with the move to drupal 8/composer/docker/ddev. Any suggestions would be much appreciated.
Thank you!
Update 2022-09-14: DDEV has had https support fpr PHPMyAdmin and MailHog for years now, ddev describe will show you the URL.
(Original answer) ddev's PHPMyAdmin connection doesn't support https, just http. You can find the links for both PHPMyAdmin and MailHog using ddev describe; both are http-only, as in your example, http://mysitename.ddev.site:8036. It would be possible to provide https URLs for PHPMyAdmin and MailHog, but nobody has ever asked for them, and there's no security reason to do so.
Note that the key reason for https on the actual project URL is because real projects run behind https and people need to see problems like mixed content during the development phase. But there's no such need for PHPMyAdmin. However, I'm sure if people ever want it, we'll do it, it's not hard to do.
Just as a general add on, after ddev start you can run ddev launch -p in order to open PHPMyAdmin for the current project database in the browser.

TinyTds::Error: Unable to open socket

I've researched this for a few hours now and I can't seem to find a solution.
I have a Rails 2 app that uses the TinyTds gem ( tiny_tds ) to connect to an SQL 2000 server hosted locally in our company.
The app has been connecting to SQL Server almost every day for the past 6 months with no problem.
Suddenly, when trying to connect yesterday, I started getting an error:
TinyTds::Error: Unable to open socket
from /var/lib/gems/1.8/gems/tiny_tds-0.4.5/lib/tiny_tds/client.rb:60:in `connect'
from /var/lib/gems/1.8/gems/tiny_tds-0.4.5/lib/tiny_tds/client.rb:60:in `initialize'
From my research, I've seen some people suggesting that I use
SO_REUSEADDR to allow it to connect and ignore timeout or "usage" restrictions, like this:
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR)
but I cannot figure out how to use that command within the current context.
I tried calling it in commmandline on the server and it won't work, but then again, I'm not sure what it does or if I can even call that from commandline.
I've tried calling
netstat -a
which shows current sockets, but I'm not sure what to do with that information.
I've also seen that
service restart
can restart a socket, but I'm not sure which socket to restart.
Lastly, in my freetds.conf configuration file, I have these settings:
host = 192.168.0.220
port = 1433
tds version = 8.0
I'm not really sure which road to take. I'm comfortable with Rails but this socket stuff is way outside my current understanding. This is also a Rails 2 app ( legacy ) which is key to some core processes our business uses. We can't upgrade to Rails 3 due to SQL server adapter gem for SQL 2000 Server won't work with Rails 3.
Can anyone help ?

pylons on production server fedora 8

I'm interested in learning some python, and thought Pylons would be a good starting point (after spending 2 days trying to get django working -- to no avail).
I have an Amazon EC2 instance with Fedora 8 on it. It is a bare-bones install. I am halfway through my second day of trying to get it to work. I have mod_wsgi installed. I have Apache (though that's a later task to tackle). I have easy_install, paster is working fine; basically all of the pre-requisites mentioned throughout the Pylons docs.
I can't for the life of me get the thing to work. And I can't seem to find a coherent walkthough anywhere that lists all the steps necessary. There is tons of info out there, but it is all scattered. Wsgi this, python that. Google, google, google... "47 million results found for 'socket.error:(lol, 'Yous a goofs')".
So, this is my latest attempt:
apachectl -k stop
cd /home/
paster create -t pylons test
[blah blah.. ok]
cd test
nano development.ini
[hmm, last time I changed the host from 127.0.0.1 to my domain name or url, it threw an error like socket.error: (99, 'Cannot assign requested address')... I'll just leave it]
[open port 5000 on firewall]
paster serve development.ini
[firefox->url:5000]
Firefox can't establish a connection to the server
Doing these steps locally works as expected.
This is just a test to see if I can get it to work at all, which I can't. If I get it to work, then is the task of getting it to work with apache.
My madness is that I'd like to play around a little developing and deploying before diving into a full-fledged project. So far: self, I am dissapoint.
[server:main]
use = egg:Paste#http
host = 0.0.0.0
port = 5000
If you leave it as 127.0.0.1, you'll only be able to surf the site from the ECS instance. By putting in the IP of your ECS instance, or 0.0.0.0 which will listen to all available IPs, it should work.
Unless you have something else listening on port 5000, it should work.
If you are using the hostname, and the hostname resolves to an IP address on your machine it should work. If you use a URL, paster won't be able to resolve the domain name properly. I'm guessing that when you used the domain name, it didn't properly resolve it which generated the error you received. 0.0.0.0 or the IP address in that case should fix it.
I'm not 100% sure whether you used a virtualenv for your pylons installation, but, it is generally a good idea since you don't need to alter the server's environment to install new libraries.
http://pylonshq.com/docs/en/1.0/gettingstarted/#installing

Cannot access http://localhost:3000

I am trying to learn Ruby on Rails, I have followed the instructions from this page to get rails installed on my PC.
I am also trying to follow this webcast to try and learn the language and framework. Everything is working so far, apart from the fact that I cannot access
http://localhost:3000
http://0.0.0.0:3000
http://127.0.0.1:3000, or
http://<actual IP address>:3000
locally. If I try the from another PC on my network then it works great. I have tried in Chrome, Firefox and IE7 but none work.
Has anyone else had this problem?
EDIT: Typical!! It's started working now. I have no idea why, I am typing the exact same address in to the address bar and it now works. But only if I use http://127.0.0.1:3000, localhost doesn't work. I do run IIS ASP.NET/ASP websites on this machine, and they work fine with localhost.
EDIT 2: If I trying pinging localhost it actually says
Reply from ::1: time<1ms
0.0.0.0 yields...
PING: transmit failed, error code 1214
only 127.0.0.1 seems to work. I did have IPv6 turned on, so I've disabled that and will try again tomorrow to see if a reboot helps.
I had this issue as well with Vagrant. The secret is to run
bin/rails server -b 0.0.0.0
What 0.0.0.0 means is to listen to all interfaces, not just on localhost. The alternative is to SSH into the vagrant machine with a SOCKS proxy.
ssh -C -D 8080 vagrant#localhost
Open up your Internet explorer proxy settings and set the SOCKS v5 proxy to port 8080.
In order to access http://localhost:3000 you need to run the local Rails server in a terminal window:
$ rails server
This is described in this section of the Rails Tutorial book.
Note: I am the presenter of the screencasts in question.
Can you telnet to the port? Try:
telnet localhost 3000
That should tell you if the ports unavailable at the TCP level, or whether something's going on at the HTTP level.
Ping might not work if ICMP is disabled, which could be completely unrelated to your issue.
Also, try looking in your hosts file for any redirections:
c:\Windows\System32\drivers\etc\hosts
One way is to do the simple
rails s
Another (more specifically) is
rails start localhost 0.0.0.0
or
rails start 0.0.0.0
another way is
rails s 0.0.0.0
all of these works
I had an epic issue with my System Path (Environmental Variable) not being set properly.
Simple copy paste job, unplugged the 1 week stalled Ruby installation.
Control Panel > System > Advanced tab > Environment Variables > System variables > Path... Edit...
Make sure it contains these paths (among others)...
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
I had your same identical problem. You have simply to run
$ rails server
from inside the folder of your application, not outside...so, if you have your application in
C:\Sites\myapp\blog
and blog is the folder where live your app, the command has to be prompted from here. Launching it from myapp folder won't work.
Are you possibly using a proxy but haven't listed localhost as proxy exception?
Have you tried disabling your firewall? They can cause pesky problems at times.

Resources