svn:// not working but http:// is - apache

If I try to checkout a repo from a Debian server via svn://example.com/svn/repo I get the following error:
Unable to connect to a repository at URL
'svn://example.com/svn/repo'
No repository found in 'svn://example.com/svn/repo'
I get the same same error when trying to checkout from the server via the shell.
It works if I use "http://example.com/svn/repo" and the repo definitely exists.
svnserve is running as a daemon listening on port 3690 (UDP/TCP).
What am I missing?

I am pretty sure that you are accessing the wrong URL. Note that the path component of the svn:// URL (srv/repo in your case) is interpreted relative to what you pass to the -r argument of svnserve.
Other possible reasons are:
svnserve is not configured properly,
there is a firewall in the way.

I know it has been already answered but for future references, enabling port 3690 in firewall worked for me.
firewall-cmd --zone=public --add-port=3690/tcp --permanent
firewall-cmd --zone=public --add-port=3690/udp --permanent
firewall-cmd --reload

Related

How to open port 3306 on Google Colab with UFW, IPTables

I have installed MySQL in Google Colab and have been successful in accessing from the command line using
!mysql -e " --- any valid database command ---- "
My next task is make this MySQL server visible from a remote client. This requires, making a change in the mysqld.cnf file, which I have done and then open up port 3306 for remote access. Once this happens, then I will use an ngrok tunnel to expose port 3306 on the public internet and use a MySQL client (like HeidiSQL).
I am unable to open the port 3306.
I have installed ufw using
!apt install ufw
But when I try
!ufw status
I get
ERROR: problem running iptables: iptables v1.6.1: can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
However, when I try to install IPTABLES, I get
iptables is already the newest version (1.6.1-2ubuntu2).
iptables set to manually installed.
Finally, I try
!whoami
I get
root
So I am root and iptables is at the latest version and yet ufw is not running. Obviously, I am doing something wrong. Would be grateful if someone can help me, sort this problem
Strangely, enough, it works WITHOUT having to OPEN the ports. So this question has become meaningless!
I just tried accessing the MySQL server running in Google Colab from an external MySQL client ( HeidiSQL) and it worked perfectly well.

Minishift: Could not resolve: *.192.168.64.2.nip.io

I have installed minishift on OSX with brew:
brew cask install minishift-beta
...
$ minishift version
Minishift version: 1.0.0
I have sucessfuly started minishift, and created node-ex example application and exported it:
$ oc get route
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
nodejs-ex nodejs-ex-myproject.192.168.64.2.nip.io nodejs-ex 8080-tcp None
However I can not reach .192.168.64.2.nip.io:
$ curl nodejs-ex-myproject.192.168.64.2.nip.io
curl: (6) Could not resolve host: nodejs-ex-myproject.192.168.64.2.nip.io
$ dig +short nodejs-ex-myproject.192.168.64.2.nip.io
$
All is working with minishift web console and oc command, but I can not reach the application domain.
Thank you #enj. The explanation at http://nip.io is clear about how it works.
I have seen that queries to 8.8.8.8 and to my ISP DNS are resolved to my private IP. But it is my router (my primary DNS) which do respond nip.io
My router run DD-WRT and has enabled
Rebind protection Discard upstream RFC1918 responses
then I add nip.io at
Domain whitelist nip.io
and now I resolve queries:
≻ dig +short test.10.0.0.1.nip.io
10.0.0.1
Is something on your machine or network blocking DNS queries to nip.io?
When playing with Minishift at home, where I am connected to the internet via Deutsche Telekom's VDSL and Speedport-Router, I cannot resolve these xip.io or nip.io addresses.
My workaround is to put 8.8.8.8 into /etc/resolv.conf
I had the same issue on Windows 10. My workaround was to add an entry in C:\Windows\System32\drivers\etc\hosts file. Here is an example
192.160.90.101 nodejs-ex-nodejs-echo.192.160.90.101.nip.io # needed for minishift to work

How to install Phabricator in AWS private VPS with SSH repo access

I'm installing Phabricator on AWS and the usual proxy/web/database setup works for HTTP/S. Now I want to add SSH access to the repos. How can I configure SSH access to the repositories? My usage is small and I'd rather not create complex or obscure setups.
If the elastic IP is associated with the proxy server, the proxy would have to proxy SSH requests to Phabricator. Will a SOCKS proxy work? Is there an easy way (i.e. package) to have a socks proxy connect to the web server whenever either one is rebooted?
Without the SOCKS proxy, it seems the alternative is to put the everything on one server, except the database of course. This means the web server (running Phabricator) will need to be in the public VPS with an elastic IP associated with it. That way HTTPS and SSH can connect to the same hostname.
Are there alternatives? Is my only option to setup everything on one server?
This is accomplished with IP and port forwarding. My initial search for port forwarding was overwhelmed by port forwarding in routers and firewalls.
Add the following to /etc/sysctl.d/50-ip_forward.conf. This works on openSUSE Leap and CentOS.
# Enable IP_FOWARD
net.ipv4.ip_forward = 1
Apply the file with sysctl.
sudo sysctl -p /etc/sysctl.d/50-ip_forward.conf
Then forward the SSH port and test. If you lose access to the server, reboot it from the AWS console. I already changed the admin port to another port before making this change. It's easier for me to add the Port to my ~/.ssh/config than it is for users to specify a different port in their git client.
sudo firewall-cmd --zone external --add-forward-port port=22:proto=tcp:toaddr=1.2.3.4
If everything checks out, make the change permanent.
sudo firewall-cmd --zone external --add-forward-port port=22:proto=tcp:toaddr=1.2.3.4 --permanent
Don't forget to add the necessary ports in the AWS security group. Reboot the server to make sure everything is kept across reboots.
NAT instance
As an added bonus let's turn the proxy into a NAT instance! The external zone already has masquerade enabled but is not used. Assign the eth0 interface to the external zone.
sudo firewall-cmd --zone external --add-interface eth0
In your VPC, add a default route for 0.0.0.0/0 with a target of the instance above to the private subnet. Now test internet connectivity from an internal server in the private subnet. Performance isn't an issue because this route is only for server updates, not production traffic.
ping 8.8.8.8
If everything works, make the change permanent.
sudo firewall-cmd --zone external --add-interface eth0 --permanent
I like to reboot after making network/firewall changes to make sure everything is kept across reboots.

Cant access solr XML url from apache php

I am trying to use apache to access a XML from tomcat url like so:
http://localhost:8081/solr-example/select/?q=blah&version=2.2&start=0&rows=10&indent=on
However, I am getting a permission denied error. I have tried chown, chmod and chcon on both the tomcat and solr directories and it still gives me the error.
I am on centos/linux. Any help with this is much appreciated.
Cheers :)
Ke
Possibles solutions:
Check if the xml is under WEB-INF
directory.
Change the owner of the document to 'apache'.
PS: If you could post some of the log information, the detailed error (denied from what? the server, the SO, it's a 303 forbidden, etc) it will help.
This is due to SELinux enforcing
By default, only port 80 is allowed to do HTTP. You can add non standard ports using the command
semanage port -a -t http_port_t -p tcp 8081
I had the same issue with SOLR, which I solved using the above command.
It is explained here:
http://digitalpbk.blogspot.com/2011/10/solve-failed-to-query-solr-using-errno.html

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