FTP 12002 ERROR

자체 개발한 프로그램으로 FTP 연결을 통한 파일 업/다운 로드 시, 12002 timeout ERROR 가 발생하는 경우가 왕왕 있다.

오늘, 회사 Application 에서 FTP 연결로 파일을 업/다운 로드 하는 모듈에서 장애가 발생했다.
테스트를 위해 Filezila와 같은 기타 다른 FTP 통신을 해보면 정상으로 잘 된다.

분석한 결과, 해당 오류는 윈도우 내, 방화벽의 문제로 확인되었다.
방화벽을 해제하고 다시 프로그램으로 FTP 전송을 시도하니 정상적으로 되었다.

지금까지의 경험으로 보아 대부분의 경우, 이는 방화벽의 문제로 분석된다.
혹은 내부망내 구성된 IDS 와 같은 보안 시스템에 의해서 발생되었다.

만약, 앞으로도 FTP 12002 오류가 발생한다면 참고해도 좋을 것 같다.

INFO: /usr/bin/ld: cannot find /usr/lib/libpthread_nonshared.a inside

oracle 설치 도중 다음의 에러가 나타났다

INFO: /usr/bin/ld: cannot find /usr/lib/libpthread_nonshared.a inside

참조되는 라이브러리 링크 디렉토리 내에서 libpthread_nonshared.a 라이브러리를 찾을 수 없어서 나타나는 오류다.
다음을 입력해준다.

sudo ln -s /usr/lib/i386-linux-gnu/libpthread_nonshared.a /usr/lib/libpthread_nonshared.a

“/opt/aCC/include_std/utility”, line 99: error #2070: incomplete type is not allowed

HP 장비에서 aCC 로 컴파일을 하던도중 아래의 에러가 발생했다.

“/opt/aCC/include_std/utility”, line 99: error #2070: incomplete type is not
allowed
first_type  first;
^
detected during:
instantiation of class “std::pair<_TypeT, _TypeU> [with
_TypeT=const std::string, _TypeU=char *]” at line 97 of
“/opt/aCC/include_std/rw/tree”
instantiation of class “__rw::__rw_rb_tree_node<_Alloc, _Val,
_Key, _KeyOf> [with
_Alloc=std::allocator<std::pair<const std::string, char
*>>, _Val=std::pair<const std::string, char *>,
_Key=std::string,
_KeyOf=__rw::__select1st<std::pair<const std::string,
char *>, std::string>]” at line 282 of
“/opt/aCC/include_std/rw/tree”
instantiation of class “__rw::__rb_tree<_Key, _Val, _KeyOf, _Comp,
_Alloc> [with _Key=std::string, _Val=std::pair<const
std::string, char *>,
_KeyOf=__rw::__select1st<std::pair<const std::string,
char *>, std::string>, _Comp=std::less<std::string>,
_Alloc=std::allocator<std::pair<const std::string, char
*>>]” at line 102 of “/opt/aCC/include_std/map”
instantiation of class “std::map<_Key, _TypeT, _Compare,
_Allocator> [with _Key=std::string, _TypeT=char *,
_Compare=std::less<std::string>,
_Allocator=std::allocator<std::pair<const std::string,
char *>>]” at line 54 of “LocalRepository.h”

이유인즉, HP 컴파일러 aCC 가 버전 6로 넘어오면서 기존(aCC version 5)에서 허용했던 C++ 타입에 대한 처리를 더이상 허용하지 않으면서 발생한 문제였다.

관련링크 : http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=2708d7c682f02110d7c682f02110275d6e10RCRD#_iso-39._acc6_detects_instantiation_

공식 문서내용은 다음과 같다.

ISO-39. aCC6 detects instantiation conflicts earlier (2403)

Points of instantiation differ for member functions, so reporting of instantiation conflicts can differ. This is simply a behavior difference, and not a compatibility issue. However, the following code snippet illustrates an incompatibility in the use of repeated const keywords, which aCC5 allows and aCC6 does not. To fix this code, don’t instantiate the template with a const int; simply use int:

template <class T>
struct S {
void foo(T *i) {}
void foo(const T *i) {}
};
int main() {
int i = 5;
#ifdef WORKS_IN_BOTH
S<int> s;
#else
S<const int> s;
#endif
return 0;
}

내용인즉, C++ 에서 template 사용시 const 를 사용하지 말라는 뜻이다.

위의 에러에서 문제가 해당 라인(line 54 of “LocalRepository.h”)을 찾아가보니 아래와 같이 선언되있었다.

map<string, char*> m_mapStringMainData;

뭔가 이상했다. map 선언 중, 어디에도 const 는 있지 않았다. 어찌된 일일까.

한참을 헤매고 주위에 도움을 구해서 찾아낸 정답은 정말 엉뚱한 곳에 있었다.
바로 iostream 였다.

다음의 라인을 추가하여 깔끔히 문제를 해결할 수 있었다.

#include <iostream>

왜 이런 문제가 생긴 것일까? 조금 더 질문을 해본 결과 한가지 재미있는 사실을 알 수 있었다.
이전 버전의 aCC 에서는 iostream 을 include 하면 또 안된다는 것..

아직 배워야할 것이 많다..

WordPress Error – Fatal error: Cannot redeclare class Facebook in /wp-content/plugins/simple-facebook-connect/facebook-platform/facebook.php

워드 프레스를 사용하던 중 아래와 같은 에러를 발견하였다.

WordPress Error – Fatal error: Cannot redeclare class Facebook in /wp-content/plugins/simple-facebook-connect/facebook-platform/facebook.php

관리자 계정으로 로그인 하여 글을 수정 하려고 했는데 위와 같은 에러가 발생하면서 로그인이 안되는 현상이었다.

에러 메시지의 원인은 메시지 내용에 나타나있었다. Facebook 관련된 플러그인에서 오류가 발생하여 로그인을 할 수 없다는 내용이다. 오류가 발생한 이유는 중복 선언.

구글링 후 해결방법을 찾을 수 있었다. 내용인즉, 설치된 두개 이상의 페이스북 플러그인이 서로 작동하면서 충돌이 일어난 것이란다.

웹서버에 ssh 접속후, 에러가 발생한 플러그인 디렉토리를 다른 이름으로 변경 후, 다시 접속을 하니 정상적으로 로그인이 되었다.

로그인 후, 문제가 발생한 플러그인을 삭제하여 문제를 해결하였다. 🙂

Installing tora with Oracle support in the Ubuntu 10.04

 우분투에서 Tora를 설치란 간단한 일이다.

 하지만 Tora에 Oracle 접속기를 덧붙이기란 그리 쉽지 않다.

 Tora에 오라클 접속기를 덧붙여서 설치하기는 아래의 링크를 참조하기 바란다.

 https://help.ubuntu.com/community/HowToBuildToraWithOracle

 필자도 어느정도는 맞아떨어졌으나, 설치도중 역시나 이상한 에러가 발생하였다.

dpkg-shlibdeps: error: no dependency information found for /oracle/11g/lib/libclntsh.so.11.1 (used by debian/tora/usr/bin/tora).
dh_shlibdeps: dpkg-shlibdeps -Tdebian/tora.substvars debian/tora/usr/bin/tora returned exit code 2
make: *** [binary-predeb-IMPL/tora] 오류 9

 이게 무슨 에러일까..
 에러의 내용은 dh_shlibdeps 를 실행하던 도중, libclntsh.so.11.1의 의존성 정보를 찾을 수 없었다…라는 내용인데, 아마도 dh_shlibdpes 프로세스가 하는 일은 설치된 라이브러리의 의존성 정보를 파악하여 패키지를 만드는데 그 정보를 포함시키는 역할을 하는 프로세스 같았다.

 하지만 문제는 libclntsh.so.11.1 라이브러리…

 왜냐하면 오라클 11g 버전 설치시, XE 패키지로 설치한 것이 아니라, 수동으로 직접 설치했기 때문에 발생하는 문제같았다.

 패키지로 설치하지 않았으니, 당연히 lib 의존성 정보가 없는 것이고, 그로 인해 발생되는 문제 같았다.(어디까지나 추측)

 해결법을 찾아 보던 중 다음의 글을 찾을 수 있었다.

http://ubuntuforums.org/showthread.php?t=753877

하지만.. 위 글에서 이야기하는 방법은 이상하게 tora-2.1.1 버전에서는 되지 않는 듯 했다. 이리저리 debian/rules 파일을 고쳐보고 몇번씩 실행해 보았지만… 이상했다.

 그래서 다시 다른 방법을 찾아 보던 중 아래의 글을 찾을 수 있었다.

http://www.pythian.com/news/4747/installing-tora-with-oracle-support-on-ubuntu-9-10-karmic-koala/

 글 본문이 아닌 댓글에서 해답을 찾을 수 있었다.

 내용의 요지는

 /etc/dpkg/shlibs.override

 파일에 의존성 검사에 걸리는 라이브러리의 내용을 넣는 것이었다.

 아마도 저 파일의 역할이 의존성 검사 예의 내용을 입력하는 파일 같았다.

 필자의 경우, libclntsh 11.1 라이브러리에 이어 libocci 11.1 라이브러리의 의존성 에러도 발생하여서 이 두가지 사항에 대한 내용을 파일에 추가하였더니 아무 무리없이 패키지 파일을 만들 수 있었다.

/etc/dpkg/shlibs.override 파일내용

# dpkg shlibs override file
#
# Entries in this file will override all others, only use if you
# are really sure that is what you want!
#
# For more information see the dpkg-shlibdeps(1) manual page.
#
# <library name>        <version/soname>        <dependencies>
libclntsh 11.1
libocci 11.1