FATAL: The store_rewriter helpers are crashing....

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
User avatar
vandyid
Posts: 13
Joined: 28 Feb 2011, 06:14
Location: semarang

FATAL: The store_rewriter helpers are crashing....

Postby vandyid » 22 Sep 2013, 10:25

Om, sya setting lusca proxy, dah 2 minggu nggak isa2, mohon petunjuknya om.
dah tak coba ganti2 storeurl.pl tetep error, sebelumnya sya instal lusca jalan mulus, karena kmrn hardisk sistemnya rusak trs tak ganti yg baru 500gb, malah luscanya nggak jalan2.
ini om pesen errornya:
2013/09/22 10:18:09| AUFS: /home/proxy2: tmp log /home/proxy2/swap.state.new opened on FD 12
2013/09/22 10:18:09| AUFS: /home/proxy2: tmp log /home/proxy2/swap.state.new opened on FD 12
2013/09/22 10:18:09| Rebuilding storage in /home/proxy2 (DIRTY)
2013/09/22 10:18:09| Rebuilding storage in /home/proxy2 (DIRTY)
2013/09/22 10:18:09| AUFS: /home/proxy3: log '/home/proxy3/swap.state' opened on FD 14
2013/09/22 10:18:09| AUFS: /home/proxy3: log '/home/proxy3/swap.state' opened on FD 14
2013/09/22 10:18:09| ufs_rebuild: /home/proxy2: rebuild type: REBUILD_DISK
2013/09/22 10:18:09| ufs_rebuild: /home/proxy2: beginning rebuild from directory
2013/09/22 10:18:09| AUFS: /home/proxy3: tmp log /home/proxy3/swap.state.new opened on FD 14
2013/09/22 10:18:09| AUFS: /home/proxy3: tmp log /home/proxy3/swap.state.new opened on FD 14
2013/09/22 10:18:09| Rebuilding storage in /home/proxy3 (DIRTY)
2013/09/22 10:18:09| Rebuilding storage in /home/proxy3 (DIRTY)
2013/09/22 10:18:09| Using Least Load store dir selection
2013/09/22 10:18:09| Using Least Load store dir selection
2013/09/22 10:18:09| chdir: /cache/: (2) No such file or directory
2013/09/22 10:18:09| chdir: /cache/: (2) No such file or directory
2013/09/22 10:18:09| Current Directory is /usr/local/squid/sbin
2013/09/22 10:18:09| Current Directory is /usr/local/squid/sbin
2013/09/22 10:18:09| Loaded Icons.
2013/09/22 10:18:09| Loaded Icons.
2013/09/22 10:18:09| Accepting transparently proxied HTTP connections at 0.0.0.0, port 3128, FD 16.
2013/09/22 10:18:09| Accepting transparently proxied HTTP connections at 0.0.0.0, port 3128, FD 16.
2013/09/22 10:18:09| WCCP Disabled.
2013/09/22 10:18:09| WCCP Disabled.
2013/09/22 10:18:09| ufs_rebuild: /home/proxy3: rebuild type: REBUILD_DISK
2013/09/22 10:18:09| ufs_rebuild: /home/proxy3: beginning rebuild from directory
2013/09/22 10:18:09| Ready to serve requests.
2013/09/22 10:18:09| Ready to serve requests.
2013/09/22 10:18:09| WARNING: store_rewriter #1 (FD 6) exited
2013/09/22 10:18:09| WARNING: store_rewriter #1 (FD 6) exited
2013/09/22 10:18:09| Too few store_rewriter processes are running
2013/09/22 10:18:09| Too few store_rewriter processes are running
FATAL: The store_rewriter helpers are crashing too rapidly, need help!

Squid Cache (Version LUSCA_HEAD-r14809): Terminated abnormally.
CPU Usage: 0.024 seconds = 0.016 user + 0.008 sys
Maximum Resident Size: 20304 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
total space in arena: 2388 KB
Ordinary blocks: 2343 KB 5 blks
Small blocks: 0 KB 0 blks
Holding blocks: 1764 KB 2 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 44 KB
Total in use: 4107 KB 99%
Total free: 44 KB 1%
WARNING: Cannot write log file: none
none: Permission denied
messages will be sent to 'stderr'.
2013/09/22 10:18:12| Starting Squid Cache version LUSCA_HEAD-r14809 for i686-redhat-linux-gnu...
2013/09/22 10:18:12| Starting Squid Cache version LUSCA_HEAD-r14809 for i686-redhat-linux-gnu...
2013/09/22 10:18:12| Process ID 11470
2013/09/22 10:18:12| Process ID 11470
2013/09/22 10:18:12| NOTICE: Could not increase the number of filedescriptors
2013/09/22 10:18:12| NOTICE: Could not increase the number of filedescriptors
2013/09/22 10:18:12| With 1024 file descriptors available
2013/09/22 10:18:12| With 1024 file descriptors available
2013/09/22 10:18:12| Using epoll for the IO loop
2013/09/22 10:18:12| Using epoll for the IO loop
2013/09/22 10:18:12| Performing DNS Tests...
2013/09/22 10:18:12| Performing DNS Tests...
2013/09/22 10:18:12| Successful DNS name lookup tests...
2013/09/22 10:18:12| Successful DNS name lookup tests...
2013/09/22 10:18:12| Adding nameserver 180.131.144.144 from squid.conf
2013/09/22 10:18:12| Adding nameserver 180.131.144.144 from squid.conf
2013/09/22 10:18:12| DNS Socket created at 0.0.0.0, port 47025, FD 5
2013/09/22 10:18:12| Adding nameserver 180.131.145.145 from squid.conf
2013/09/22 10:18:12| Adding nameserver 180.131.145.145 from squid.conf
2013/09/22 10:18:12| helperOpenServers: Starting 1 'storeurl.pl' processes
2013/09/22 10:18:12| helperOpenServers: Starting 1 'storeurl.pl' processes
/usr/local/squid/etc/storeurl.pl: 11: /usr/local/squid/etc/storeurl.pl: $: not found
/usr/local/squid/etc/storeurl.pl: 11: /usr/local/squid/etc/storeurl.pl: =1: not found
2013/09/22 10:18:12| logfileOpen: opening log /var/log/squid/access.log
2013/09/22 10:18:12| logfileOpen: opening log /var/log/squid/access.log
/usr/local/squid/etc/storeurl.pl: 12: /usr/local/squid/etc/storeurl.pl: Syntax error: ")" unexpected
2013/09/22 10:18:12| Swap maxSize 46080000 + 6144 KB, estimated 3545088 objects
2013/09/22 10:18:12| Swap maxSize 46080000 + 6144 KB, estimated 3545088 objects
2013/09/22 10:18:12| Target number of buckets: 177254
2013/09/22 10:18:12| Target number of buckets: 177254
2013/09/22 10:18:12| Using 262144 Store buckets
2013/09/22 10:18:12| Using 262144 Store buckets
2013/09/22 10:18:12| Max Mem size: 6144 KB
2013/09/22 10:18:12| Max Mem size: 6144 KB
2013/09/22 10:18:12| Max Swap size: 46080000 KB
2013/09/22 10:18:12| Max Swap size: 46080000 KB
2013/09/22 10:18:12| Store logging disabled
2013/09/22 10:18:12| Store logging disabled
2013/09/22 10:18:12| AUFS: /home/proxy1: log '/home/proxy1/swap.state' opened on FD 10
2013/09/22 10:18:12| AUFS: /home/proxy1: log '/home/proxy1/swap.state' opened on FD 10
2013/09/22 10:18:12| ufs_rebuild: /home/proxy1: rebuild type: REBUILD_DISK
2013/09/22 10:18:12| ufs_rebuild: /home/proxy1: beginning rebuild from directory
2013/09/22 10:18:12| AUFS: /home/proxy1: tmp log /home/proxy1/swap.state.new opened on FD 10
2013/09/22 10:18:12| AUFS: /home/proxy1: tmp log /home/proxy1/swap.state.new opened on FD 10
2013/09/22 10:18:12| Rebuilding storage in /home/proxy1 (DIRTY)
2013/09/22 10:18:12| Rebuilding storage in /home/proxy1 (DIRTY)
2013/09/22 10:18:12| AUFS: /home/proxy2: log '/home/proxy2/swap.state' opened on FD 12
2013/09/22 10:18:12| AUFS: /home/proxy2: log '/home/proxy2/swap.state' opened on FD 12
2013/09/22 10:18:12| AUFS: /home/proxy2: tmp log /home/proxy2/swap.state.new opened on FD 12
2013/09/22 10:18:12| AUFS: /home/proxy2: tmp log /home/proxy2/swap.state.new opened on FD 12
2013/09/22 10:18:12| Rebuilding storage in /home/proxy2 (DIRTY)
2013/09/22 10:18:12| Rebuilding storage in /home/proxy2 (DIRTY)
2013/09/22 10:18:12| AUFS: /home/proxy3: log '/home/proxy3/swap.state' opened on FD 14
2013/09/22 10:18:12| AUFS: /home/proxy3: log '/home/proxy3/swap.state' opened on FD 14
2013/09/22 10:18:12| AUFS: /home/proxy3: tmp log /home/proxy3/swap.state.new opened on FD 14
2013/09/22 10:18:12| AUFS: /home/proxy3: tmp log /home/proxy3/swap.state.new opened on FD 14
2013/09/22 10:18:12| Rebuilding storage in /home/proxy3 (DIRTY)
2013/09/22 10:18:12| Rebuilding storage in /home/proxy3 (DIRTY)
2013/09/22 10:18:12| Using Least Load store dir selection
2013/09/22 10:18:12| Using Least Load store dir selection
2013/09/22 10:18:12| chdir: /cache/: (2) No such file or directory
2013/09/22 10:18:12| chdir: /cache/: (2) No such file or directory
2013/09/22 10:18:12| Current Directory is /usr/local/squid/sbin
2013/09/22 10:18:12| Current Directory is /usr/local/squid/sbin
2013/09/22 10:18:12| ufs_rebuild: /home/proxy2: rebuild type: REBUILD_DISK
2013/09/22 10:18:12| ufs_rebuild: /home/proxy2: beginning rebuild from directory
2013/09/22 10:18:12| Loaded Icons.
2013/09/22 10:18:12| Loaded Icons.
2013/09/22 10:18:12| Accepting transparently proxied HTTP connections at 0.0.0.0, port 3128, FD 16.
2013/09/22 10:18:12| ufs_rebuild: /home/proxy3: rebuild type: REBUILD_DISK
2013/09/22 10:18:12| Accepting transparently proxied HTTP connections at 0.0.0.0, port 3128, FD 16.
2013/09/22 10:18:12| ufs_rebuild: /home/proxy3: beginning rebuild from directory
2013/09/22 10:18:12| WCCP Disabled.
2013/09/22 10:18:12| WCCP Disabled.
2013/09/22 10:18:12| Ready to serve requests.
2013/09/22 10:18:12| Ready to serve requests.
2013/09/22 10:18:12| WARNING: store_rewriter #1 (FD 6) exited
2013/09/22 10:18:12| WARNING: store_rewriter #1 (FD 6) exited
2013/09/22 10:18:12| Too few store_rewriter processes are running
2013/09/22 10:18:12| Too few store_rewriter processes are running
FATAL: The store_rewriter helpers are crashing too rapidly, need help!

Squid Cache (Version LUSCA_HEAD-r14809): Terminated abnormally.
CPU Usage: 0.032 seconds = 0.016 user + 0.016 sys
Maximum Resident Size: 20304 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
total space in arena: 2388 KB
Ordinary blocks: 2343 KB 5 blks
Small blocks: 0 KB 0 blks
Holding blocks: 1764 KB 2 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 44 KB
Total in use: 4107 KB 99%
Total free: 44 KB 1%
WARNING: Cannot write log file: none
none: Permission denied
messages will be sent to 'stderr'.
2013/09/22 10:18:15| Starting Squid Cache version LUSCA_HEAD-r14809 for i686-redhat-linux-gnu...
2013/09/22 10:18:15| Starting Squid Cache version LUSCA_HEAD-r14809 for i686-redhat-linux-gnu...
2013/09/22 10:18:15| Process ID 11511
2013/09/22 10:18:15| Process ID 11511
2013/09/22 10:18:15| NOTICE: Could not increase the number of filedescriptors
2013/09/22 10:18:15| NOTICE: Could not increase the number of filedescriptors
2013/09/22 10:18:15| With 1024 file descriptors available
2013/09/22 10:18:15| With 1024 file descriptors available
2013/09/22 10:18:15| Using epoll for the IO loop
2013/09/22 10:18:15| Using epoll for the IO loop
2013/09/22 10:18:15| Performing DNS Tests...
2013/09/22 10:18:15| Performing DNS Tests...
2013/09/22 10:18:15| Successful DNS name lookup tests...
2013/09/22 10:18:15| Successful DNS name lookup tests...
2013/09/22 10:18:15| Adding nameserver 180.131.144.144 from squid.conf
2013/09/22 10:18:15| Adding nameserver 180.131.144.144 from squid.conf
2013/09/22 10:18:15| DNS Socket created at 0.0.0.0, port 47190, FD 5
2013/09/22 10:18:15| Adding nameserver 180.131.145.145 from squid.conf
2013/09/22 10:18:15| Adding nameserver 180.131.145.145 from squid.conf
2013/09/22 10:18:15| helperOpenServers: Starting 1 'storeurl.pl' processes
2013/09/22 10:18:15| helperOpenServers: Starting 1 'storeurl.pl' processes
2013/09/22 10:18:15| logfileOpen: opening log /var/log/squid/access.log
2013/09/22 10:18:15| logfileOpen: opening log /var/log/squid/access.log
/usr/local/squid/etc/storeurl.pl: 11: /usr/local/squid/etc/storeurl.pl: $: not found
/usr/local/squid/etc/storeurl.pl: 11: /usr/local/squid/etc/storeurl.pl: =1: not found
/usr/local/squid/etc/storeurl.pl: 12: /usr/local/squid/etc/storeurl.pl: Syntax error: ")" unexpected
2013/09/22 10:18:15| Swap maxSize 46080000 + 6144 KB, estimated 3545088 objects
2013/09/22 10:18:15| Swap maxSize 46080000 + 6144 KB, estimated 3545088 objects
2013/09/22 10:18:15| Target number of buckets: 177254
2013/09/22 10:18:15| Target number of buckets: 177254
2013/09/22 10:18:15| Using 262144 Store buckets
2013/09/22 10:18:15| Using 262144 Store buckets
2013/09/22 10:18:15| Max Mem size: 6144 KB
2013/09/22 10:18:15| Max Mem size: 6144 KB
2013/09/22 10:18:15| Max Swap size: 46080000 KB
2013/09/22 10:18:15| Max Swap size: 46080000 KB
2013/09/22 10:18:15| Store logging disabled
2013/09/22 10:18:15| Store logging disabled
2013/09/22 10:18:15| AUFS: /home/proxy1: log '/home/proxy1/swap.state' opened on FD 10
2013/09/22 10:18:15| AUFS: /home/proxy1: log '/home/proxy1/swap.state' opened on FD 10
2013/09/22 10:18:15| ufs_rebuild: /home/proxy1: rebuild type: REBUILD_DISK
2013/09/22 10:18:15| ufs_rebuild: /home/proxy1: beginning rebuild from directory
2013/09/22 10:18:15| AUFS: /home/proxy1: tmp log /home/proxy1/swap.state.new opened on FD 10
2013/09/22 10:18:15| AUFS: /home/proxy1: tmp log /home/proxy1/swap.state.new opened on FD 10
2013/09/22 10:18:15| Rebuilding storage in /home/proxy1 (DIRTY)
2013/09/22 10:18:15| Rebuilding storage in /home/proxy1 (DIRTY)
2013/09/22 10:18:15| AUFS: /home/proxy2: log '/home/proxy2/swap.state' opened on FD 12
2013/09/22 10:18:15| AUFS: /home/proxy2: log '/home/proxy2/swap.state' opened on FD 12
2013/09/22 10:18:15| AUFS: /home/proxy2: tmp log /home/proxy2/swap.state.new opened on FD 12
2013/09/22 10:18:15| AUFS: /home/proxy2: tmp log /home/proxy2/swap.state.new opened on FD 12
2013/09/22 10:18:15| Rebuilding storage in /home/proxy2 (DIRTY)
2013/09/22 10:18:15| Rebuilding storage in /home/proxy2 (DIRTY)
2013/09/22 10:18:15| AUFS: /home/proxy3: log '/home/proxy3/swap.state' opened on FD 14
2013/09/22 10:18:15| AUFS: /home/proxy3: log '/home/proxy3/swap.state' opened on FD 14
2013/09/22 10:18:15| ufs_rebuild: /home/proxy2: rebuild type: REBUILD_DISK
2013/09/22 10:18:15| ufs_rebuild: /home/proxy2: beginning rebuild from directory
2013/09/22 10:18:15| AUFS: /home/proxy3: tmp log /home/proxy3/swap.state.new opened on FD 14
2013/09/22 10:18:15| AUFS: /home/proxy3: tmp log /home/proxy3/swap.state.new opened on FD 14
2013/09/22 10:18:15| Rebuilding storage in /home/proxy3 (DIRTY)
2013/09/22 10:18:15| Rebuilding storage in /home/proxy3 (DIRTY)
2013/09/22 10:18:15| Using Least Load store dir selection
2013/09/22 10:18:15| Using Least Load store dir selection
2013/09/22 10:18:15| chdir: /cache/: (2) No such file or directory
2013/09/22 10:18:15| chdir: /cache/: (2) No such file or directory
2013/09/22 10:18:15| Current Directory is /usr/local/squid/sbin
2013/09/22 10:18:15| Current Directory is /usr/local/squid/sbin
2013/09/22 10:18:15| ufs_rebuild: /home/proxy3: rebuild type: REBUILD_DISK
2013/09/22 10:18:15| ufs_rebuild: /home/proxy3: beginning rebuild from directory
2013/09/22 10:18:15| Loaded Icons.
2013/09/22 10:18:15| Loaded Icons.
2013/09/22 10:18:15| Accepting transparently proxied HTTP connections at 0.0.0.0, port 3128, FD 16.
2013/09/22 10:18:15| Accepting transparently proxied HTTP connections at 0.0.0.0, port 3128, FD 16.
2013/09/22 10:18:15| WCCP Disabled.
2013/09/22 10:18:15| WCCP Disabled.
2013/09/22 10:18:15| Ready to serve requests.
2013/09/22 10:18:15| Ready to serve requests.
2013/09/22 10:18:15| WARNING: store_rewriter #1 (FD 6) exited
2013/09/22 10:18:15| WARNING: store_rewriter #1 (FD 6) exited
2013/09/22 10:18:15| Too few store_rewriter processes are running
2013/09/22 10:18:15| Too few store_rewriter processes are running
FATAL: The store_rewriter helpers are crashing too rapidly, need help!

Squid Cache (Version LUSCA_HEAD-r14809): Terminated abnormally.
CPU Usage: 0.032 seconds = 0.020 user + 0.012 sys
Maximum Resident Size: 20304 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
total space in arena: 2388 KB
Ordinary blocks: 2343 KB 5 blks
Small blocks: 0 KB 0 blks
Holding blocks: 1764 KB 2 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 44 KB
Total in use: 4107 KB 99%
Total free: 44 KB 1%


ini storeurl.pl-nya:
#sTOREurl
#!/usr/bin/perl
# This script is NOT written or modified by me, I only copy pasted it from the internet.
# It was First originally Writen by chudy_fernandez@yahoo.com
# & Have been modified by various persons over the net to fix/add various functions.
# Like For Example modified by member of comstuff.net to satisfy common and dynamic content.
# th30nly @comstuff.net a.k.a invisible_theater , and possibly other people too.
# For more info, http://wiki.squid-cache.org/ConfigExamp ... nt/YouTube
# Syed Jahanzaib / aacable @ hotmail . com

$|=1;
while () {
@X = split;
# $X[1] =~ s/&sig=.*//;
$x = $X[0] . " ";
$_ = $X[1];
$u = $X[1];

if ($X[1] =~ /(youtube|google).*videoplayback\?/){
@itag = m/[&?](itag=[0-9]*)/;
@id = m/[&?](id=[^\&]*)/;
@range = m/[&?](range=[^\&\s]*)/;
@begin = m/[&?](begin=[^\&\s]*)/;
@redirect = m/[&?](redirect_counter=[^\&]*)/;
print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/@itag&@id&@range@begin@redirect\n";

#speedtest
}elsif (m/^http:\/\/(.*)\/speedtest\/(.*\.(jpg|txt))\?(.*)/) {
print $x . "http://www.speedtest.net.SQUIDINTERNAL/speedtest/" . $2 . "\n";

#mediafire
}elsif (m/^http:\/\/199\.91\.15\d\.\d*\/\w{12}\/(\w*)\/(.*)/) {
print $x . "http://www.mediafire.com.SQUIDINTERNAL/" . $1 ."/" . $2 . "\n";

#fileserve
}elsif (m/^http:\/\/fs\w*\.fileserve\.com\/file\/(\w*)\/[\w-]*\.\/(.*)/) {
print $x . "http://www.fileserve.com.SQUIDINTERNAL/" . $1 . "./" . $2 . "\n";

#filesonic
}elsif (m/^http:\/\/s[0-9]*\.filesonic\.com\/download\/([0-9]*)\/(.*)/) {
print $x . "http://www.filesonic.com.SQUIDINTERNAL/" . $1 . "\n";

#4shared
}elsif (m/^http:\/\/[a-zA-Z]{2}\d*\.4shared\.com(:8080|)\/download\/(.*)\/(.*\..*)\?.*/) {
print $x . "http://www.4shared.com.SQUIDINTERNAL/download/$2\/$3\n";

#4shared preview
}elsif (m/^http:\/\/[a-zA-Z]{2}\d*\.4shared\.com(:8080|)\/img\/(\d*)\/\w*\/dlink__2Fdownload_2F(\w*)_3Ftsid_3D[\w-]*\/preview\.mp3\?sId=\w*/) {
print $x . "http://www.4shared.com.SQUIDINTERNAL/$2\n";

#photos-X.ak.fbcdn.net where X a-z
}elsif (m/^http:\/\/photos-[a-z](\.ak\.fbcdn\.net)(\/.*\/)(.*\.jpg)/) {
print $x . "http://photos" . $1 . "/" . $2 . $3 . "\n";

#YX.sphotos.ak.fbcdn.net where X 1-9, Y a-z
} elsif (m/^http:\/\/[a-z][0-9]\.sphotos\.ak\.fbcdn\.net\/(.*)\/(.*)/) {
print $x . "http://photos.ak.fbcdn.net/" . $1 ."/". $2 . "\n";

#maps.google.com
} elsif (m/^http:\/\/(cbk|mt|khm|mlt|tbn)[0-9]?(.google\.co(m|\.uk|\.id).*)/) {
print $x . "http://" . $1 . $2 . "\n";

# compatibility for old cached get_video?video_id
} elsif (m/^http:\/\/([0-9.]{4}|.*\.youtube\.com|.*\.googlevideo\.com|.*\.video\.google\.com).*?(videoplayback\?id=.*?|video_id=.*?)\&(.*?)/) {
$z = $2; $z =~ s/video_id=/get_video?video_id=/;
print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" . $z . "\n";

} elsif (m/^http:\/\/www\.google-analytics\.com\/__utm\.gif\?.*/) {
print $x . "http://www.google-analytics.com/__utm.gif\n";

#Cache High Latency Ads
} elsif (m/^http:\/\/([a-z0-9.]*)(\.doubleclick\.net|\.quantserve\.com|\.googlesyndication\.com|yieldmanager|cpxinteractive)(.*)/) {
$y = $3;$z = $2;
for ($y) {
s/pixel;.*/pixel/;
s/activity;.*/activity/;
s/(imgad[^&]*).*/\1/;
s/;ord=[?0-9]*//;
s/;&timestamp=[0-9]*//;
s/[&?]correlator=[0-9]*//;
s/&cookie=[^&]*//;
s/&ga_hid=[^&]*//;
s/&ga_vid=[^&]*//;
s/&ga_sid=[^&]*//;
# s/&prev_slotnames=[^&]*//
# s/&u_his=[^&]*//;
s/&dt=[^&]*//;
s/&dtd=[^&]*//;
s/&lmt=[^&]*//;
s/(&alternate_ad_url=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/;
s/(&url=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/;
s/(&ref=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/;
s/(&cookie=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/;
s/[;&?]ord=[?0-9]*//;
s/[;&]mpvid=[^&;]*//;
s/&xpc=[^&]*//;
# yieldmanager
s/\?clickTag=[^&]*//;
s/&u=[^&]*//;
s/&slotname=[^&]*//;
s/&page_slots=[^&]*//;
}
print $x . "http://" . $1 . $2 . $y . "\n";

#cache high latency ads
} elsif (m/^http:\/\/(.*?)\/(ads)\?(.*?)/) {
print $x . "http://" . $1 . "/" . $2 . "\n";

# spicific servers starts here....
} elsif (m/^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*?)/) {
print $x . "http://" . $1 . "\n";

#cdn, varialble 1st path
} elsif (($u =~ /filehippo/) && (m/^http:\/\/(.*?)\.(.*?)\/(.*?)\/(.*)\.([a-z0-9]{3,4})(\?.*)?/)) {
@y = ($1,$2,$4,$5);
$y[0] =~ s/[a-z0-9]{2,5}/cdn./;
print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";

#rapidshare
} elsif (($u =~ /rapidshare/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?)([a-z]*\.[^\/]{3}\/[a-z]*\/[0-9]*)\/(.*?)\/([^\/\?\&]{4,})$/)) {
print $x . "http://cdn." . $3 . "/SQUIDINTERNAL/" . $5 . "\n";

} elsif (($u =~ /maxporn/) && (m/^http:\/\/([^\/]*?)\/(.*?)\/([^\/]*?)(\?.*)?$/)) {
print $x . "http://" . $1 . "/SQUIDINTERNAL/" . $3 . "\n";

#like porn hub variables url and center part of the path, filename etention 3 or 4 with or without ? at the end
} elsif (($u =~ /tube8|pornhub|xvideos/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?(\.[a-z]*)?)\.([a-z]*[0-9]?\.[^\/]{3}\/[a-z]*)(.*?)((\/[a-z]*)?(\/[^\/]*){4}\.[^\/\?]{3,4})(\?.*)?$/)) {
print $x . "http://cdn." . $4 . $6 . "\n";
#...spicific servers end here.

#photos-X.ak.fbcdn.net where X a-z
} elsif (m/^http:\/\/photos-[a-z].ak.fbcdn.net\/(.*)/) {
print $x . "http://photos.ak.fbcdn.net/" . $1 . "\n";

#for yimg.com video
} elsif (m/^http:\/\/(.*yimg.com)\/\/(.*)\/([^\/\?\&]*\/[^\/\?\&]*\.[^\/\?\&]{3,4})(\?.*)?$/) {
print $x . "http://cdn.yimg.com//" . $3 . "\n";

#for yimg.com doubled
} elsif (m/^http:\/\/(.*?)\.yimg\.com\/(.*?)\.yimg\.com\/(.*?)\?(.*)/) {
print $x . "http://cdn.yimg.com/" . $3 . "\n";

#for yimg.com with &sig=
} elsif (m/^http:\/\/(.*?)\.yimg\.com\/(.*)/) {
@y = ($1,$2);
$y[0] =~ s/[a-z]+[0-9]+/cdn/;
$y[1] =~ s/&sig=.*//;
print $x . "http://" . $y[0] . ".yimg.com/" . $y[1] . "\n";

#youjizz. We use only domain and filename
} elsif (($u =~ /media[0-9]{2,5}\.youjizz/) && (m/^http:\/\/(.*)(\.[^\.\-]*?\..*?)\/(.*)\/([^\/\?\&]*)\.([^\/\?\&]{3,4})((\?|\%).*)?$/)) {
@y = ($1,$2,$4,$5);
$y[0] =~ s/(([a-zA-A]+[0-9]+(-[a-zA-Z])?$)|(.*cdn.*)|(.*cache.*))/cdn/;
print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";

#general purpose for cdn servers. add above your specific servers.
} elsif (m/^http:\/\/([0-9.]*?)\/\/(.*?)\.(.*)\?(.*?)/) {
print $x . "http://squid-cdn-url//" . $2 . "." . $3 . "\n";

#generic http://variable.domain.com/path/filename. "ext" or "exte" with or withour "? or %"
} elsif (m/^http:\/\/(.*)(\.[^\.\-]*?\..*?)\/(.*)\.([^\/\?\&]{2,4})((\?|\%).*)?$/) {
@y = ($1,$2,$3,$4);
$y[0] =~ s/(([a-zA-A]+[0-9]+(-[a-zA-Z])?$)|(.*cdn.*)|(.*cache.*))/cdn/;
print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";

# generic http://variable.domain.com/...
} elsif (m/^http:\/\/(([A-Za-z]+[0-9-]+)*?|.*cdn.*|.*cache.*)\.(.*?)\.(.*?)\/(.*)$/) {
print $x . "http://cdn." . $3 . "." . $4 . "/" . $5 . "\n";

# spicific extention that ends with ?
} elsif (m/^http:\/\/(.*?)\/(.*?)\.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|wmv|3gp|mp(4|3)|exe|msi|zip|on2|mar|rar|cab|amf|swf)(.*)/) {
print $x . "http://" . $1 . "/" . $2 . "." . $3 . "\n";

# all that ends with ;
} elsif (m/^http:\/\/(.*?)\/(.*?)\;(.*)/) {
print $x . "http://" . $1 . "/" . $2 . "\n";

} else {
print $x . $_ . "sucks\n";
}
}
User avatar
vandyid
Posts: 13
Joined: 28 Feb 2011, 06:14
Location: semarang

Re: FATAL: The store_rewriter helpers are crashing....

Postby vandyid » 22 Sep 2013, 11:10

maap om, sudah sya gonta ganti storeurl pake :
#!/usr/bin/perl
# This script is NOT written or modified by me, I only copy pasted it from the internet.
# It was First originally Writen by chudy_fernandez@yahoo.com
# & Have been modified by various persons over the net to fix/add various functions.
# Like For Example modified by member of comstuff.net to satisfy common and dynamic content.
# th30nly @comstuff.net a.k.a invisible_theater , and possibly other people too.
# For more info, http://wiki.squid-cache.org/ConfigExamp ... nt/YouTube
# Syed Jahanzaib / aacable@hotmail.com


$|=1;
while () {
@X = split;
# $X[1] =~ s/&sig=.*//;
$x = $X[0] . " ";
$_ = $X[1];
$u = $X[1];

if ($X[1] =~ /(youtube|google).*videoplayback\?/){
@itag = m/[&?](itag=[0-9]*)/;
@id = m/[&?](id=[^\&]*)/;
@range = m/[&?](range=[^\&\s]*)/;
@begin = m/[&?](begin=[^\&\s]*)/;
@redirect = m/[&?](redirect_counter=[^\&]*)/;
print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/@itag&@id&@range@begin@redirect\n";

#speedtest
}elsif (m/^http:\/\/(.*)\/speedtest\/(.*\.(jpg|txt))\?(.*)/) {
print $x . "http://www.speedtest.net.SQUIDINTERNAL/speedtest/" . $2 . "\n";

#mediafire
}elsif (m/^http:\/\/199\.91\.15\d\.\d*\/\w{12}\/(\w*)\/(.*)/) {
print $x . "http://www.mediafire.com.SQUIDINTERNAL/" . $1 ."/" . $2 . "\n";

#fileserve
}elsif (m/^http:\/\/fs\w*\.fileserve\.com\/file\/(\w*)\/[\w-]*\.\/(.*)/) {
print $x . "http://www.fileserve.com.SQUIDINTERNAL/" . $1 . "./" . $2 . "\n";

#filesonic
}elsif (m/^http:\/\/s[0-9]*\.filesonic\.com\/download\/([0-9]*)\/(.*)/) {
print $x . "http://www.filesonic.com.SQUIDINTERNAL/" . $1 . "\n";

#4shared
}elsif (m/^http:\/\/[a-zA-Z]{2}\d*\.4shared\.com(:8080|)\/download\/(.*)\/(.*\..*)\?.*/) {
print $x . "http://www.4shared.com.SQUIDINTERNAL/download/$2\/$3\n";

#4shared preview
}elsif (m/^http:\/\/[a-zA-Z]{2}\d*\.4shared\.com(:8080|)\/img\/(\d*)\/\w*\/dlink__2Fdownload_2F(\w*)_3Ftsid_3D[\w-]*\/preview\.mp3\?sId=\w*/) {
print $x . "http://www.4shared.com.SQUIDINTERNAL/$2\n";

#photos-X.ak.fbcdn.net where X a-z
}elsif (m/^http:\/\/photos-[a-z](\.ak\.fbcdn\.net)(\/.*\/)(.*\.jpg)/) {
print $x . "http://photos" . $1 . "/" . $2 . $3 . "\n";

#YX.sphotos.ak.fbcdn.net where X 1-9, Y a-z
} elsif (m/^http:\/\/[a-z][0-9]\.sphotos\.ak\.fbcdn\.net\/(.*)\/(.*)/) {
print $x . "http://photos.ak.fbcdn.net/" . $1 ."/". $2 . "\n";

#maps.google.com
} elsif (m/^http:\/\/(cbk|mt|khm|mlt|tbn)[0-9]?(.google\.co(m|\.uk|\.id).*)/) {
print $x . "http://" . $1 . $2 . "\n";

# compatibility for old cached get_video?video_id
} elsif (m/^http:\/\/([0-9.]{4}|.*\.youtube\.com|.*\.googlevideo\.com|.*\.video\.google\.com).*?(videoplayback\?id=.*?|video_id=.*?)\&(.*?)/) {
$z = $2; $z =~ s/video_id=/get_video?video_id=/;
print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" . $z . "\n";

} elsif (m/^http:\/\/www\.google-analytics\.com\/__utm\.gif\?.*/) {
print $x . "http://www.google-analytics.com/__utm.gif\n";

#Cache High Latency Ads
} elsif (m/^http:\/\/([a-z0-9.]*)(\.doubleclick\.net|\.quantserve\.com|\.googlesyndication\.com|yieldmanager|cpxinteractive)(.*)/) {
$y = $3;$z = $2;
for ($y) {
s/pixel;.*/pixel/;
s/activity;.*/activity/;
s/(imgad[^&]*).*/\1/;
s/;ord=[?0-9]*//;
s/;&timestamp=[0-9]*//;
s/[&?]correlator=[0-9]*//;
s/&cookie=[^&]*//;
s/&ga_hid=[^&]*//;
s/&ga_vid=[^&]*//;
s/&ga_sid=[^&]*//;
# s/&prev_slotnames=[^&]*//
# s/&u_his=[^&]*//;
s/&dt=[^&]*//;
s/&dtd=[^&]*//;
s/&lmt=[^&]*//;
s/(&alternate_ad_url=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/;
s/(&url=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/;
s/(&ref=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/;
s/(&cookie=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/;
s/[;&?]ord=[?0-9]*//;
s/[;&]mpvid=[^&;]*//;
s/&xpc=[^&]*//;
# yieldmanager
s/\?clickTag=[^&]*//;
s/&u=[^&]*//;
s/&slotname=[^&]*//;
s/&page_slots=[^&]*//;
}
print $x . "http://" . $1 . $2 . $y . "\n";

#cache high latency ads
} elsif (m/^http:\/\/(.*?)\/(ads)\?(.*?)/) {
print $x . "http://" . $1 . "/" . $2 . "\n";

# spicific servers starts here....
} elsif (m/^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*?)/) {
print $x . "http://" . $1 . "\n";

#cdn, varialble 1st path
} elsif (($u =~ /filehippo/) && (m/^http:\/\/(.*?)\.(.*?)\/(.*?)\/(.*)\.([a-z0-9]{3,4})(\?.*)?/)) {
@y = ($1,$2,$4,$5);
$y[0] =~ s/[a-z0-9]{2,5}/cdn./;
print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";

#rapidshare
} elsif (($u =~ /rapidshare/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?)([a-z]*\.[^\/]{3}\/[a-z]*\/[0-9]*)\/(.*?)\/([^\/\?\&]{4,})$/)) {
print $x . "http://cdn." . $3 . "/SQUIDINTERNAL/" . $5 . "\n";

} elsif (($u =~ /maxporn/) && (m/^http:\/\/([^\/]*?)\/(.*?)\/([^\/]*?)(\?.*)?$/)) {
print $x . "http://" . $1 . "/SQUIDINTERNAL/" . $3 . "\n";

#like porn hub variables url and center part of the path, filename etention 3 or 4 with or without ? at the end
} elsif (($u =~ /tube8|pornhub|xvideos/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?(\.[a-z]*)?)\.([a-z]*[0-9]?\.[^\/]{3}\/[a-z]*)(.*?)((\/[a-z]*)?(\/[^\/]*){4}\.[^\/\?]{3,4})(\?.*)?$/)) {
print $x . "http://cdn." . $4 . $6 . "\n";
#...spicific servers end here.

#photos-X.ak.fbcdn.net where X a-z
} elsif (m/^http:\/\/photos-[a-z].ak.fbcdn.net\/(.*)/) {
print $x . "http://photos.ak.fbcdn.net/" . $1 . "\n";

#for yimg.com video
} elsif (m/^http:\/\/(.*yimg.com)\/\/(.*)\/([^\/\?\&]*\/[^\/\?\&]*\.[^\/\?\&]{3,4})(\?.*)?$/) {
print $x . "http://cdn.yimg.com//" . $3 . "\n";

#for yimg.com doubled
} elsif (m/^http:\/\/(.*?)\.yimg\.com\/(.*?)\.yimg\.com\/(.*?)\?(.*)/) {
print $x . "http://cdn.yimg.com/" . $3 . "\n";

#for yimg.com with &sig=
} elsif (m/^http:\/\/(.*?)\.yimg\.com\/(.*)/) {
@y = ($1,$2);
$y[0] =~ s/[a-z]+[0-9]+/cdn/;
$y[1] =~ s/&sig=.*//;
print $x . "http://" . $y[0] . ".yimg.com/" . $y[1] . "\n";

#youjizz. We use only domain and filename
} elsif (($u =~ /media[0-9]{2,5}\.youjizz/) && (m/^http:\/\/(.*)(\.[^\.\-]*?\..*?)\/(.*)\/([^\/\?\&]*)\.([^\/\?\&]{3,4})((\?|\%).*)?$/)) {
@y = ($1,$2,$4,$5);
$y[0] =~ s/(([a-zA-A]+[0-9]+(-[a-zA-Z])?$)|(.*cdn.*)|(.*cache.*))/cdn/;
print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";

#general purpose for cdn servers. add above your specific servers.
} elsif (m/^http:\/\/([0-9.]*?)\/\/(.*?)\.(.*)\?(.*?)/) {
print $x . "http://squid-cdn-url//" . $2 . "." . $3 . "\n";

#generic http://variable.domain.com/path/filename. "ext" or "exte" with or withour "? or %"
} elsif (m/^http:\/\/(.*)(\.[^\.\-]*?\..*?)\/(.*)\.([^\/\?\&]{2,4})((\?|\%).*)?$/) {
@y = ($1,$2,$3,$4);
$y[0] =~ s/(([a-zA-A]+[0-9]+(-[a-zA-Z])?$)|(.*cdn.*)|(.*cache.*))/cdn/;
print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";

# generic http://variable.domain.com/...
} elsif (m/^http:\/\/(([A-Za-z]+[0-9-]+)*?|.*cdn.*|.*cache.*)\.(.*?)\.(.*?)\/(.*)$/) {
print $x . "http://cdn." . $3 . "." . $4 . "/" . $5 . "\n";

# spicific extention that ends with ?
} elsif (m/^http:\/\/(.*?)\/(.*?)\.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|wmv|3gp|mp(4|3)|exe|msi|zip|on2|mar|rar|cab|amf|swf)(.*)/) {
print $x . "http://" . $1 . "/" . $2 . "." . $3 . "\n";

# all that ends with ;
} elsif (m/^http:\/\/(.*?)\/(.*?)\;(.*)/) {
print $x . "http://" . $1 . "/" . $2 . "\n";

} else {
print $x . $_ . "sucks\n";
}
}

sudah jalan, mksh semua

Return to “Ubuntu Server”

Who is online

Users browsing this forum: No registered users and 1 guest