Sen2agri update 1.7 error

I’m trying to update my Sen2Agri system but an error appears when I typed in the sudo ./update.sh
Here is the error:
A dependency job for sen2agri-landsat-downloader.service failed. See ‘journalctl -xe’ for details.
A dependency job for sen2agri-executor.service failed. See ‘journalctl -xe’ for details.
A dependency job for sen2agri-http-listener.service failed. See ‘journalctl -xe’ for details.
A dependency job for sen2agri-demmaccs.service failed. See ‘journalctl -xe’ for details.
A dependency job for sen2agri-orchestrator.service failed. See ‘journalctl -xe’ for details.
A dependency job for sen2agri-sentinel-downloader.service failed. See ‘journalctl -xe’ for details.

And when I looked at the result of ‘journalctl -xe’ :slight_smile:

(5261)(140044246256064)[ERROR] Listening socket is in wrong state, terminating listener
Dec 06 16:10:02 ESSCGeo-Sen2Agri xrdp[5261]: (5261)(140044246256064)[CORE ] shutting down log subsystem…
Failed to start PostgreSQL 9.4 database server.
– Subject: Unit postgresql-9.4.service has failed
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit postgresql-9.4.service has failed.

– The result is failed.
Dec 06 16:10:02 ESSCGeo-Sen2Agri systemd[1]: Dependency failed for Runs MACCS on L1C products.
– Subject: Unit sen2agri-demmaccs.service has failed
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit sen2agri-demmaccs.service has failed.

– The result is dependency.
Dec 06 16:10:02 ESSCGeo-Sen2Agri systemd[1]: Job sen2agri-demmaccs.service/start failed with result ‘dependency’.
Dec 06 16:10:02 ESSCGeo-Sen2Agri systemd[1]: Dependency failed for Downloads Sentinel-2 products.
– Subject: Unit sen2agri-sentinel-downloader.service has failed
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit sen2agri-sentinel-downloader.service has failed.

– The result is dependency.
Dec 06 16:10:02 ESSCGeo-Sen2Agri systemd[1]: Job sen2agri-sentinel-downloader.service/start failed with result ‘dependency’.
Dec 06 16:10:02 ESSCGeo-Sen2Agri systemd[1]: Dependency failed for Downloads Landsat 8 products.
– Subject: Unit sen2agri-landsat-downloader.service has failed
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit sen2agri-landsat-downloader.service has failed.

– The result is dependency.

Hi.

Do you see anything else on the screen after running update.sh? Besides that, please run journalctl -b > log.txt and upload the output.

Hello,

I just decided to uninstall my current sen2agri system and have a clean install of the version 1.7.

By the way here’s the output.

Dec 08 16:04:01 ESSCGeo-Sen2Agri systemd[1]: Starting PostgreSQL 9.4 database server…
Dec 08 16:04:02 ESSCGeo-Sen2Agri pg_ctl[21099]: < 2017-12-08 16:04:02.069 +08 >LOG: could not bind IPv4 socket: Address already in use
Dec 08 16:04:02 ESSCGeo-Sen2Agri pg_ctl[21099]: < 2017-12-08 16:04:02.069 +08 >HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
Dec 08 16:04:02 ESSCGeo-Sen2Agri pg_ctl[21099]: < 2017-12-08 16:04:02.069 +08 >WARNING: could not create listen socket for "localhost"
Dec 08 16:04:02 ESSCGeo-Sen2Agri pg_ctl[21099]: < 2017-12-08 16:04:02.069 +08 >FATAL: could not create any TCP/IP sockets
Dec 08 16:04:03 ESSCGeo-Sen2Agri pg_ctl[21099]: pg_ctl: could not start server
Dec 08 16:04:03 ESSCGeo-Sen2Agri pg_ctl[21099]: Examine the log output.
Dec 08 16:04:03 ESSCGeo-Sen2Agri systemd[1]: postgresql-9.4.service: control process exited, code=exited status=1
Dec 08 16:04:03 ESSCGeo-Sen2Agri systemd[1]: Failed to start PostgreSQL 9.4 database server.
Dec 08 16:04:03 ESSCGeo-Sen2Agri systemd[1]: Dependency failed for Downloads Sentinel-2 products.
Dec 08 16:04:03 ESSCGeo-Sen2Agri systemd[1]: Job sen2agri-sentinel-downloader.service/start failed with result ‘dependency’.
Dec 08 16:04:03 ESSCGeo-Sen2Agri systemd[1]: Dependency failed for Runs MACCS on L1C products.
Dec 08 16:04:03 ESSCGeo-Sen2Agri systemd[1]: Job sen2agri-demmaccs.service/start failed with result ‘dependency’.
Dec 08 16:04:03 ESSCGeo-Sen2Agri systemd[1]: Dependency failed for Downloads Landsat 8 products.
Dec 08 16:04:03 ESSCGeo-Sen2Agri systemd[1]: Job sen2agri-landsat-downloader.service/start failed with result ‘dependency’.
Dec 08 16:04:03 ESSCGeo-Sen2Agri systemd[1]: Unit postgresql-9.4.service entered failed state.
Dec 08 16:04:03 ESSCGeo-Sen2Agri systemd[1]: postgresql-9.4.service failed.

Thanks,
Brent

That’s strange, it looks like Postgres cannot start. Are you running another Postgres version at the same time?

Please check the output of:

sudo ss -pantl | grep 5432

Here’s the result:

LISTEN 0 128 127.0.0.1:5432 : users:((“postgres”,pid=1656,fd=3))

By the way I think I already remove postgresql, I’m already doing a clean install of Sen2agri. I’ll update you later if I’m successful.

Thank you!

Brent

Hi,

Please try this, too

systemctl status 1656

Hello again,

Here’s the output:
● postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2017-10-22 11:54:34 +08; 1 months 16 days ago
Main PID: 1656 (postgres)
CGroup: /system.slice/postgresql.service
├─1656 /usr/bin/postgres -D /var/lib/pgsql/data -p 5432
├─2073 postgres: logger process
├─2094 postgres: checkpointer process
├─2095 postgres: writer process
├─2096 postgres: wal writer process
├─2097 postgres: autovacuum launcher process
└─2098 postgres: stats collector process

Brent

It makes sense, then. We’re using PostgreSQL 9.4 from the pgdg94 repository. That shows up as postgresql-9.4.service in systemctl. CentOS 7 also comes with PostgreSQL 9.2, which you seem to have installed. As it happens, 9.2 starts before 9.4 and 9.4 can’t run.

We need 9.4, so I see two solutions:

  1. Uninstall 9.2 and migrate your existing databases to 9.4
  2. Use a different port for one of them.

Thanks!

Since I already uninstalled all the related packages of sen2agri 1.6,
do I need to uninstall 9.2 (or change port) before installing 1.7?

Cheers,
Brent

That PostgreSQL 9.2 wasn’t installed by our system, so it depends on what you think it’s best to do with it. But yes, it might be better to fix the issue before installing 1.7.