Tag: Problems
Git Troubleshooting | Git Troubleshooting Techniques
export GIT_CURL_VERBOSE=1
git push -u origin –all –verbose
git config –list
&
GIT_CURL_VERBOSE=1 git push
&
export GIT_CURL_VERBOSE=1
git push
git config --global http.postBuffer
There are useful to debug, long running Git Commands or Git Commands that seem to be hanged for some reason,
Git has an in-built functionality for us to peek into what is running behind the scenes of a git command, just add GIT_TRACE=1 before ANY git command to get additional info, for example:
Other Flags that we can use are : GIT_CURL_VERBOSE=1, -v or –verbose
[server@user sp-server-branches]$ GIT_TRACE=1 git clone
https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide
https://drupal.org/node/1065850
http://mattberther.com/2013/12/29/pushing-large-git-repos-with-ssh
http://ocaoimh.ie/2008/12/10/how-to-fix-ssh-timeout-problems/
Perforce Slow Sync issues | Perforce Slow Sync Troubleshooting Guide
Perforce Slow Sync issues
Network latency
Sync Performance issues are not obvious with locally connected hosts, as the network latency is low. However, as latency increases, performance worsens.
To correct the issue, follow these steps on the client machines exhibiting the issue:
http://kb.perforce.com/article/1191/slow-sync-on-remote-windows-clients
Network problems:
How do I determine if slow Perforce response time is caused by network problems?
A network issue can be suspected if Perforce commands run quickly on the local machine but run slowly across a network. You can also compare the lapse time against the usage time, for example, if the information is available in the Perforce logs.
Any of the following can cause slow responses:
- Misconfigured domain name server (DNS)
- Misconfigured Windows name server (WINS) or Windows domain
- Slow network response
1. p4 info
A good initial test is to run the p4 info command. If this command does not respond nearly immediately then there is a network related problem.
The p4 info command uses the P4PORT setting to contact the Perforce Server. If the P4PORT setting uses the hostname of the server machine, a DNS lookup is required to fetch the server IP address. If the DNS server is failing or the network is slow, the lookup process takes time. You can use the IP address directly to avoid the DNS lookup.
2. Hostname vs. IP Address
On a client machine, try using the Perforce Server’s IP address in the P4PORT setting. This avoids the DNS lookup used to convert the hostname to an IP address. Here is a P4PORT example which uses the server hostname:
P4PORT=hostname:1666
Using the IP address directly, the P4PORT setting then looks like this:
P4PORT=1.2.3.4:1666
If you do not have the Perforce Server machine’s IP address handy, you can use the ping command to find it. Here is an example of how you would run the ping command:
3. ping hostnam
The output of the ping command lists the IP address for the hostname.
If the p4 info command responds immediately when you use the IP address in the P4PORT setting, you have a misconfigured DNS.
“p4 info” vs. P4Win
The p4 info command is processed by the Perforce Server. As the Perforce Server compiles the output information for the command, it does a reverse DNS lookup on the client’s IP address. A forward DNS lookup might be fast, while a reverse DNS lookup is slow. One way to determine if a reverse DNS lookup is slow is by using P4Win, the Perforce Visual Client. The “Show Connection Info” operation in P4Win does not perform a reverse DNS lookup.
You can compare the response of P4Win’s “Show Connection Info” with the response from the command line p4 info. If a “Show Connection Info” operation is fast while a p4 info is slow, there is a reverse DNS lookup problem on the Perforce Server machine.
4. The “hosts” file
To work around DNS problems, add hostname IP address entries to the hosts file. This task is typically performed by a Systems Administrator; be sure to follow your company’s standard procedures.
Rather than using an IP address for the P4PORT setting, you can add a hostname IP address entry in your hosts file. The host file can be tricky to find. Here are a few places it can be:
Windows Server 2000 (and later):
C:\Winnt\System32\Drivers\etc\hosts
Unix:
/etc/hosts
The following is an example entry for the hosts file:
1.2.3.4 hostname
If you have determined there is a reverse DNS problem, you need to add an entry for your client hostname in the machine’s hosts file where the Perforce Server resides.
5. Wildcards on Windows
In some cases, p4 commands using unquoted file patterns with a combination of depot syntax or client syntax and wildcards can cause delays.
p4 files //depot/*
p4 files //client/*
The delay occurs because the wild card expansion routines for Windows mistakes the depot name or client name for a network system name. You can prevent the delay by putting double quotes around the file pattern:
p4 files “//depot/*”
Network Topology
Most networks use 100 Mbit technology. The maximum theoretical transfer rate of this type of network is 10 Mbytes per second. In most cases slower transfer rates are experienced. If a network is saturated, transfer rates can drop off significantly, maybe as low as 4 Mbytes per second. In cases of network saturation use of network routers or switches can help.
6. Client on a Network Filesystem
It is possible that the p4 executable itself is on a networked file system that is performing very poorly. To check for slow access to the executable, try running:
p4 -v
The p4 -v command simply prints out the version information and does not attempt to access the network. If you get a slow response, network access to the p4 executable itself may be the problem. Try copying or downloading the p4 executable onto a local filesystem.
7. Server on a Network Filesystem
Using a network filesystem for the Perforce Server must be thought through very carefully. Just as in the scenario above with the Perforce client stored on a network filesystem, data to and from the server application must go through the network twice. The Perforce Server also uses file locking on vital data files. Not all network filesystems have efficient locking implementations and some are buggy.
If the network is saturated and the transfer rate is down to about 4 Mbytes per second, the Perforce Server cannot satisfy client requests. Each client request uses part of the network, and the Perforce Server must share that resource in order to access the network filesystem. A cheap hard drive these days will provide a 20 Mbyte per second transfer rate. A good SCSI hard drive can transfer as much as 160 Mbytes per second. If possible, try to avoid a network filesystem related server bottle neck.
Try and play with “p4 ping” by progressively increasing the message count, receive and transmit lengths (one at a time). If you hit the same wall repeatedly, then this could very well be indicative of some throttling taking place somewhere
8. p4 -z tag info
9. Reference.
http://kb.perforce.com/article/40/isolating-network-problems
http://kb.perforce.com/article/1191/slow-sync-on-remote-windows-clients
http://kb.perforce.com/article/1462/slow-sync-performance-on-windows
Perforce Network Troubleshooting Guide | How to Resolve Perforce Network Issues?
1. netstat -a
Check to make sure that the server is running. netstat -a gives a list of all processes listening on network ports. Look for lines that contain “LISTEN” and “1666” (or whatever port you have Perforce running on.) If you do not see such a line, the server is not running.
2. p4 -p 127.0.0.1:1666 info
Verify that the server accepts local connections using the localhost address from the server machine.
If you cannot connect check and make sure P4PORT is set to “1666” for the server. This ensures the server is listening on all interfaces. Setting P4PORT to ‘localhost:1666’ will set it to only allow connections from the local machine.
Note:
Make sure that it is set properly with ‘p4 set -S Perforce P4PORT’ and if it’s not, set it:
p4 set -S Perforce P4PORT=1666
On Linux/Mac/Unix, instead of using ‘p4 set’, you can either set the environment variable $P4PORT or use the ‘-p’ flag to p4d:
p4d -r $P4ROOT -p 1666 [other flags]
3. ping server
Verify network connectivity by pinging the server from the client. If you cannot ping the server, then either ICMP is being blocked or there is a network issue outside of Perforce.
4. telnet <server> <port>
Verify that the server port is reachable by “telnet <server> <port>”. This can give you a descriptive error or confirm a connection. Note that on Windows servers the telnet utility might not be available by default; if it is not available, you can install it from your Programs and Features control panel item. In the sidebar there is a Turn Windows Features On or Off, select it and then check Telnet Client in the list. Click OK.
5. Check port filters/firewalls settings
If you still cannot connect, then verify the TCP/IP properties settings for any port filters/firewalls. If there is a firewall, make sure that incoming connections to port 1666 are permitted, and that all existing outbound connections are permitted (the latter is usually standard). On Windows machines, go to Control Panel -> Windows Firewall, click on Advanced Settings, and then click on Inbound Rules on the sidebar. Make sure p4d is enabled.
6. DNS is resolving the IP address correctly
Check to make sure that DNS is resolving the IP address correctly. Pinging by DNS name is quick verification. “nslookup <hostname>” or “dig <hostname>” can also work.
7. using the IP address
Run the Perforce command using the IP address instead of DNS name. If IP address works, suspect DNS resolution problems or an incorrectly spelled hostname. If IP address does not work, suspect a problem with either host table entries or routing or other network problems. The commands “route” and “arp -a” can be helpful in this regard.
8. If problem is intermittent, suspect hardware, interface configuration, or congestion problems. Tools such as fping and wireshark are useful for uncovering these sorts of errors.
9. tracert <perforce_server
Check for inordinate delays with the traceroute command “tracert <perforce_server>”. On linux, it is called “traceroute”.
Reference…
http://kb.perforce.com/article/905
How to Resolve Apache Ant Copy and Include Issues – Ant Guide
Question: Why Copy in ant is not working if I am putting includes separately?
Ant version: Apache Ant version 1.5.4 compiled on January 8 2005.
Program 1 is not working and Program 2 is working. I guess both programs are correct..
Program1:
<copy todir=”${Temp}/uaw/Uaw_compilescripts”>
<fileset dir=”${SVNCheckout}/scripts/compilescripts” >
<include name=”BuildSh,Compsh,vsamc,buildc.sh,script,compl2,main.sh,makefile,makepl1,script”/>
</fileset>
</copy>
Program2:
<copy todir=”${Temp}/uaw/Uaw_compilescripts”>
<fileset dir=”${SVNCheckout}/scripts/compilescripts” includes=”BuildSh,Compsh,vsamc,buildc.sh,script,compl2,main.sh,makefile,makepl1,script” />
</copy>
ANSWER
Because <include name=”> does not split up the name using ‘,’
You need to have :
<include name=”BuildSh”/>
<include name=”Compsh”/>
<include name=”vsamc”/>
etc..
Copy and Include Issues in Apache Ant | Ant Troubleshooting Guide
Question: Why Copy in ant is not working if I am putting includes separately?
Ant version: Apache Ant version 1.5.4 compiled on January 8 2005.
Program 1 is not working and Program 2 is working. I guess both programs are correct..
Program1:
<copy todir=”${Temp}/uaw/Uaw_compilescripts”>
<fileset dir=”${SVNCheckout}/scripts/compilescripts” >
<include name=”BuildSh,Compsh,vsamc,buildc.sh,script,compl2,main.sh,makefile,makepl1,script”/>
</fileset>
</copy>
Program2:
<copy todir=“${Temp}/uaw/Uaw_compilescripts”>
<fileset dir=“${SVNCheckout}/scripts/compilescripts” includes=“BuildSh,Compsh,vsamc,buildc.sh,script,compl2,main.sh,makefile,makepl1,script” />
</copy>
List of 5 Common Problems in CVS – Troubleshooting Guide
List of 5 Common Problems in CVS – Troubleshooting Guide
- Problem 1:- How will we modify our conflict occurred files ?
While updating if you will get message like bellow, then check,
This will list:
* “A filename” for files that you added
* “M filename” for files that you modified
* “C filename” for files that have conflicts
Conflicts are files that you modified and that were modified on the head revision as well.
@ If u ll get C or conflict then go to that file and remove that lines and duplicate line then it will recover, it because, if more than two developer working on same file and comming on same time then conflict occures,
Files with conflicts will have conflict markers in them. Conflict markers look like:
<<<<<<< filename
your lines
=======
other person’s lines
>>>>>>> current version
- Problem 2:-
If you are using your colleague’s checked out code for some changes, after that If you made any changes in code and then if you will try to check-in the code in CVS from your machine,after that if it will ask your colleague’s password for checking-in. So How will we resolve this one ?
Soln:-
Please fine the CVS dir on your present code directory, then go to CVS dirctory, there, you will find Entries, Root, Repository like files , So now open that Rot file and change that username then your problem will solve, else let me know.
Steps:
cd CVS
vim Root
edit present urername to your username
@cvs:
:wq // save and quit
cd .. // come to parent directory
then do your work ..
it will fine
- Problem 3:-
Is there any way to identify the information of deleted lines in a file through CVS annotate or any other means?
Soln:-
You deleted from CVS or local server ? if u deleted from both server then i have to see, else if u deleted from either local server or CVS server then do “cvs -q up -Pd “
else do “ cvs -q up -Pd -r ” .
- Problem4:-
When I view the “cvs log”, the log report is fetching the file but says
“date: 2008/12/31 06:00:51; author: amareshcd; state: Exp; lines: +0 -0”
But I have added with 130 lines. Why the log is not showing “+130 -0” in its report. ?
Soln:-
Use ,“cvs log -d date1 logfile.log”
- Problem5:-
I have files that went into the Attic. How do I restore them back? Viewing the files revealed that they’re in DEAD State. Someone has ‘cvs remove’d the files. Just restore them with ‘cvs add’. How ?
Soln:-
Step1:-
cvs log
Step2:-
Find til newest non-dead version
step 3:-
cvs update -r
step4:-
mv foo
step 5:-
cvs update -A
step 6:-
mv foo
step 7:-
cvs add
step 8:-
cvs commit -m “bring out your dead”