Starting seahub.sh "LC_ALL is not set in ENV, set to en_US.UTF-8"

Hi,
When I’m starting ./seahub.sh start-fastcgi I’m getting this messages in terminal:

LC_ALL is not set in ENV, set to en_US.UTF-8

Everything works and so on, so I guess it’s not a big deal but is this something that can make any trouble later on?
As far as I can tell this is regarding time zone, correct?
When I did install Ubuntu Server I did setup my time zone, keyboard, language etc.

1 Like

If you have a system with systemd you can start seafile and seahub via unit files. In the unit file for seahub you can set the environment and the message is gone:

[Unit]
Description=Seafile hub
After=network.target seafile.service

[Service]
# change start to start-fastcgi if you want to run fastcgi
Environment="LC_ALL=C"
ExecStart=/home/seafile/seafile-server-latest/seahub.sh start-fastcgi
ExecStop=/home/seafile/seafile-server-latest/seahub.sh stop
User=seafile
Group=seafile
Type=oneshot
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Thanks, I do have seafile starting with the systemd so I’ll change that in the file.

But why is this happening? And can it bee any trouble with it?

Hi,

with server 6.1.1 on CentOS 7 (but also if I go back to 6.1.0),
message remains with both alternatives in seahub.service:
Environment=“LC_ALL=C”
or
Environment=“LC_ALL=en_US.UTF-8”

seahub.service is the one of the manual page (with paths configured for my setup).
# systemctl status seahub.service:

systemctl status seahub.service
● seahub.service - Seafile hub
Loaded: loaded (/etc/systemd/system/seahub.service; enabled; vendor preset: disabled)
Active: active (exited) since Tue 2017-06-27 10:22:34 CEST; 2min 33s ago
Process: 1259 ExecStop=/seafile/seafile-server-latest/seahub.sh stop (code=exited, status=0/SUCCESS)
Process: 1446 ExecStart=/seafile/seafile-server-latest/seahub.sh start-fastcgi (code=exited, status=0/SUCCESS)
Main PID: 1446 (code=exited, status=0/SUCCESS)
CGroup: /user.slice/user-0.slice/session-25.scope/system.slice/seahub.service
├─1471 python2.7 /seafile/seafile-server-6.1.1/seahub/manage.py runfcgi host=127.0.0.1 port=8000 pidfile…
├─1472 python2.7 /seafile/seafile-server-6.1.1/seahub/manage.py runfcgi host=127.0.0.1 port=8000 pidfile…
├─1473 python2.7 /seafile/seafile-server-6.1.1/seahub/manage.py runfcgi host=127.0.0.1 port=8000 pidfile…
├─1474 python2.7 /seafile/seafile-server-6.1.1/seahub/manage.py runfcgi host=127.0.0.1 port=8000 pidfile…
├─1475 python2.7 /seafile/seafile-server-6.1.1/seahub/manage.py runfcgi host=127.0.0.1 port=8000 pidfile…
└─1476 python2.7 /seafile/seafile-server-6.1.1/seahub/manage.py runfcgi host=127.0.0.1 port=8000 pidfile…

Jun 27 10:22:29 seafile systemd[1]: Starting Seafile hub…
Jun 27 10:22:29 seafile seahub.sh[1446]: LANG is not set in ENV, set to en_US.UTF-8
Jun 27 10:22:29 seafile seahub.sh[1446]: Starting seahub (fastcgi) at 127.0.0.1:8000 …
Jun 27 10:22:34 seafile seahub.sh[1446]: Seahub is started
Jun 27 10:22:34 seafile seahub.sh[1446]: Done.
Jun 27 10:22:34 seafile systemd[1]: Started Seafile hub.

I’m not sure of the correlation, because I did not tested immediately, but from then on, I’m no more able to have image previews in web interface, or I get “file does not exist” for example with pdf, when there are space in folder names. If instead I move single files to folders with no spaced names, the preview is available, I can view pdf, or download other kind of files.
The workaround of moving every single file (it doesn’t resolve the problem when moving entire folders) seems not so efficient.

Have a nice day
leo

This is unrelated. It is a known Apache issue. See https://github.com/haiwen/seafile/issues/1258 and https://manual.seafile.com/deploy/deploy_with_apache.html. This is fixed in Apache 2.4.12.

To the “LC_ALL is not set” issue: This does not affect production.

1 Like

Ok, thank you… I dont’t know why, but I never had the “space in folder names” problem up to now, so that’s why I did not related to apache version.

Hi again,

I installed httpd24 from testing repositories:
Install httpd24-httpd-2.4.25-9.el7.x86_64 @centos-sclo-rh-testing
Dep-Install httpd24-httpd-tools-2.4.25-9.el7.x86_64 @centos-sclo-rh-testing
Dep-Install httpd24-libnghttp2-1.7.1-1.el7.x86_64 @centos-sclo-rh-testing
Dep-Install httpd24-runtime-1.1-14.el7.x86_64 @centos-sclo-rh-testing

and enabled in place of the default httpd.
The problem of spaces in folder and file names is still there, even if the manual ask for a version at least 2.4.12.

Before definitely switch to nginx… any suggestion?
Thanks all
l

Just switched to nginx. :wink:
leo

1 Like

I’m running nginx.

where can i find this config file? i allso have this error msg and i like to clear it.
in other words what is the “unit file for seafile”

Kind Regards
Gerard

You have to create the unit files by yourself:

sudo touch /etc/systemd/system/seafile.service
sudo nano /etc/systemd/system/seafile.service

Insert the content (adjust your settings):

[Unit]
Description=Seafile
# add mysql.service or postgresql.service depending on your database to the line below
After=network.target

[Service]
Type=oneshot
ExecStart=/home/seafile/seafile-server-latest/seafile.sh start
ExecStop=/home/seafile/seafile-server-latest/seafile.sh stop
RemainAfterExit=yes
User=seafile
Group=seafile

[Install] 
WantedBy=multi-user.target

and for seahub:

sudo touch /etc/systemd/system/seahub.service
sudo nano /etc/systemd/system/seahub.service

Content:

[Unit]
Description=Seafile hub
After=network.target seafile.service

[Service]
# change start to start-fastcgi if you want to run fastcgi
Environment="LC_ALL=C"
ExecStart=/home/seafile/seafile-server-latest/seahub.sh start
ExecStop=/home/seafile/seafile-server-latest/seahub.sh stop
User=seafile
Group=seafile
Type=oneshot
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

After creating the unit files:

sudo systemctl daemon-reload
sudo systemctl enable seafile.service
sudo systemctl start seafile.service
sudo systemctl enable seahub.service
sudo systemctl start seahub.service