OpenVZ кроет KVM, VMvare по простоте и удобству в использовании.
среда, декабря 04, 2013
четверг, июня 27, 2013
Symfony 2: http://x.x.x.x/login_check error 500
You must configure the check path to be handled by the firewall using form_login in your security firewall configuration.IT'S POST POST POST POST POST, you can see it when you open in browser cos it's GET GET GET
воскресенье, апреля 21, 2013
Linux: "Give root password for maintenance"
In the event your Linux box experiences disk or file system issues you may receive a "Give root password for maintenance" prompt upon reboot. If you have your root password you can login but in the event your using 'slide' or 'sudo' for wheel access or you've just mis-placed your root password - you'll need to reset it.
To reset your root password:
1. When the GRUB loader shows during boot press the spare bar to pause boot.
2. Select your boot kernel.
3. Type 'e' to edit the default kernel line.
4. Type 'e' again on the line that starts with 'kernel'.
5. Add 'init=/bin/bash' to the end of the 'kernel' line then press enter.
6. Type 'b' to boot the modified kernel parameters.
7. Once you're at the /bin/bash prompt you will need to remount the root file system as read/write in order to edit the passwd file:
# mount -o remount,rw /
8. Change your root password:
# passwd root
9. Remount the filesystem back to read only:
# mount -o remount,ro /
10. Reboot your server using CTR-ALT-DELETE.
11. You will now be able to login with your new root password and carry out the maintenance.
четверг, декабря 20, 2012
Starting mongod: error command line: multiple occurrences
I tried to start mongod service and got error:
service didn't start an didn't log nothing
problem was into /etc/mongod.conf
I set one of parameters double into config, in my case it was "fork = true"
after removed one, service started successfully
[root@mongo root]# service mongod start
Starting mongod: error command line: multiple occurrences
use --help for help
[ OK ]
service didn't start an didn't log nothing
problem was into /etc/mongod.conf
I set one of parameters double into config, in my case it was "fork = true"
after removed one, service started successfully
среда, ноября 07, 2012
Symfony 2.1 SonataUserBundle errors
error at http://localhost/admin/sonata/user/user/create:
The server returned a "500 Internal Server Error".
log:
request.INFO: Matched route "admin_sonata_user_user_create" (parameters: "_controller": "Sonata\AdminBundle\Controller\CRUDController::createAction", "_sonata_admin": "sonata.user.admin.user", "_sonata_name": "admin_sonata_user_user_create", "_route": "admin_sonata_user_user_create")
...
request.CRITICAL: RuntimeException: The locale resource bundle could not be loaded for locale "en" (uncaught exception) at vendor/symfony/symfony/src/Symfony/Component/Locale/Locale.php line 160
solution:
>> php vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/data/build-data.php 49
error at http://localhost/admin/sonata/user/user/list:
The server returned a "500 Internal Server Error".
log:
request.INFO: Matched route "admin_sonata_user_user_list" (parameters: "_controller": "Sonata\AdminBundle\Controller\CRUDController::listAction", "_sonata_admin": "sonata.user.admin.user", "_sonata_name": "admin_sonata_user_user_list", "_route": "admin_sonata_user_user_list")
...
request.CRITICAL: Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("None of the chained routers were able to generate route "homepage".") in "SonataAdminBundle:CRUD:list.html.twig". (uncaught exception) at app/cache/prod/classes.php line 9300
solution add to routing.yml:
homepage:
pattern: /homepage
The server returned a "500 Internal Server Error".
log:
request.INFO: Matched route "admin_sonata_user_user_create" (parameters: "_controller": "Sonata\AdminBundle\Controller\CRUDController::createAction", "_sonata_admin": "sonata.user.admin.user", "_sonata_name": "admin_sonata_user_user_create", "_route": "admin_sonata_user_user_create")
...
request.CRITICAL: RuntimeException: The locale resource bundle could not be loaded for locale "en" (uncaught exception) at vendor/symfony/symfony/src/Symfony/Component/Locale/Locale.php line 160
solution:
>> php vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/data/build-data.php 49
error at http://localhost/admin/sonata/user/user/list:
The server returned a "500 Internal Server Error".
log:
request.INFO: Matched route "admin_sonata_user_user_list" (parameters: "_controller": "Sonata\AdminBundle\Controller\CRUDController::listAction", "_sonata_admin": "sonata.user.admin.user", "_sonata_name": "admin_sonata_user_user_list", "_route": "admin_sonata_user_user_list")
...
request.CRITICAL: Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("None of the chained routers were able to generate route "homepage".") in "SonataAdminBundle:CRUD:list.html.twig". (uncaught exception) at app/cache/prod/classes.php line 9300
solution add to routing.yml:
homepage:
pattern: /homepage
понедельник, июля 30, 2012
Install cloudera cluster cheats, add VM node.
- disable selinux at all hosts /etc/selinux/config
- disable iptables at master or fix rules
- set all node hosts of cluster in all /etc/hosts
- change the host name in all /etc/cloudera-scm-agent/config.ini
- enter into runned instance and change mac adress in /etc/sysconfig/network-scripts/ifcfg-eth0
- shutdown
- change mac address into Virtual Box VM preferences
- start VM
- ifconfig
- add host to /etc/hosts
- 10.0.0.10 node10.cloudera node10
- change host at /etc/sysconfig/network
- HOSTNAME=node10.clouder
вторник, июля 17, 2012
MapReduce doens't run when i tried install hadoop (CDH4) on Centos 6 (minimal) using Cloudera Manager (Free Edition)
I tried install full package include: HBase, HDFS, Hue, MapReduce, Oozie, ZooKeeper
But on start MapReduce I got error that JobTracker doesn't want to run.
After a few hours I found in log /var/log/hadoop-0.20-mapreduce/hadoop-cmf-mapreduce1-TASKTRACKER-localhost.localdomain.log.out this row:
p.s. so MapReduse run but i have problem to start Beeswax Server :)
Beeswax Server problem fixed, port 8002 used by other program
[me@localhost]# nmap -sT -O localhost
8002/tcp open teradataordbms
so I changed port of Beeswax to 8004 and restarted service
But on start MapReduce I got error that JobTracker doesn't want to run.
After a few hours I found in log /var/log/hadoop-0.20-mapreduce/hadoop-cmf-mapreduce1-TASKTRACKER-localhost.localdomain.log.out this row:
INFO org.apache.hadoop.mapred.TaskTracker: Tasktracker disallowed by JobTrackersolution found in google :
I added the following to the "MapReduce Service Configuration SafetyIn Cloudera Manager click Services->MapReduce in category search type: "MapReduce Service Configuration Safety Valve" edit value and save, after it restart all services
Valve" in the configuration of the MapReduce service page.
mapred.hosts
/root/mapred_approved_
hosts
true
Then created /root/mapred_approved_hosts containing:
localhost
localhost.localdomain
Beeswax Server problem fixed, port 8002 used by other program
[me@localhost]# nmap -sT -O localhost
8002/tcp open teradataordbms
so I changed port of Beeswax to 8004 and restarted service
вторник, июня 19, 2012
Memcacheq init.d script
source: memcacheq by Alexander Titov (qik)
I removed few parameters from line 43
I removed few parameters from line 43
- vim /etc/init.d/memcacheq
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | #! /bin/sh # # chkconfig: - 55 45 # description: The memcacheq daemon is a network memory cache service. # processname: memcacheq # config: /etc/sysconfig/memcacheq # pidfile: /var/run/memcached/memcacheq.pid # Standard LSB functions #. /lib/lsb/init-functions # Source function library. . /etc/init.d/functions if [ -f /etc/sysconfig/memcacheq ];then . /etc/sysconfig/memcacheq fi # Check that networking is up. . /etc/sysconfig/network if [ "$NETWORKING" = "no" ] then exit 0 fi RETVAL=0 prog="memcacheq" start () { echo -n $"Starting $prog: " if [ ! -e /var/run/memcacheq ]; then mkdir /var/run/memcacheq fi # insure that /var/run/memcacheq has proper permissions if [ "`stat -c %U /var/run/memcacheq`" != "$USER" ]; then chown $USER /var/run/memcacheq fi daemon --pidfile /var/run/memcacheq/memcacheq.pid /usr/local/bin/memcacheq -d -N -p $PORT -u $USER -H "$DATADIR" -B $MAXMESSAGE -L $LOGBUF -P /var/run/memcacheq/memcacheq.pid $OPTIONS # daemon --pidfile /var/run/memcacheq/memcacheq.pid /usr/local/bin/memcacheq -d -N -p $PORT -u $USER -m $CACHESIZE -c $MAXCONN -H "$DATADIR" -B $MAXMESSAGE -A $PAGESIZE -L $LOGBUF -P /var/run/memcacheq/memcacheq.pid $OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/memcacheq } stop () { echo -n $"Stopping $prog: " killproc -p /var/run/memcacheq/memcacheq.pid /usr/local/bin/memcacheq RETVAL=$? echo if [ $RETVAL -eq 0 ] ; then rm -f /var/lock/subsys/memcacheq rm -f /var/run/memcacheq.pid fi } restart () { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status memcacheq ;; restart|reload|force-reload) restart ;; condrestart) [ -f /var/lock/subsys/memcacheq ] && restart || : ;; *) echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}" exit 1 esac exit $? |
- vim /etc/sysconfig/memcacheq
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Configuration file for the memcacheq service. DATADIR=/data1/memcacheq LOGBUF=1024 MAXMESSAGE=1024 OPTIONS='> /data1/mq_error.log' USER=root PORT=22201 |
- service memcacheq start
- chkconfig memcacheq on
понедельник, июня 18, 2012
Create partition table and format disk (Centos 6) Softlayer
At SoftLayer i created server with two hard disks: primary (you can choose size max 100GB) and secondary (you can choose size max 300GB)
primary disk is /dev/xvda, and secondary is /dev/xvdc
Полезно: Шифрование флешки в Linux
- df doesn't show the secondary disk, you need to create partition, format and mount disk first
[root@server me]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvda2 103108896 91059600 6811588 94% /
tmpfs 1987292 0 1987292 0% /dev/shm
/dev/xvda1 99150 49491 44539 53% /boot
- to see all disks run fdisk
[root@server me]# fdisk -l
Disk /dev/xvdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00025cdb
Device Boot Start End Blocks Id System
/dev/xvdb1 1 261 2096451 82 Linux swap / Solaris
Disk /dev/xvdc: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/xvdc doesn't contain a valid partition table
Disk /dev/xvda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000cb5
Device Boot Start End Blocks Id System
/dev/xvda1 * 1 13 102400 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/xvda2 13 13055 104754176 83 Linux
primary disk is /dev/xvda, and secondary is /dev/xvdc
run parted to create partition table, run mkfs to format
- you will get into parted shell, run mklabel to set disk label (msdos for linux)
[root@server me]# parted /dev/xvdc mklabel msdos
Warning: The existing disk label on /dev/xvdc will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? Yes
Information: You may need to update /etc/fstab.
- run mkpart to create partition start from position 0 until end of disk -1, for ext3 filesystem
[root@server me]# parted /dev/xvdc mkpart
Partition type? primary/extended? primary
File system type? [ext2]? ext3
Start? 0
End? -1
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? Ignore
Information: You may need to update /etc/fstab.
- run fdisk to see partition num, now we see all disk normal at fdisk, but df still doesn't show secondary disk
[root@server me]# fdisk -l
Disk /dev/xvdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00025cdb
Device Boot Start End Blocks Id System
/dev/xvdb1 1 261 2096451 82 Linux swap / Solaris
Disk /dev/xvdc: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003cf5d
Device Boot Start End Blocks Id System
/dev/xvdc1 1 39163 314571823+ 83 Linux
Disk /dev/xvda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000cb5
Device Boot Start End Blocks Id System
/dev/xvda1 * 1 13 102400 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/xvda2 13 13055 104754176 83 Linux
[root@server me]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvda2 103108896 91019892 6851296 93% /
tmpfs 1987292 0 1987292 0% /dev/shm
/dev/xvda1 99150 49491 44539 53% /boot
- format partition xvdc1 by mkfs
[root@server me]# mkfs.ext3 /dev/xvdc1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
19660800 inodes, 78642955 blocks
3932147 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
2400 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
- mount disk
[root@server me]# mkdir /mnt/xvdc1
[root@server me]# mount /dev/xvdc1 /mnt/xvdc1
- add mounted disk to fstab
[root@server me]# vim /etc/fstab
....
/dev/xvdc1 /mnt/xvdc1 ext3 defaults 0 0
- check
[root@server me]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvda2 103108896 63571080 34300108 65% /
tmpfs 1987292 0 1987292 0% /dev/shm
/dev/xvda1 99150 49491 44539 53% /boot
/dev/xvdc1 309636140 195548 293712004 1% /mnt/xvdc1
Полезно: Шифрование флешки в Linux
среда, июня 13, 2012
Mount additional disk to VirtualBox image (centos 6)
- shut down you virtual machine
- open VirtualBox Manager
- choose you machine
- click Settings->Storage->SATA Contoller->icon Add Hard Disk
- click "Create new disk"
- choose format VMDK (Virtual Machine Disk) for example -> next
- choose Dynamically allocated for example -> next
- enter name, and choose size
- click Create
- click Ok
- run virtual machine
- > sudo fdisk -l
Disk /dev/sda: 5475 MB, 5475663872 bytes
4 heads, 32 sectors/track, 83552 cylinders
Units = cylinders of 128 * 512 = 65536 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 78125 4999984 83 Linux
/dev/sda2 78126 79681 99584 83 Linux
Disk /dev/sdb: 107.3 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table- I added 100Gb disk that got name /dev/sdb
- "Disk /dev/sdb doesn't contain a valid partition table" mean that you need to format this disk first
- yum install gparted
- run gparted (if you use graphical or see the manual)
- choose you disk in right top corner dropdown
- Device -> Create Partition Table -> choose ms-dos -> apply
- right click on disk bar -> New -> +Add
- right click on disk bar -> Format to.. -> choose ext3
- > mkdir /mnt/mydisk
- > mount -t ext3 /dev/sdb1 /mnt/mydisk
- > cd /mnt/mydisk
- > df
- to mount automatically on boot, add disk to /etc/fstab my /etc/fstb for example, i added last line
- LABEL=79d3d2d4 / ext4 defaults,noatime 0 0
LABEL=e21a3e10 /boot ext3 defaults,noatime 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/sdb1 /mnt/mydisk ext3 defaults 0 0 - DONE
Ярлыки:
centos,
fdisk,
gparted,
mount,
VirtualBox
среда, мая 02, 2012
ERROR 1005 (HY000): Can't create table 'dbname.tablename' (errno: 121)
При попытке создать таблицу выдает ошибку:
ERROR 1005 (HY000): Can't create table 'dbname.tablename' (errno: 121)
Имена foreign keys совпадали с именами foreign keys из другой таблицы. Переименовал все заработало.
ERROR 1005 (HY000): Can't create table 'dbname.tablename' (errno: 121)
Имена foreign keys совпадали с именами foreign keys из другой таблицы. Переименовал все заработало.
среда, апреля 25, 2012
mysqld: unrecognized service
Centos 6 установил Percona server
yum install Percona-Server-server-55.x86_64
все поставилось
пытаюсь запустить через сервис, выкидывает ошибку
service mysqld start
mysqld: unrecognized service
в итоге скопировал /etc/rc.d/init.d/mysqld с работающего сервера с mysql
через неделю ставил слэйв и опять тоже самое, совсем забыл про то что было на прошлой неделе. в итоге через двадцать минут наткнулся на /etc/rc.d/init.d/mysql для запуска перконы
вот что значит сила привычки
service mysql start
MySQL: Starting MySQL….. ERROR! The server quit without updating PID file
в логе написано проверить что ничего не бежит на 3306
нашел mysqld, убил
все равно не запускается
после нескольких попыток
service mysql start
Starting MySQL (Percona Server) SUCCESS!что сделал не понял но заработало :)
Ярлыки:
mysql,
mysqld,
percona,
percona server
среда, апреля 11, 2012
sphinxql: syntax error, unexpected IDENT, expecting CONST_INT or CONST_FLOAT or '-' near 'distance'
при попытке поиска со сравненим дистанции в индексе
получаю ошибку:
в индексе таблица вида:
получил ошибку:
после снизошло озарение что sphinx не хочет высчитывать значение в where
вынес вычисление в select
снизошла благодать:
SELECT id, weight() as real_weight, timestamp_created, GEODIST(0.55078861166627,0.59535898534089,lat_radians,long_radians) as distance FROM rt_matchWHERE distance <=115000.00 and max_distance<distance;
sphinxql: syntax error, unexpected IDENT, expecting CONST_INT or CONST_FLOAT or '-' near 'distance'
кругом один флоат проблем недолжно быть попробовал другой вариантindex rt_match { type = rt path = /var/lib/sphinx/rt_match rt_attr_timestamp = timestamp_created .... rt_attr_float = lat_radians rt_attr_float = long_radians rt_attr_float = max_distance .... docinfo = extern morphology = none min_word_len = 1 min_infix_len = 2 infix_fields = main_title html_strip = 1 charset_type = utf-8 enable_star = 1 rt_mem_limit = 256M }
SELECT id, weight() as real_weight, timestamp_created, GEODIST(0.55078861166627,0.59535898534089,lat_radians,long_radians) as distance FROM rt_user_match WHERE distance <=115000.00 and max_distance-distance&rt;0
sphinxql: syntax error, unexpected '-', expecting BETWEEN (or 8 other tokens) near '-distance&rt;0'
SELECT id, weight() as real_weight, timestamp_created, GEODIST(0.55078861166627,0.59535898534089,lat_radians,long_radians) as distance, max_distance-distance as hu FROM rt_user_match WHERE distance <=115000.00 and hu&rt;0.00;
+------+-------------+-------------------+---------------+---------------+ | id | real_weight | timestamp_created | distance | hu | +------+-------------+-------------------+---------------+---------------+ | 2097 | 1 | 1334076081 | 101040.648438 | 386959.343750 | | 2103 | 1 | 1334076082 | 48350.027344 | 155649.968750 | | 2104 | 1 | 1334076082 | 92743.218750 | 334256.781250 | | 2106 | 1 | 1334076083 | 63040.796875 | 223959.203125 | +------+-------------+-------------------+---------------+---------------+
среда, марта 07, 2012
Подключение к SphinxQL, sphinx.conf с поддержкой иврита
гребаны SphinxQL оказвается чтоб подключится к нему из комманд лайн нужно указать тип соединения:
ну и для примера простенький sphinx.conf с поддержкой иврита
mysql --port=9306 --protocol=tcp
ну и для примера простенький sphinx.conf с поддержкой иврита
#
# Minimal Sphinx configuration sample (clean, simple, functional)
#
source job_title_source
{
type = mysql
sql_host = localhost
sql_user = sphinx
sql_pass = PASS
sql_db = DBNAME
sql_port = 3306 # optional, default is 3306
sql_query = \
SELECT id, title, UNIX_TIMESTAMP(datetime_created) as timestamp_created, access_id, lang_id \
FROM job_title \
sql_attr_uint = lang_id
sql_attr_timestamp = timestamp_created
sql_field_string = access_id
sql_query_info = SELECT * FROM job_title WHERE id=$id
}
index job_title_index
{
source = job_title_source
path = /var/lib/sphinx/job_title_index
docinfo = extern
charset_type = utf-8
charset_table = 0..9, A..Z->a..z, _-> , a..z, \
U+FB1D->U+05D9, U+FB1F->U+05F2, U+FB20->U+05E2, U+FB21->U+05D0, U+FB22->U+05D3, U+FB23->U+05D4, U+FB24->U+05DB, U+FB25->U+05DC, U+FB26->U+05DD, U+FB27->U+05E8, U+FB28->U+05EA, U+FB2A->U+05E9, U+FB2B->U+05E9, U+FB2C->U+05E9, U+FB2D->U+05E9, U+FB2E->U+05D0, U+FB2F->U+05D0, U+FB30->U+05D0, U+FB31->U+05D1, U+FB32->U+05D2, U+FB33->U+05D3, U+FB34->U+05D4, U+FB35->U+05D5, U+FB36->U+05D6, U+FB38->U+05D8, U+FB39->U+05D9, U+FB3A->U+05DA, U+FB3B->U+05DB, U+FB3C->U+05DC, U+FB3E->U+05DE, U+FB40->U+05E0, U+FB41->U+05E1, U+FB43->U+05E3, U+FB44->U+05E4, U+FB46->U+05E6, U+FB47->U+05E7, U+FB48->U+05E8, U+FB49->U+05E9, U+FB4A->U+05EA, U+FB4B->U+05D5, U+FB4C->U+05D1, U+FB4D->U+05DB, U+FB4E->U+05E4, U+FB4F->U+05D0, U+05D0..U+05F2
# STRIP HTML TAGS
html_strip = 1
}
indexer
{
mem_limit = 128M
}
searchd
{
listen = localhost:9312
listen = localhost:9306:mysql41
log = /var/log/sphinx/searchd.log
query_log = /var/log/sphinx/query.log
read_timeout = 5
max_children = 30
pid_file = /var/run/sphinx/searchd.pid
max_matches = 10000
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
workers = threads # for RT to work
compat_sphinxql_magics = 0 # the future is now
}
понедельник, марта 05, 2012
Zend Route in ini file
конфигурация роутинга хранится в routes.ini
один из роутов ведет в редактирование джоба
задача создать правильную ссылку используя
получаем ошибку
надо добавить строчку
один из роутов ведет в редактирование джоба
job_edit.type = "Zend_Controller_Router_Route_Regex"
job_edit.route = "job/(\d+)/edit"
job_edit.defaults.module = "companies"
job_edit.defaults.controller = "job"
job_edit.defaults.action = "edit"
job_edit.map.1 = "jobId"
задача создать правильную ссылку используя
$this->url(array('jobId' => $job['id']),'job_edit', true);
получаем ошибку
An error occurred
Application error
Exception information:
Message: Cannot assemble. Reversed route is not specified.
надо добавить строчку
job_edit.reverse="job/%d/edit"
Ярлыки:
error,
route,
zend,
zend framework
вторник, декабря 13, 2011
Соединение с облаком:
Получаем в ответ:
Нам потребуется X-Storage-URL (место где находятся файлы) и X-Storage-Token.
запускаем получаем список контейнеров
Добавляем /cloudservers в конце урла.
Получаем список файлов в контейнере.
копируем xtrabackup dump на облако
curl -D - -H "X-Auth-User: RackspaceCloudUsername" -H "X-Auth-Key: RackspaceApiKey" https://auth.api.rackspacecloud.com/v1.0
HTTP/1.1 204 No Content
Date: Wed, 30 Mar 2011 04:15:28 GMT
Server: Apache/2.2.3 (Mosso Engineering) X-Storage-Url: https://storage101.dfw1.clouddrive.com/v1/MossoCloudFS_6f597497-4986-44ea-9081-1234567890 X-Storage-Token: 63ea9670-c80f-402d-9657-1234567890 X-CDN-Management-Url: https://cdn1.clouddrive.com/v1/MossoCloudFS_6f597497-4986-44ea-9081-68b8ee123456 X-Auth-Token: 63ea9670-c80f-402d-9657-c59bdb123456 X-Server-Management-Url: https://servers.api.rackspacecloud.com/v1.0/123456Content-Length: 0
Connection: close
Content-Type: application/octet-stream
curl -H "X-Storage-Token: aaa89968-977b-4540-ac65-52037abde38d" https://storage101.ord1.clouddrive.com/v1/MossoCloudFS_8e0c0a34-d042-465d-a2aa-313dc3bb1b3a
curl -H "X-Storage-Token: 63ea9670-c80f-402d-9657-1234567890" https://storage101.dfw1.clouddrive.com/v1/MossoCloudFS_6f597497-4986-44ea-9081-1234567890/cloudservers
curl -H "X-Storage-Token: 63ea9670-c80f-402d-9657-1234567890" https://storage101.dfw1.clouddrive.com/v1/MossoCloudFS_6f597497-4986-44ea-9081-1234567890/cloudservers
20110207installminimum_20110720_1314_cloudserver20106024.tar.gz.0
20110207installminimum_20110720_1354_cloudserver20106024.yml
20110721withtempsite_20110721_1816_cloudserver20106024.tar.gz.0
20110721withtempsite_20110721_1816_cloudserver20106024.yml
20110810_20110810_1250_cloudserver20106024.tar.gz.0
20110810_20110810_1250_cloudserver20106024.yml
curl -X PUT -T db.20111128.tar.gz -D - \ -H "X-Auth-Token: 63ea9670-c80f-402d-9657-1234567890" \ -H "X-Object-Meta-Screenie: mysqldump 2011 10" \ https://storage101.dfw1.clouddrive.com/v1/MossoCloudFS_6f597497-4986-44ea-9081-1234567890/xtrabackup/201111/db.20111128.tar.gz
пятница, ноября 11, 2011
Гребанный IE и ошибка facebook connect
подключил facebook connect
гребанный IE орет что есть ошибка:
и подсвечивал в дебаггере строчку:
в методе:
решение нашел здесь:
http://stackoverflow.com/questions/7280007/permission-denied-error-in-all-js
нечитая добавил эту строчку:
непомогло
и только потом заметил что ошибка в другом методе, добавил:
гребанный IE орет что есть ошибка:
SCRIPT70: Permission denied
all.js, line 22 character 4321и подсвечивал в дебаггере строчку:
b.fbCallID=a.id;в методе:
setLoadedNode:function(a,b){FB.UIServer._loadedNodes[a.id]=b;if(a.params)b.fbCallID=a.id;} решение нашел здесь:
http://stackoverflow.com/questions/7280007/permission-denied-error-in-all-js
нечитая добавил эту строчку:
FB.UIServer.setActiveNode = function(a,b){FB.UIServer._active[a.id]=b;} // IE hack to correct FB bug непомогло
и только потом заметил что ошибка в другом методе, добавил:
FB.UIServer.setLoadedNode = function (a,b){FB.UIServer._loadedNodes[a.id] = b;} // IE hack to correct FB bug
все заработало, боюсь трогать :)
полный код:
window.fbAsyncInit = function() {
FB.init({
appId : 'APP_ID', // App ID
//channelURL : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
oauth : true, // enable OAuth 2.0
xfbml : true // parse XFBML
});
FB.UIServer.setActiveNode = function(a,b){FB.UIServer._active[a.id]=b;} // IE hack to correct FB bug
FB.UIServer.setLoadedNode = function (a,b){FB.UIServer._loadedNodes[a.id] = b;} // IE hack to correct FB bug
// Additional initialization code here
};
четверг, октября 27, 2011
Apache error: "Request exceeded the limit of 10 internal redirects"
давно надоела такая ошибка:
[Thu Oct 27 14:04:49 2011] [error] [client 82.81.18.70] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.просто какая то свинка пыталась взять .htpasswd , вынес его из директории сайта и поправил права. все ок
пятница, октября 14, 2011
בזק בינלאומי - חרה של חברה
אל תתחברו לאינטרנט של בזק בינלאומי - חרה של חברה
. לפני שנה הם בלי לשאול חברו אותי לפרמיום שלהם
ושלמתי כל חודש 30 ש"ח נוספים בלי לדעת את זה
וגם לא רוצים לבטל כי אומרים שיש לי התחייבות לשנתיים.
בסוף נובמבר אני מתנתק לא תראו יותר שקל ממני שקל.
. לפני שנה הם בלי לשאול חברו אותי לפרמיום שלהם
ושלמתי כל חודש 30 ש"ח נוספים בלי לדעת את זה
וגם לא רוצים לבטל כי אומרים שיש לי התחייבות לשנתיים.
בסוף נובמבר אני מתנתק לא תראו יותר שקל ממני שקל.
вторник, октября 11, 2011
child pid ##### exit signal Segmentation fault (11)
[Tue Oct 11 12:31:13 2011] [notice] child pid 13512 exit signal Segmentation fault (11)apache выкидывает такие ошибки в основном error_log
[Tue Oct 11 12:31:40 2011] [notice] child pid 13518 exit signal Segmentation fault (11)
решение: один из файлов который инклудится php скриптом имеет неправильные права.
поправь и порядок
Подписаться на:
Сообщения (Atom)