에러 발생 상황

bitnami로 설치한 redmine에서 htttp://url은 잘 보이는데 http://url/redmine에서 503 에러가 발생
서버를 비정상적으로 종료하면 발생

에러 메시지

[root@localhost ~]# /etc/init.d/bitnami-drupal start
/opt/redmine-0.8.7-0/mysql/scripts/ctl.sh : mysql  (pid 2884) already running
starting port 3001
** !!! PID file tmp/pids/mongrel.3001.pid already exists.  Mongrel could be running already.  Check your log/mongrel.3001.log for errors.
** !!! Exiting with error.  You must stop mongrel and clear the .pid before I'll attempt a start.

starting port 3002
** !!! PID file tmp/pids/mongrel.3002.pid already exists.  Mongrel could be running already.  Check your log/mongrel.3002.log for errors.
** !!! Exiting with error.  You must stop mongrel and clear the .pid before I'll attempt a start.

Syntax OK
/opt/redmine-0.8.7-0/apache2/scripts/ctl.sh : httpd (pid 2949) already running
/opt/redmine-0.8.7-0/subversion/scripts/ctl.sh : subversion  (pid 2962) already running

에러발생 원인

비정상적인 종료로 인해 PID 파일이 정상적으로 처리되지 않음


해결방법

간단하다. 문제가 되는 파일을 삭제하고 redmine을 다시 시작한다.

[root@localhost ~]# rm /opt/redmine-0.8.7-0/apps/redmine/tmp/pids/mongrel.3001.pid
rm: remove 일반 파일 `/opt/redmine-0.8.7-0/apps/redmine/tmp/pids/mongrel.3001.pid'? y
[root@localhost ~]# rm /opt/redmine-0.8.7-0/apps/redmine/tmp/pids/mongrel.3002.pid
rm: remove 일반 파일 `/opt/redmine-0.8.7-0/apps/redmine/tmp/pids/mongrel.3002.pid'? y
[root@localhost ~]# /etc/init.d/bitnami-drupal stop
/opt/redmine-0.8.7-0/subversion/scripts/ctl.sh : subversion stopped
Syntax OK
/opt/redmine-0.8.7-0/apache2/scripts/ctl.sh : httpd stopped
already stopped port 3001
already stopped port 3002
/opt/redmine-0.8.7-0/mysql/scripts/ctl.sh : mysql stopped
[root@localhost ~]# /etc/init.d/bitnami-drupal start
100108 09:30:08 mysqld_safe Logging to '/opt/redmine-0.8.7-0/mysql/data/mysqld.log'.
100108 09:30:08 mysqld_safe Starting mysqld.bin daemon with databases from /opt/redmine-0.8.7-0/mysql/data
/opt/redmine-0.8.7-0/mysql/scripts/ctl.sh : mysql  started at port 3306
starting port 3001
starting port 3002
Syntax OK
/opt/redmine-0.8.7-0/apache2/scripts/ctl.sh : httpd started at port 80
/opt/redmine-0.8.7-0/subversion/scripts/ctl.sh : subversion started at port 3690



크리에이티브 커먼즈 라이선스
Creative Commons License
by 서영아빠 2010/01/08 09:33

※ 이 글은 박인서님의 블로그에서 퍼온글입니다.

redmine 에서 Gantt Chart 에서 한글이 제대로 나오는 것을 확인 한 후, pdf 에서 한글이 나오지 않는 이유를 몰라 한참을 헤매다가 결국 방법을 알았습니다.

redmine/app/helpers 에 있는 ifpdf_helper.rb 에 language 가 한글로 되어 있을 때 pdf에 UHC Font 를 출력하는 routine 이 빠져 있었고, redmine\vendor/plugins/rfpdf/lib/rfpdf
에 있는 korean.rb 에 일부 오류가 있었습니다.

ifpdf_helper.rb 는 다음과 같이 고칩니다. (0.80 기준)

[code]
    when 'zh-tw'
       extend(PDF_Chinese)
       AddBig5Font()
      @font_for_content = 'Big5'
       @font_for_footer = 'Big5'
    
when 'ko'
       extend(PDF_Korean)
       AddUHCFont()
       @font_for_content = 'UHC'
       @font_for_footer = 'UHC'

[/code]

그리고, korean.rb 는 다음과 같이 고칩니다.

[code]
  def AddUHCFont(family='UHC',name='HYGoThic-Medium')
   #Add UHC font with proportional
   cw=UHC_widths
cMap='KSCms-UHC-H'
   registry={'ordering'=>'Korea1','supplement'=>1}
   AddCIDFonts(family,name,cw,cMap,registry)
  end

  def AddUHChwFont(family='UHC-hw',name='HYGoThic-Medium')
   #Add UHC font with half-witdh Latin
   32.upto(126) do |i|
    cw[i.chr]=500
   end
 cMap='KSCms-UHC-HW-H'
   registry={'ordering'=>'Korea1','supplement'=>1}
   AddCIDFonts(family,name,cw,cMap,registry)
  end
[/code]

(사실상 고딕체가 출력되게 할 뿐이지, 윗부분이 잘못된 것은 아닙니다.)

문제 부분은 아래 부분입니다.

[code]
  def MultiCell(w,h,txt,border=0,align='L',fill=0)
   if(@CurrentFont['type']=='Type0')
    MBMultiCell(w,h,txt,border,align,fill)
   else
    super(w,h,txt,border,align,fill)
 end
  end

  def MBMultiCell(w,h,txt,border=0,align='L',fill=0)
   #Multi-byte version of MultiCell()
   cw=@CurrentFont['cw']
   if(w==0)
    w=@w-@rMargin-@x
 end
   wmax=(w-2*@cMargin)*1000/@FontSize
   s=txt.gsub("\r",'')
   nb=s.length
   if(nb>0 and s[nb-1]=="\n")
    nb-=1
 end
   b=0
   if(border)
    if(border==1)
     border='LTRB'
     b='LRT'
     b2='LR'
    else
     b2=''
     if(border.to_s.index('L'))
      b2+='L'
   end
     if(border.to_s.index('R'))
      b2+='R'
   end
     b=border.to_s.index('T') ? b2+'T' : b2
    end
   end
   sep=-1
   i=0
   j=0
   l=0
   nl=1
   while(i<nb)
    #Get next character
    c=s[i]
    #Check if ASCII or MB
    ascii=(c<128)
    if(c.chr=="\n")
     #Explicit line break
     Cell(w,h,s[j,i-j],b,2,align,fill)
     i+=1
     sep=-1
     j=i
     l=0
     nl+=1
     if(border and nl==2)
      b=b2
   end
     next
    end
    if(!ascii)
     sep=i
     ls=l
    elsif(c==' ')
     sep=i
     ls=l
    end
    l+=ascii ? (cw[c.chr] || 0) : 1100
    if(l>wmax)
     #Automatic line break
     if(sep==-1 or i==j)
      if(i==j)
       i+=ascii ? 1 : 3
    end
      Cell(w,h,s[j,i-j],b,2,align,fill)
     else
      Cell(w,h,s[j,sep-j],b,2,align,fill)
      i=(s[sep]==' ') ? sep+1 : sep
     end
     sep=-1
     j=i
     l=0
#     nl+=1
     if(border and nl==2)
      b=b2
     end
    else
     i+=ascii ? 1 : 3
    end
   end
   #Last chunk
   if(border and not border.to_s.index('B').nil?)
    b+='B'
 end
   Cell(w,h,s[j,i-j],b,2,align,fill)
   @x=@lMargin
  end
[/code]

즉,   def MBMultiCell(w,h,txt,border=0,align='L',fill=0) 의 부분을 chinese.rb 화일의 것으로 교체했습니다.

아래 windows 용 rb 화일을 첨부합니다.

크리에이티브 커먼즈 라이선스
Creative Commons License
by 서영아빠 2009/12/23 17:15

얼마전 SVN을 운용하던 컴퓨터의 HDD가 죽어서 윈도우를 새로 설치했다.
그런데 문제는 HDD가 죽는 순간에 SVN 커밋이 이루어지고 있었나보다.
그래서 특정 리비전이 깨져버렸다...ㅡ.ㅡ;;

아래 에러 메시지는 특정 리비전이 깨져서 Trac에서 발생한 에러다.

Oops…

Trac detected an internal error:

If you think this really should work and you can reproduce it, you should consider reporting this problem to the Trac team.

Go to http://trac.edgewall.org/ and create a new ticket where you describe the problem, how to reproduce it. Don't forget to include the Python traceback found below.

Python Traceback

Traceback (most recent call last):
File "C:\TOW\Python\Lib\site-packages\trac\web\main.py", line 406, in dispatch_request
dispatcher.dispatch(req)
File "C:\TOW\Python\Lib\site-packages\trac\web\main.py", line 191, in dispatch
chosen_handler = self._pre_process_request(req, chosen_handler)
File "C:\TOW\Python\Lib\site-packages\trac\web\main.py", line 263, in _pre_process_request
chosen_handler = f.pre_process_request(req, chosen_handler)
File "C:\TOW\Python\Lib\site-packages\trac\versioncontrol\api.py", line 73, in pre_process_request
self.get_repository(req.authname).sync()
File "E:\TOW\Python\lib\site-packages\trac\versioncontrol\cache.py", line 156, in sync
cset = self.repos.get_changeset(next_youngest)
File "C:\TOW\Python\Lib\site-packages\trac\versioncontrol\svn_fs.py", line 323, in get_changeset
self.pool = None
File "C:\TOW\Python\Lib\site-packages\trac\versioncontrol\svn_fs.py", line 648, in __init__
self.authz = authz
NoSuchChangeset: No changeset 2684 in the repository
크리에이티브 커먼즈 라이선스
Creative Commons License
by 서영아빠 2009/04/10 13:39
어제 SVN을 사용하면서 아래와 같은 메시지가 떴다.
Can't create directory 'PATH\db\transactions\6-1.txn': 지정된 경로를 찾을 수 없습니다.
에러가 발생된 이유는 transactions 폴더가 없어서 발생하는 문제였다.
해당 경로에 transactions 폴더를 만들어 주면 정상적으로 돌아간다.

transactions폴더가 없어진 이유는 아직 모르겠다...
크리에이티브 커먼즈 라이선스
Creative Commons License
by 서영아빠 2009/04/10 09:26
| 1 |