CentreForDigitalHumanities / tscan

T-scan: an analysis tool for dutch texts to assess the complexity of the text, based on original work by Rogier Kraf
GNU Affero General Public License v3.0
18 stars 6 forks source link

startup scripts for webservices fail in some instances #8

Closed Duchadian closed 6 years ago

Duchadian commented 6 years ago

As the title says, the startup scripts fail in some instances (mostly when the scripts are run via ssh it seems).

I'll take .startfrog.sh as an example.

The cause of the failure seems to be re-interpretation of the PORT variable from 7001 to 7 1, to '7', '', '1' when called with ${PORT}. This seems to be an issue central to bash.

This results in the last line ( frog -X --id=${ID} -c ${CONFIG} --skip=mp -S${PORT} 2> $LOGFILE ) interpreting 7 as the port, with '' and '1' being seen as files for frog to parse. The other scripts do not fail as spectacularly, yet raise errors because they all try to occupy the same port (7).

The workaround seems to be to quote the variables in question (i.e. change ${PORT} to "${PORT}").

Duchadian commented 6 years ago

This issue was also reported to @proycon and @kosloot, just thought I should put it here for reference.

proycon commented 6 years ago

Neither I nor Ko could reproduce it though, and we find it a very weird spooky issue :)

mhkuu commented 6 years ago

This is solved through #9 right? Please re-open if not :-)

Duchadian commented 6 years ago

It should be, yes. Everything now runs as it is supposed to (although purposefully running 7 different instances of tscan at the same time may not fall under 'as it's supposed to').