P4V not connecting to my DigitalOcean Droplet when setting up a Perforce Server - perforce

I'm trying to set up a Perforce Server using a Droplet from DigitalOcean and connect to it via P4V.
I was following this tutorial https://allarsblog.com/2014/09/25/setup-perforce-digital/ which I was originally led to by an Unreal Engine official YouTube tutorial. When I got to the part where I was supposed to connect via P4V I got the following error:
Connect to server failed; check $P4PORT.
TCP connect to [Droplet IP Address]:1666 failed.
connect: [Droplet IP Address]:1666: WSAECONNREFUSED
I posted on the DigitalOcean forum and they suggested I try to set the P4PORT then verify it with p4 info, but the p4 info command only yields the following:
Perforce client error:
Connect to server failed; check $P4PORT.
TCP connect to devel:1666 failed.
No such host is known.
Since it said no such host is known, I tried using the direct IP Address in the place of devel, and that only returned the same result but it also said connect: [IP Address]:1666: WSAECONNREFUSED.
I can ping the IP Address just fine. Connecting via puTTY (port 22) does not seem to be an issue. I'm using Windows 10, I heard Firewalls could produce this problem but even if I disable my Firewall I get the same errors.
This is my first time doing this, so I may have made a beginners mistake. Any help would be appreciated.

Found my answer in another Forum: Fire up PuTTY and log in as “root” Type “p4d” from the command line (If you don’t see it, it should be located in “/usr/local/bin”)

I had a similar issue.
To clear the " WSAECONREFUSED " error we put Server:[DigitalOcean ServerIP]:1666 and clicked the "New" button for user.
We were prompted with a new error -> WSAETIMEDOUT
to solve this we had to open the 1666 port on the server so we opened the up and down 1666 using these commands.
iptables -I INPUT -p tcp --dport 1666 --syn -j ACCEPT
&
iptables -I INPUT -p udp --dport 1666 -j ACCEPT

Related

django not accessible from another computer

followed instructions here to create my first django web sever. Haven't done any major customization yet, except.
Setup settings.py:
ALLOWED_HOSTS = ['192.168.1.111', 'localhost', '127.0.0.1']
Started django from cmd prompt
python manage.py runserver 0.0.0.0:8080
All the three url link works on this local machine where django is installed:
http://127.0.0.1:8080/, http://localhost:8080/, http://192.168.1.111:8080/
I then went onto Windows Firewall settings to include 8080 as an inbound rule:
My problem is http://192.168.1.111:8080/ does throw an exception when accessed from another computer (in the same network, IP being 192.168.1.77). Error is "Site cannot be reached, took too long to respond".
I am not able to figure out what am I doing wrong. I am certain its a firewall issue. Turned off windows firewall on 192.168.1.111 and it worked from 192.168.1.77. Question still remains - How do I make it work with firewall on on 192.168.1.111.
My python version is 3.9 and django version is 3.2. FYI - I moved to 8080 just for kicks. I had same issue with 8000.
Two things worth noticing:
(1) 192.168.1.111:8080 does throw a "Not secure connection" warning on the primary machine (where django is installed)
(2) netstat seems OK too:
C:\Windows\system32>netstat -ab
Active Connections
.
.
[postgres.exe]
TCP 0.0.0.0:7680 DEVSERVER:0 LISTENING
Can not obtain ownership information
TCP 0.0.0.0:8080 DEVSERVER:0 LISTENING
[python3.9.exe]
TCP 0.0.0.0:49664 DEVSERVER:0 LISTENING
.
.
Can not obtain ownership information
TCP 192.168.1.111:8080 DEVSERVER:50515 ESTABLISHED
[python3.9.exe]
TCP 192.168.1.111:49800 52.226.139.121:https ESTABLISHED
[SearchApp.exe]
TCP 192.168.1.111:50502 52.182.141.63:https TIME_WAIT
TCP 192.168.1.111:50515 DEVSERVER:8080 ESTABLISHED
.
.
C:\Windows\system32>
192.168.1.111:8080 just doesn't seem to work from any computer within the network. Tried from 192.168.1.77 (windows/chrome) and 192.168.1.75(windows/firefox)
OK.. so it was a firewall issue. Apparently, there was another outbound rule with python.exe that was override=True and blocking Public or Private UDP or TCP. I don't even remember. I just deleted all TCP rule relating to python and just kept one (noted in my question above). Its working now

curl: (7) Failed connect to 127.0.0.1:5984; Connection refused [Sometimes]

I have a couchdb database installed in a centos machine in azure. what's strange is that when i try to run 'curl http://127.0.0.1:5984' in terminal it give me expected result sometimes.
{"couchdb":"Welcome","version":"2.3.0","git_sha":"07ea0c7","uuid":"d36b551cb35122db8d088982c4216c9b","features":["pluggable-storage-engines","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
but sometimes i am getting this:
curl: (7) Failed connect to 127.0.0.1:5984; Connection refused
this is having frequently i means sometimes i get result and sometimes i don't.
what am i doing wrong??
Perhaps your virtual machine has iptables rule that deny the traffic go in to port 5984. Try to open with following command:
iptables -I INPUT -p tcp -m tcp --dport 5984 -j ACCEPT
If it still not working, try to turn off firewalld service:
service firewalld stop

Linux, CentOS 6.2: Unable to fetch data from SSL sites (cURL, wget, etc)

Machine: CentOS 6.2
I've had a Perl script which I've been using for ages, which has previously had no problem (and still doesn't) fetching data using LWP from port 80 locations. However, attempting to fetch from https locations, on port 443, always fails.
To simplify the diagnostics, I figured I'd try the same idea from the command line using cURL and wget, but these also fail with https, while they also both work fetching regular http data.
Figuring that the same problem affects all three methods, I'm trying to ascertain exactly what it is that might be wrong, and how to fix it. It's a dedicated server, and I have root access so I can pretty much do what I want to.
I've tried forcing cURL to use ipv4, and a bunch of other flags that looked interesting, but I always end up with the requests failing with "curl: (7) couldn't connect to host".
$ cat debugdump.txt
== Info: About to connect() to www.xyz.com port 443 (#0)
== Info: Trying 194.xxx.xxx.xx... == Info: Connection timed out
== Info: couldn't connect to host
== Info: Closing connection #0
... and similar connection time-outs with wget as well.
If I try fetching the same data with http, and with the -L flag (to follow redirects) then it will similarly fail on the secure portion of it.
So, basically I want to be able to retrieve remote data served via https, but am currently unable to do so. I know I definitely should be able to. I've spent ages trying to resolve this, but so far to no avail. Any useful information to help solve the problem would be much appreciated. Thanks!
Edit
Additional info: I'm not really too familiar with firewalls, but FYI, the entries in /etc/sysconfig/iptables relating to port 443 are:
-A INPUT -p tcp -m tcp -m multiport --dports 80,443 -m state --state NEW -j Cid2676X....
-A OUTPUT -p tcp -m tcp -m multiport --dports 80,443 -m state --state NEW -j Cid2676X...
However, I'm not sure why/if I'd need to open port 443 (if it's not already open) anyway; I mean, I'm fetching from port 443 on another server, not listening for traffic on my 443; surely I'm using some other random port on my own machine to fetch with?
Edit 2
Figured out that if I temporarily disable the iptables then the problem goes away. Of course, I need to have the iptables active, so I need to know what it is about the iptables that is preventing me fetching from secure sites. Suggestions welcome.

ssh: connect to host X.X.X.X port 22: Connection timed out

I'm running a linux based (centos 6.5) VPS. I had no problem since yesterday that everything was fine . I was editing Iptables rules , trying to reject and allow some services and ports but suddenly I got disconnected from VPS and could not connect anymore. I Googled a lot and read many topics regarding this problem but none of them helped me.
I tried:
Reinstalling sshserver and client
Flushing Iptables, saving it and then restarting it
Changing the port for ssh using from /etc/ssh/sshd_config file to sth
else and then allowing this new port from iptables
but I still have the problem.
any help would be appreciated.
As we commented :
Put this rule : iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT

The controller is not available at localhost JBOSS.7.1.1.FINAL

When i run the jboss-cli.sh,
I get this message.
[root bin]# sh jboss-cli.sh
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /] connect localhost
The controller is not available at localhost:9999
[disconnected /] connect
The controller is not available at localhost:9999
[disconnected /] connect localhost:9999
The controller is not available at localhost:9999
[disconnected /]
Also i have another installation of jboss5 GA. I hope that is not interfering.
Although that is totally shut down for now.
Native management interface is :9999 in standalone.sh
Please throw light on this issue.
#
EDITED
#
When i stop my service with "service jboss stop"
i get this message
[root# bin]# *** JBossAS process (7302) received KILL signal ***
grep: /var/run/jboss-as/jboss-as-standalone.pid: No such file or directory
I Dont know how to check whether server is listening on the port 9999 or not.
Few more details
[root bin]# netstat -anp |grep 9999
tcp 0 0 127.0.0.1:9999 0.0.0.0:* LISTEN 7931/java
[root bin]# netstat -anp |grep 8080
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 7931/java
JBoss processs id and the server id acquiring these ports is same.
This question has two issues ,
First, i have provided debuging parameter in the startup script.
If you see 8787 that means you have somewhere provided debuging argument.
Second and the most important one controller not available #localhost or #IPADDRESS .
Please check if you have used port offset, as it increments all the ports by the number with with you have set port offset.
Suppose port offset is 2
Then try to access connect localhost:10001 Port i.e 9999+2
On my production server sometimes it does not works with localhost , but works with IP address.
Then try to access connect IPADDRESS:9999
OR
Then try to access connect 127.0.0.1:9999
Please check in the firewall weather the port 9999 or what ever with port offset, if the port is not open in the firewall it gives error,
I asked this question 6 months back and the above checks has solved
the problem always.
This is probaby because you have changed your binding configuration and jboss does not bind to 127.0.0.1.
In case your jboss instance is not binding to 127.0.0.1, you may use --controller option as follows:
./jboss-cli.sh --controller=YOUR_IP:9999
Use netstat -anp |grep 9999 to find out if port 9999 is in use and by which process id. You could also check the host.xml used by the controller to configure the proper native port.
In the host xml, you should find the default port:
<native-interface security-realm="ManagementRealm">
<socket interface="management" port="${jboss.management.native.port:9999}"/>
./jboss-cli.sh --controller=localhost:9999 --connect
You open the debug-port with jboss-cli.sh. Either you activated in jboss-cli.sh:
# Sample JPDA settings for remote socket debugging
# JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
or you set JAVA_OPTS with such an option in you environment. See
echo $JAVA_OPTS
I guess you did this for two jboss-processes, and you get a port-conflict. See
netstat -nap | grep 8787
I recently faced this issue and the root cause that I found was completely different than it is listed above. It is because for some other project I shifted to JDK 1.8 from 1.7. Boom! and error started coming up...I took hell lot of time figuring out why it is coming up before finally realizing I changed my JDK version.
It might be because JBOSS 7 doesn't work with 1.8 of which I have limited knowledge but yes this might prove useful for some cases.

Resources