본문 바로가기
my_lesson/_Linux

Linux - Errors and Problems 2017-07-17 Last Edit

by boolean 2017. 7. 13.
728x90
  • Could not connect to kr.archive.ubuntu.com:80 (103.22.220.133), connection timed out
  • E:dpkg was interrupted you must manually run 'sudo dpkg configure a' to correct the problem


    >>>:It is called when packages are broken, or the package installation is interrupted.


    You should run sudo dpkg --configure -a or its alternative apt-get -f install to solve this problem.


    The requested resource (/testjsp/) is not available.

    이클립스로 플러그인깔고 JSP파일을 테스트해보려 했는데 안되네요 

    톰캣도 잘뜨는데 실행하면 다음과 같은 에러가 뜹니다. 

    HTTP Status 404 - /testjsp/ type Status report message /testjsp/ description 

    The requested resource (/testjsp/) is not available.

    >>1. www폴더 (80포트) 말고  webApps/ROOT(8080) 폴더에 해당파일을 저장하자

       관련 문서 : /etc/bash.bashrc     $CATALINA_HOME 경로확인

       해당경로로 가서  webApps/ROOT(8080) 를 찾거나 ls -al 해서 심볼릭 링크를 따라서 경로추적하면  

       8080폴더 찾을 수 있음 해당 파일을 그곳으로 이동한다.

    >>2. 해당 폴더로 이동해서 파일을 링크(하드링크 |심볼링크)를 걸어두면 잘 작동됨을 확인할 수 있다.   

    파일이 생성될때마다 링크를 걸어주어야한다. 

    이것을 해결하기 위해서는 디렉토리 자체를 링크(하드링크 | 심볼릭링크)를 걸어야 하는데 

    하드링크는 디렉토리엔 적용이 되지안고 hard link not allowed for directory

    심볼릭링크는 디렉토리에 가능하나 일반적으로 톰캣에서 경로를 인식하지 못한다 tomcat 에서 심볼릭링크( Symvolic link) 따라가게 설정하는 방법은 아래에 있다.2017.0717


    >>3. If the value of this flag is true, symlinks will be allowed inside the web application, pointing to resources outside the web application base path. If not specified, the default value of the flag is false.

    $whereis tomcat8 

    tomcat: /etc/tomcat8 /usr/share/tomcat8

    $cd conf

    $sudo vi context.xml

    The Examples WebApp from Tomcat was failing to deploy. I hadn't touched any of the config files.

    It all starts with that first warning message: Setting property 'allowLinking' to 'true' did not find a matching property.. I did some digging and found that according to this migration guide, between Tomcat versions 7 and 8 some properties that used to be defined on the Context level now must defined on the Resources level. This includes allowLinking. Sure enough it we look at webapps/examples/META-INF/context.xml we see:

    <Context allowLinking="true"/>    //Tomcat 7 or lower

    I guess Tomcat forgot to update their Examples WebApp for Tomcat 8. Easy enough to fix. Simply replace with:

    <Context>

      <Resources allowLinking="true" />  //  Tomcat 8 or more

    </Context>

    Restart Tomcat and check your logs. Everything should be working now.

    참조 : http://blog.yo1.dog/fix-for-tomcat-8-examples-webapp-nullpointerexception/

    2017.0717


    /usr/bin/env: ‘node’: No such file or directory


    Fixed by:


    ln -s /usr/bin/nodejs /usr/bin/node


    you are in emergency mode. Afrer logging in, type 'Journalctl -xb' to view systrm logs, 'systrmctl reboot' to


     reboot, 'systrmctl default' pr ^D to try again to boot into default mode. press Enter for maintenance

    당신은 비상 모드입니다.
    Afrer 로그인시 systrm 로그를 보려면 'Journalctl -xb'를 입력하고 재부팅하려면 'systrmctl reboot', 기본 모드로 부팅을 다시 시도하려면 'systrmctl default'를 입력하십시오.
    유지 보수를 위해 Enter 키를 누릅니다.


    ...has experienced an internal error


    if this was due to the update, or a broken download or what, I had to do a " System restore" with Time Shift, I have not run the updates as yet.

    Normally I do not try and fix these sorts of problem on my PC I just reinstall or run Time Shift.


    ExecutablePath

     /usr/bin/compiz

    Package

     unity 7.2.3+14.04.20140826-Oubuntu1

     ProblemType

     Crash

    Title

     compiz crashed with signal 7 in FcFontMatch()


    Try

    Ctl-Alt-F2, Your screen will go black with white text,  log in and type


    unity --reset


    If no try that first.

    Open terminal and type

    sudo apt-get update 

    sudo apt-get upgrade



    nginx 404 not found

    Your folders must be set to file permission 755 using chmod. I successfully got it working after the following steps:


    After changing the owner of foo/


    $ /var/www/html# chown root foo

    and the subfiles to root, as well as changing the chmod of foo/ to 755


    chmod 755  -R foo    // -R : ecursive. change files and directories recursively

    to mimic /var/www/html/ 's permissions, my files became accessible.


    Remember to use


    ls -l 

    in your directory to check for the right file permissions. Also check your access and error logs at /var/log/nginx/ (this is accurate for debian at the very least, since this is what I am using)


    If you can't find your log files, use


    find / | grep error.log > results.txt

    and open results.txt with your favourite text editor such as vi results.txt (Assuming you're on a server and it's easier to read text files than the terminal).


    Thank you to Richard for telling me to check my logs.


    Error : Could not connect to kr.archive.ubuntu.com:80 (103.22.220.133), connection timed out

    Ubuntu apt-get 저장소 바꾸기

    Solution : sudo vi /etc/apt/sources.list

    :%s/kr.archive.ubuntu.com/ap-northeast-2.ec2.archive.ubuntu.com/g   //vi 치환기능 사용


    댓글