How does one run Google refine on a different port than 3333? - openrefine

By default, google refine listens on port 3333. How does one start it on a different port?
[There some other process that has taken up 3333 and I cannot change that]
Update: Running this on a Mac (10.8.x)

$ ./refine -p 9999
From the documentation: https://github.com/OpenRefine/OpenRefine/wiki/FAQ

You can specify a different port on the command line.
./refine -p <port>

If you edit /Applications/Google Refine.app/Contents/Info.plist
and replace
<string>-Xms256M -Xmx4096M -Drefine.version=r2407</string>
with
<string>-Xms256M -Xmx4096M -Drefine.version=r2407 -Drefine.port=5555</string>
(or whatever port number you need instead of 5555) this should work.
Adapted from the bottom of the OpenRefine instructions page: https://github.com/OpenRefine/OpenRefine/wiki/Installation-Instructions

Related

How to use 2 localhost for single project

I have a project and I need to use 2 port numbers.
Currently, I am working on localhost:3000 and now I need to use another port number.
Does anyone know how to do this?
Use the following using the port number that you want to use.
rails s -p 3001 -b 0.0.0.1

How do I connect to a localhost site using Selenium Docker image?

I have a node application that I can start with node server.js and access on localhost:9000.
I have a series of e2e tests on selenium that run fine, but I am now looking to use the docker selenium image.
I start the docker image with docker run -d -p 4444:4444 selenium/standalone-chrome
and I changed my e2e test code to look like:
var driver = new webdriver.Builder().
usingServer('http://127.0.0.1:4444/wd/hub').
withCapabilities(webdriver.Capabilities.chrome()).
build();
// driver.manage().window().setSize(1600, 1000);
return driver.get('http://127.0.0.1:9000')
.then(function() {
// driver.executeScript('localStorage.clear();')
return driver
});
But selenium fails to connect to the app at all!
(If I uncomment the setSize line, the program fails right there)
I have the server up an running, and it's indeed accessible at localhost:9000. How can I get my test to properly use dockerized selenium, and properly point to a server on localhost?
If you want your container network behaviour to be like your host machines use docker run --network=host
From the host machine, Docker endpoints aren't accessible at localhost. Did you try using 0.0.0.0 instead of 127.0.0.1?
If you are using mac, you may try to get gateway from netstat inside docker image:
netstat -nr | grep '^0\.0\.0\.0' | awk '{print $2}'
or write ifconfig from terminal, and get the inet address, try with that instead of 127.0.0.1.
What is docker ps command is returning for this container? Is it display like "0.0.0.0:4444->4444/tcp". ?
You can run sudo iptables -L -n and verify under "Chain DOCKER" section below line should come.
ACCEPT tcp -- 0.0.0.0/0 x.x.x.x tcp dpt:4444
Just to make sure I understand - the selenium runs in the docker, and tries to access the node app that runs on the server?
In this case, these are two different "servers", so you need to use real IP addresses (or dns names)
pass the ip of the server as a parameter to the dockerized selenium image the simplest thing would probably be as an environment variable

To know port numbers in openvswitch

I am running a switch test Switch Test on real environment with one openvswitch and real sdn switch.
I created a bridge on openvswitch and added ports (ex. eth0, eht1). But I want to know logical port numbers (like 1, 2) which command gives me correct information. ovs-ofctl show bridge s1 shows
1(eth3): mac address etc
2(eth4):
5(eth5):
and ovs-dpctl show
port 2: eth3
port 3: eth4
port 4: eth5
But results are not showing proper mapping of physical to logical ports. Observer eth5 in both cases for ofctl it gives 5 and for dpctl it gives 4. Is there any way to get correct port id's.
I personally feel both these commands are not giving correct port ids. To isolate this scenario. On Mininet I created 2 openvswitchs and run dpctl command as above it gives me 1,2,3,4,5,6 as port numbers but I am not able to run the test with these port numbers. For both switches I used 1,2,3 test executes successfully. What I mean it, if I give 1,2,3 port numbers for one switch and 4,5,6 for another switch tests doesn't execute. Any help is much appreciated.
you can use to show ofport
sudo ovs-vsctl -- --columns=name,ofport list Interface
You can use this command to specify the ofport of the port you are adding in the bridge:
ovs-vsctl add-port br0 eth0 -- set Interface eth0 ofport=1
i think you can try ovs-vsctl list Interface

Can't Access Webmin on GCE Instance on port 10000

I have a GCE Instance a Debian 1v CPU & 1.7GB. Then I followed the below tutorial and installed webmin on it.
https://www.howtoforge.com/tutorial/how-to-install-webmin-on-ubuntu-15-04/
The installation went successfully. Then I Created a Firewall exception on using the UFW and allowed port 10000.
sudo ufw allow 10000/tcp
But I was not able to access Webmin through the browser.
https://my-gce-instance-ip-address:10000.
Then i created firewall exception using the Google Cloud Console. Again tried the url it didnt work.
Then i thought this might be because of webmin is https mode. So i open the /etc/webmin/miniserv.conf and changed ssl=0. After that i restarted the webmin.
/etc/init.d/webmin restart
Then I tried the the url with Http, still I can't access.
I tried below command and checked the output. Accordingly Webmin is correctly running and listening on port 10000.
netstat -tulpn | grep :10000.
I can't seem to think what I am doing wrong. I have now spent several days on this without and solution in sight. Hope someone can kindly help me?
try this ... it's working for me
iptables -I INPUT 1 -p tcp --dport 10000 -j ACCEPT
service iptables save
/etc/init.d/iptables restart
open both link in Browser
https://your-IP:10000
and
http://your-IP:10000
you need to allow port 10000 from iptables
sudo iptables -A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT
this work for me
i'm using ubuntu 16.04
You don't need to do any firewall configuration in the instance itself. All firewall configuration is done in the Google Cloud console.
The steps I typically follow, as you show to have figured out in your comment, are:
Create the firewall rule, in it opening the particular port you need (10000 in the case of Webmin) for ingress TCP traffic, accepting connections from some IP range (e.g. 0.0.0.0/0), and specifying target tags to be later assigned to instances to which that rule shall apply.
Add one of those tags to the "network tags" section of some particular instance.
This alone should work, opening the port for your instance in the firewall.
I was almost creating another question here on SO when yours was suggested as a possible duplicate. I had followed the steps above on my Webmin machine, and yet the machine refused to connect on port 10000. As I kept writing the question, I figured out my particular problem: in the firewall rule, in the source IP range filter, I set the single meta-address 0.0.0.0 instead of the range 0.0.0.0/0. So, to anyone who has followed the steps above and still can't connect to their webmin installation, do check if your source range filter is correctly set.

Why does running "apachectl -k start" not work, but "sudo apachectl -k start" does?

I'm working on my OS X with the default installation of Apache. For some reason, when I run the "apachectl" command without the "sudo" I get "no listening sockets available / unable to open logs." I'm guessing this is a permissioning thing, so can someone help me out? I'm using Apache 2.2.
Also, side question, where the the Apache script file that is basically the "exe" that linux executes? I'm trying to intergrate my server with Aptana Studio, and it requires the path to the Apache install. I know in Windows, this would be "C:\path\to\httpd.exe", but I don't know how this works in linux.
Is your server listening on port 80? (Usually) only root is allowed to open ports below 1024. Hence the need for sudo.
As you can see, lots of people wonder how to get around this. One possible solution is to perform port-forwarding on your router. (I'm assuming here that you are behind a router...). Then incoming connections on port 80 can be forwarded to e.g. port 8080. Thus only locally does one need to connect to port 8080. (There may be more elegant solutions... somebody else will post them.)
I think generally (on both OS X and Linux - I'm not sure which one you're referring to) the httpd binary is located at: /usr/sbin/httpd
If you need to be able to restart Apache, and you can't do so as root (for whatever reason..), then you may have to settle for a non 'well known' port.
try this
(with php)
$a = shell_exec('sudo -u root -S /etc/init.d/apache2 restart < /home/$user/passfile');
password should stored in passfile