So, my production server is trying to write log files to logging server. I've set up the logging server to allow everyone to read and write. I also mapped the production server to the logging server. For some reason whenever I tried to write a log file to the logging server, it would not be able to create the path. The logging server tells me the error that logon request fails, An account failed to log on.
When I tried this with my local server, same code, same setup, it is able to write to the logging server, no issues...
Is there something else I am missing on my production server? Or how it is set up? Maybe something I need to enable on ignition gateway or something?
Are you referring to alarm or audit logs, or some other logging?
If you're getting a logon failure, then I would check the accounts/credentials being used by both servers to see if there's any differences there.
server = '//xx.xx.xx.xx/LogFiles/'
global_path = 'System/Log.txt'
def logMessage():
try:
global server, global_path
system.file.writeFile(server+global_path,'TEST')
except Exception as e:
system.util.getLogger('LOGGING ERROR').info(str(e))
A simple log message to a txt file. My local ignition is able to write to the server after mapping it.
net use Z: \\xx.xx.xx.xx\LogFiles\ /user:xxx yyyyyyyyy /persistent:yes
I did the same for the production server.
My local is able to write to it without any issues.
My production is however using a generic windows account with no username or password and is unable to write to it even thou I did the mapping. How would I set up ignition to be able to access and write to the server file?
You don't have to map a drive, but you'll need to set up a Windows account on the production server with permission to the network share and permission to run as a service, then switch the Ignition service from running as the LOCAL SYSTEM account over to the Windows user account. That should let it write to the shared path properly.