Problem on locale

Discussion in 'Server Operation' started by satimis, Oct 2, 2007.

  1. satimis

    satimis New Member

    Hi folks,


    Ubuntu 7.04 server amd64 Host OS
    vmware-mui-distrib-1.0.4-56528
    vmware-server-distrib-1.0.4-56528


    I have been suffering on locale problem, having googling around for 2 days without a solution.


    1)
    1st problem - on ssh

    On an Ubuntu 7.04 desktop running

    $ ssh -Y [email protected]_router_ip rox
    password:
    Code:
    
    (process:5576): Gdk-WARNING **: locale not supported by C library
    
    (rox:5576): Gtk-WARNING **: Locale not supported by C library.
            Using the fallback 'C' locale.
    
    Remark: rox - a light-weight file manager


    $ ssh [email protected]_router_ip
    $ ls
    displaying files and directories of the server which indicates server connnected.


    On the other way:

    On server
    $ ssh -Y [email protected]_router_ip rox
    it connected with the rox displayed locally.



    2)
    2nd problem - on VMWare

    $ sudo /etc/init.d/httpd.vmware start
    Code:
    Starting httpd.vmware:
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
            LANGUAGE = (unset),
            LC_ALL = (unset),
            LANG = "en_HK.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    

    Please advise how to fix the problem. TIA.


    Remark:
    Previously I also suffered on locale problem on this box. I tried to fix it with a new installation of locale resulting in the server crashed. This is a fresh installation, NOT completed yet.


    Edit:

    $ locale
    Code:
    LANG=en_HK.UTF-8
    LC_CTYPE="en_HK.UTF-8"
    LC_NUMERIC="en_HK.UTF-8"
    LC_TIME="en_HK.UTF-8"
    LC_COLLATE="en_HK.UTF-8"
    LC_MONETARY="en_HK.UTF-8"
    LC_MESSAGES="en_HK.UTF-8"
    LC_PAPER="en_HK.UTF-8"
    LC_NAME="en_HK.UTF-8"
    LC_ADDRESS="en_HK.UTF-8"
    LC_TELEPHONE="en_HK.UTF-8"
    LC_MEASUREMENT="en_HK.UTF-8"
    LC_IDENTIFICATION="en_HK.UTF-8"
    LC_ALL=
    
    $ locale -a
    Code:
    C
    en_AU.utf8
    en_BW.utf8
    en_CA.utf8
    en_DK.utf8
    en_GB.utf8
    en_HK.utf8
    en_IE.utf8
    en_IN
    en_NZ.utf8
    en_PH.utf8
    en_SG.utf8
    en_US.utf8
    en_ZA.utf8
    en_ZW.utf8
    POSIX
    
    $ apt-cache policy language-pack-en
    Code:
    language-pack-en:
      Installed: 1:7.04+20070601
      Candidate: 1:7.04+20070601
      Version table:
     *** 1:7.04+20070601 0
            500 http://us.archive.ubuntu.com feisty-updates/main Packages
            100 /var/lib/dpkg/status
         1:7.04+20070412 0
            500 http://us.archive.ubuntu.com feisty/main Packages
    

    B.R.
    satimis
     
    Last edited: Oct 2, 2007
  2. falko

    falko Super Moderator ISPConfig Developer

    You can try
    Code:
    apt-get install localeconf
     
  3. satimis

    satimis New Member

    Tks for your advice.

    Already done, installing localeconf.

    Problem 2) solved

    Problem 1) still existing


    satimis
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Try
    Code:
    dpkg-reconfigure locales
     
  5. satimis

    satimis New Member

    Tried several times, including;

    $ sudo dpkg-reconfigure --force locales


    Besides on each reboot/new start PC, I have to run

    $ export $LC_ALL=C


    otherwise;

    $ sudo /etc/init.d/httpd.vmware start
    Code:
    Password:
    Starting httpd.vmware:
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
            LANGUAGE = (unset),
            LC_ALL = (unset),
            LANG = "en_HK.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    
    Where shall I check, Thanks


    Edit:

    Cause of Problem 1) found;
    It is the firewall "iptables" which stops X forwarding.

    On server after running;
    $ sudo iptables -F


    On desktop;
    $ ssh -X [email protected] rox
    Code:
    [email protected]'s password: 
    
    (process:5282): Gdk-WARNING **: locale not supported by C library
    
    (rox:5282): Gtk-WARNING **: Locale not supported by C library.
            Using the fallback 'C' locale.
    
    (rox:5285): Gtk-WARNING **: Could not find the icon 'mime-text:plain'. The 'hicolor' theme
    was not found either, perhaps you need to install it.
    You can get a copy from:
            http://icon-theme.freedesktop.org/releases
    
    (leafpad:5286): Gtk-WARNING **: Locale not supported by C library.
            Using the fallback 'C' locale.
    
    (leafpad:5287): Gtk-WARNING **: Locale not supported by C library.
            Using the fallback 'C' locale.
    
    remote rox displayed locally. Files can be evoked. I don't know why it displays a misleading warning there fooling around us.


    Before the server crashed I ran another firewall script. I'm now running following scripts;
    $ cat /etc/rc.local
    Code:
    #
    # INPUT
    #
    
    # allow all incoming traffic from the management interface NIC
    # as long as it is a part of an established connection
    iptables -I INPUT 1 -j ACCEPT -d MGMT_NIC_IP -m state --state
    RELATED,ESTABLISHED
    
    # allow all ssh traffic to the management interface NIC
    iptables -I INPUT 2 -j ACCEPT -p TCP -d MGMT_NIC_IP --destination-port 22
    
    # allow all VMware MUI HTTP traffic to the management interface NIC
    iptables -I INPUT 3 -j ACCEPT -p TCP -d MGMT_NIC_IP --destination-port 8222
    
    # allow all VMware MUI HTTPS traffic to the management interface NIC
    iptables -I INPUT 4 -j ACCEPT -p TCP -d MGMT_NIC_IP --destination-port 8333
    
    # allow all VMware Authorization Daemon traffic to the management
    interface NIC
    iptables -I INPUT 5 -j ACCEPT -p TCP -d MGMT_NIC_IP --destination-port 902
    
    # reject all other traffic to the management interface NIC
    iptables -I INPUT 6 -j REJECT -d MGMT_NIC_IP --reject-with
    icmp-port-unreachable
    
    
    #
    # OUTPUT
    #
    
    # allow all outgoing traffic from the management interface NIC
    # if it is a part of an established connection
    iptables -I OUTPUT 1 -j ACCEPT -s MGMT_NIC_IP -m state --state
    RELATED,ESTABLISHED
    
    # allow all DNS queries from the management interface NIC
    iptables -I OUTPUT 2 -j ACCEPT -s MGMT_NIC_IP -p UDP --destination-port 53
    
    # reject all other traffic from localhost
    iptables -I OUTPUT 3 -j REJECT -s 127.0.0.1 --reject-with
    icmp-port-unreachable
    
    # reject all other traffic from the management interface NIC
    iptables -I OUTPUT 4 -j REJECT -s MGMT_NIC_IP --reject-with
    icmp-port-unreachable
    
    MGMT_NIC_IP = server_IP


    On server;

    Restart iptables
    $ sudo /etc/rc.local restart
    No complaint

    On desktop running
    $ ssh -X [email protected]_IP rox
    Code:
    ssh: connect to host server_IP port 22: Connection refused
    
    $ ssh -X server_IP
    Code:
    ssh: connect to host server_IP port 22: Connection refused
    
    It did not work


    Again on server
    $ sudo nano /etc/ssh/sshd_config
    adding "ListenAddress 192.168.0.11" (router IP)

    $ cat /etc/ssh/sshd_config
    Code:
    ....
    Port 22
    ListenAddress 192.168.0.10
    ListenAddress 192.168.0.11
    ....
    
    $ sudo /etc/init.d/ssh restart


    Again on desktop
    $ ssh -X [email protected]_IP rox
    Code:
    ssh: connect to host server_IP port 22: Connection refused
    
    $ ssh -X server_IP
    Code:
    ssh: connect to host server_IP port 22: Connection refused
    
    Problem still there. Any advice?

    TIA


    satimis
     
    Last edited: Oct 5, 2007

Share This Page